Enabling Mobile Mesh deformation within ALE method

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
So_nuc
Posts: 45
Joined: Wed Sep 05, 2018 12:16 pm

Enabling Mobile Mesh deformation within ALE method

Post by So_nuc »

Hello,

I am dealing with a case consisting in simulating a flow between two moving plates. The movement of these plates is imposed through "disale" function in the file "cs_user_boundary_conditions_ale.f90". I am not using the GUI but the files directly and I didn't find out how to enable the mesh to move at the postprocessing step (visualization of a .med file) according to the displacement field. The best solution would be to update the spatial coordinates of the mesh nodes over the simulation time.

By now, I can visualize the displacement field as well as the mesh velocity field but projected onto the inital mesh wihch is not updated over time.

Thank you for considering my query.

Best regards,

So_nuc
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Enabling Mobile Mesh deformation within ALE method

Post by Yvan Fournier »

Hello,

You need to modify the main writer (in cs_user_postprocess.c if not using the GUI, though I recommend the GUI) so as to use FVM_WRITER_TRANSIENT_COORDS instead of the default FVM_WRITER_FIXED_MESH.

I was actually thinking of removing this intermediate option, preferring to view the deformation by using the deformation field in the appropriate filter ("Warp by Vector" under ParaView), as this allows amplifying and better visualizing small movements, and leads to less issues with some output formats...

Best regards,

Yvan
So_nuc
Posts: 45
Joined: Wed Sep 05, 2018 12:16 pm

Re: Enabling Mobile Mesh deformation within ALE method

Post by So_nuc »

Hello Yvan,

Thank you for your quick feedback. I have already tried by doing this in "cs_user_postprocess.c" but it does not seem to enable the nodes coordinates to be updated.

That is why I considered to add the subroutine "cs_post_set_deformable" in the file "cs_user_parameters.f90" and to handle with" cs_post_time_step_begin(cs_glob_time_step)" to force the nodes to move.

I can publish my study here if required.

Thanks a lot.

Best regards,

So_nuc
So_nuc
Posts: 45
Joined: Wed Sep 05, 2018 12:16 pm

Re: Enabling Mobile Mesh deformation within ALE method

Post by So_nuc »

Hello Yvan,

Actually it indeed works by visualizing the results through the WarpByVector filter in Paravis as you mentioned.

Thanks a lot for your support !

Best regards,

So_nuc
Post Reply