Page 1 of 1

Restart the simulation using a different mesh

Posted: Mon Jul 05, 2021 4:53 pm
by Jundi He
Hi Code Saturne developers:

I am trying to restart my simulation using a different mesh, in the new mesh, a new cavity is added to the old domain (red part):
IMG-0326.jpg
Is this possible in Code Saturne? Thanks!

Regards!
Jundi

Re: Restart the simulation using a different mesh

Posted: Tue Jul 06, 2021 10:49 am
by Yvan Fournier
Hello,

Yes, this should be possible. In the zone outside the original mesh, the field values will retain their default initial values (0 for most variables, t0 for temperature at least in v7.0), so you can also use the cs_user_initialization user-defined function to lop on cells and adjust values in the added zone if you need.

Best regards,

Yvan

Re: Restart the simulation using a different mesh

Posted: Tue Jul 06, 2021 4:39 pm
by Jundi He
Hi Yvan,

Thanks for the reply. Is there an example on Doxygen or somewhere to explain how to do this? It would be great if I can read through an example. Thanks! Basically I need to initialize part my flow and thermal field using the checkpoint, and part of it using the user defined values.

Regards!
Jundi

Re: Restart the simulation using a different mesh

Posted: Sun Jul 18, 2021 10:19 pm
by Yvan Fournier
Hello,

Sorry, there is no example I know of for this. But basically, in the user initialization user-defined function, you should either check for values left at an initial value (usually 0 or t0), ot use a geometric selection criteria to select the matching cells, and change their temperature values.

You can first try by simply restarting on another mesh (using the GUI), and visualizing to temperature field at computation start. Then work on the user subroutine, visualizing the initial field as you progress.

Best regards,

Yvan