Restart the simulation using a different mesh

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Restart the simulation using a different mesh

Post 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
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Restart the simulation using a different mesh

Post 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
Jundi He
Posts: 106
Joined: Fri Jan 13, 2017 3:23 pm

Re: Restart the simulation using a different mesh

Post 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
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Restart the simulation using a different mesh

Post 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
Post Reply