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/)
-   -   dynamicMeshDict update issue during run (https://www.cfd-online.com/Forums/openfoam-solving/115441-dynamicmeshdict-update-issue-during-run.html)

waku2005 March 31, 2013 06:07

dynamicMeshDict update issue during run
 
Dear All,

I'd like to know whether chagnes of dynamicMeshDict during run are refleted to the mesh motion or not, in pimpleDyMFoam.

In the source of pimpleDyMFoam.C, includiuons of "creatDynamicFvMesh.H" is conducted once before the time-stepping loop.
This is that we cannot run the solver in varing rotating speed ?

Thanks in advance,
waku2005

waku2005 April 8, 2013 05:46

Further question.

In the solidBodyMotionFvMesh.C, dynamicMeshDict is defined as below.
MUST_READ_IF_MODIFIED option means that when dynamicMeshDict was updated manually, it would be re-read.
Even so I could not see such re-reading output and mesh change.
I'd like to know how to re-read the dict file during run.

Sincerely yours
waku2005

Quote:

dynamicMeshCoeffs_
(
IOdictionary
(
IOobject
(
"dynamicMeshDict",
io.time().constant(),
*this,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).subDict(typeName + "Coeffs")
),

danny123 April 12, 2013 04:18

Hello waku2005,

Maybe you look at my thread of last year:

http://www.cfd-online.com/Forums/ope...rformance.html

I, too, wanted to change shaft speed during iteration and it works. You may alter this code to another time dependent shaft speed function. If your shaft speed is a reaction of some forces induced by the flow, this is a different story.

Hope this works for you,

Regards,

Daniel

waku2005 April 15, 2013 00:02

Hi Daniel

Thanks a lot for your reply.

My objectives are
1. Dynamic update of rotational speed in dynamicMeshDict
2. From postProcessing data such as torque, do above update from a script or a new solver

The 1st one is what in your thread and I'll try it.:)

Sincerely
waku2005


Quote:

Originally Posted by danny123 (Post 420070)
Hello waku2005,

Maybe you look at my thread of last year:

http://www.cfd-online.com/Forums/ope...rformance.html

I, too, wanted to change shaft speed during iteration and it works. You may alter this code to another time dependent shaft speed function. If your shaft speed is a reaction of some forces induced by the flow, this is a different story.

Hope this works for you,

Regards,

Daniel


danny123 April 15, 2013 04:21

Hi waku2005,

Your are welcome. The post processing data is in a file called "forces" if you copy the code from my controlDic file. So, you only need to re-write dynamicmeshDic for each calculation step and relanch the calculation using the OpenFoam script. There are some examples in the tutorial using m4. I have used this in the past, because I was too lazy to retype the same command lines over and over again into the terminal. It is quite simple.

Regards,

Daniel

Rodrigo Correa August 27, 2015 07:43

Changing of dynamicMeshDict during simulation in pimpleDyMFoam
 
Dear waku2005,

Did you figure out if the change of dynamicMeshDict during simulation (run) affects the mesh motion in pimpleDyMFoam?

I also want to change it during my simulation, but I'm not sure if It will change the velocity of the mesh (mesh motion).

Best regards,
Rodrigo Correa

danny123 August 27, 2015 09:19

Dear Rodrigo,

I would not recommend this because what is changed is not the mesh motion (rotational velocity), but the mesh position. The rotational speed is converted into a rotational angle. For constant rotational speed, this is straight forward. If you overwrite the extsting rotational speed, the agitator will make a huge jump since the time history of the rotation is lost. You must determine the function rotational speed on time, convert this to rotational angle and alter the code as it reported within thread mentioned above.

Regards,

Daniel

Rodrigo Correa August 27, 2015 12:06

Dear Daniel Witte

Thank you so much for your reply!

I did the manual change of the angular velocity before read your answer and i couldn't see any difference between the previous and the actual one. I'm not sure that It really changes the mesh rotation speed during the simulation.

Best Regards,

Rodrigo


All times are GMT -4. The time now is 13:37.