ALE - modify mesh viscosity at each time step

Questions and remarks about Code_Saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
daniele
Posts: 88
Joined: Wed Feb 01, 2017 11:42 am

ALE - modify mesh viscosity at each time step

Post by daniele » Mon Jun 29, 2020 11:23 am

Hello,

For a ALE simulation, the mesh viscosity defined inside the user_physical_properties.f90 is defined only once at the beginning of a simulation.
In my case, I fix the cell mesh viscosity value based on geometrical conditions based on the distance from the moving boundary. Under significant mesh deformation, this becomes critical since mesh viscosity values are kept constant based on the initial mesh configuration, but the cell distance from the moving boundary changes significantly due to the movement of the boundary. This leads to negative volume issues quite soon.
My question is: is there a way to change the mesh viscosity value of cells at each time step, thus taking into account the actual position of the moving wall? I tried to implement the mesh viscosity definition inside "usstr2" of the cs_user_fluid_structure_interaction.f90, which is meant to be called at each time step. Do you think this is a feasible way?
Do you have any more appropriate suggestion in order to achieve a mesh viscosity varying with time?

Thank you very much for your help.

Best regards,
Daniele

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

Re: ALE - modify mesh viscosity at each time step

Post by Yvan Fournier » Mon Jun 29, 2020 3:59 pm

Hello Daniele,

I did not look into that part of the code recently, but if the code does not provide a means of doing this , since the mesh viscosity is stored as a field, you should be able to modify its values at the end of an iteration in cs_user_extra_operations.

I'll remember to check this and possibly modify the behavior so the viscosity can be updated in the "correct" place, but at least that should provide a workaround.

Best regards,

Yvan

Post Reply