CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Modifying dynamicMeshDict during simulation (https://www.cfd-online.com/Forums/openfoam-solving/240820-modifying-dynamicmeshdict-during-simulation.html)

adrian.delser January 25, 2022 12:18

Modifying dynamicMeshDict during simulation
 
Hi everyone,


Has anyone tried modifying the dynamicMeshDict during a simulation (for example, changing the rotation rate omega of a spinning body so that it changes midway through the simulation). This would be useful to be able to control the rate of rotation with an external controller (with python for example). Would this even work or does the dynamicMeshDict get read once at the start of the simulation only?


Thanks

hbulus February 10, 2022 03:35

Quote:

Originally Posted by adrian.delser (Post 820978)
Hi everyone,


Has anyone tried modifying the dynamicMeshDict during a simulation (for example, changing the rotation rate omega of a spinning body so that it changes midway through the simulation). This would be useful to be able to control the rate of rotation with an external controller (with python for example). Would this even work or does the dynamicMeshDict get read once at the start of the simulation only?


Thanks

I think it might be possible if you define dynamicMesh in system/controlDict file. Of course enable adjustable in run time.
However, it will probably bring divergence problems if radical changes adopted. Please, let us know if it works.

adrian.delser February 11, 2022 05:40

Quote:

Originally Posted by hbulus (Post 822030)
I think it might be possible if you define dynamicMesh in system/controlDict file. Of course enable adjustable in run time.
However, it will probably bring divergence problems if radical changes adopted. Please, let us know if it works.


How would you define dynamicMesh inside the controlDict? So far if I try to change the rotation rate in dynamicMeshDict after a simulation has started it will have no effect (I suspect omega is read only once at the start of the simulation). One could of course stop the simulation, change omega, and resume from the last time step, but this is far from ideal.


All times are GMT -4. The time now is 06:15.