CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   mesh.update() and dynamic mesh? (

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:


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):


#include "setDeltaT.H"
#include "rotatePatch.H"
if (mesh.changing() .....)
#include "forceBalance.H"

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 =).


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 04:35.