Page 1 of 1

Extrude terrain in code_saturne

Posted: Wed Apr 08, 2020 10:41 am
by benoit_wmr
Hello all,

I carry out athmospheric simulations on the scale of an urban district and I have difficulties in managing the DEM (digital elevation model).
I would like to be able to extrude the terrain directly in code_saturne. Is it possible?

Best regards

Re: Extrude terrain in code_saturne

Posted: Thu Apr 09, 2020 12:11 am
by Yvan Fournier
Hello,

It may be possible, but tricky. You can define an extrusion in code_saturne (with fine, local control if you define it ysing user-defined functions), but this extrusion usually adds cells outside the domain. So in your case, you could manage that using an initial 3d mesh which is some distance above the highest point in the ground, and then extrude that towards the ground, using your DEM to compute the correct extrusion.

You still need to read your elevation model, and then interpolate it to the bottom surface of the mesh. The interpolation can be handled with built-in utilities (ple_locator API par parallel to parallel, or simply fvm_point_location API for a parallel code_saturne mesh with a DEM duplicated on all processes), once you have written the code to read the DEM model in a user-defined function.

Regards,

Yvan

Re: Extrude terrain in code_saturne

Posted: Fri Apr 17, 2020 3:09 pm
by benoit_wmr
Hello,

Thank you for your advice. It seems to work, but there is a problem: I will get a "stair step" relief using this method. Do you think there is a solution to this problem?

Regards

Benoît

Re: Extrude terrain in code_saturne

Posted: Fri Apr 17, 2020 10:25 pm
by Yvan Fournier
Hello,

Could you post a image (zoomed if necessary) describing the issue ?

Since the extrusion API allow both a "high level" and "low level approach", the problem can probably be solved using the low-level approach if necessary, but it may require a bit of extra algorithmic work (adapting the number of layers to the height).

Best regards,

Yvan

Re: Extrude terrain in code_saturne

Posted: Tue Apr 21, 2020 2:45 pm
by benoit_wmr
Hello,

Thanks for your answer.
Here is an image describing the issue.
Another problem exposed on the image is that the surface separating two contiguous extrusions remains in place...
I also join the fonction cs_user_mesh_modify (extract from file cs_user_mesh-modify.c)

Best regards

Benoît