CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   mesh.update() and dynamic mesh? (https://www.cfd-online.com/Forums/openfoam-programming-development/78374-mesh-update-dynamic-mesh.html)

cwang5 July 20, 2010 03:02

mesh.update() and dynamic mesh?
 
Hi guys,

For a dynamic mesh case I've set the pointDisplacement and cellDisplacement of a moving patch using the following code:

Code:

pointDisplacement.boundaryField()[patchi] == newPoint - oldPoint;
cellDisplacement.boundaryField()[patchi] == newCell - oldCell;

And the patch moves accordingly. However, the mesh.update() function in the main solver does not seems to be working, or at least I think that's the function that calls for the motion of all the other points/cells around the patch. The end result was that the patch moves, but none of the other grid points does, hence collapsing some of the cells and crashed the solver. I'm wondering if I am implementing the dynamic mesh function correctly, and below is the pseudo code of the solver (modified based on the pimpleDyMFoam solver):

Code:

while(runTime.run());
#include "setDeltaT.H"
#include "rotatePatch.H"
mesh.update();
if (mesh.changing() .....)
PIMPLE Loop
#include "forceBalance.H"
end

Hope there's someone out there who can help, I've been messing around with the dynamicMeshDict for a few days now to no avail. Thanks in advance to anyone who helps =).

John

deepsterblue July 22, 2010 23:37

What class of dynamicFvMesh are you using? The one which invokes the mesh-motion solver is dynamicMotionSolverFvMesh... That should do what you're looking for.


All times are GMT -4. The time now is 21:14.