mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
moveDynamicMesh: Iterate over mesh.update() according to the PIMPLE settings Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1926
This commit is contained in:
@ -32,6 +32,7 @@ Description
|
|||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "dynamicFvMesh.H"
|
#include "dynamicFvMesh.H"
|
||||||
|
#include "pimpleControl.H"
|
||||||
#include "vtkSurfaceWriter.H"
|
#include "vtkSurfaceWriter.H"
|
||||||
#include "cyclicAMIPolyPatch.H"
|
#include "cyclicAMIPolyPatch.H"
|
||||||
|
|
||||||
@ -129,14 +130,24 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Writing VTK files with weights of AMI patches." << nl << endl;
|
Info<< "Writing VTK files with weights of AMI patches." << nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pimpleControl pimple(mesh);
|
||||||
|
|
||||||
|
bool moveMeshOuterCorrectors
|
||||||
|
(
|
||||||
|
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
|
||||||
|
);
|
||||||
|
|
||||||
while (runTime.loop())
|
while (runTime.loop())
|
||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
for (int i = 0; i<2; i++)
|
while (pimple.loop())
|
||||||
|
{
|
||||||
|
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||||
{
|
{
|
||||||
mesh.update();
|
mesh.update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mesh.checkMesh(true);
|
mesh.checkMesh(true);
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ solvers
|
|||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cellDisplacement
|
"cellDisplacement.*"
|
||||||
{
|
{
|
||||||
solver GAMG;
|
solver GAMG;
|
||||||
tolerance 1e-08;
|
tolerance 1e-08;
|
||||||
@ -53,5 +53,8 @@ solvers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PIMPLE
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user