From 660b54b728b80cb855a12dd9f9ee3e3a71287807 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 25 Nov 2015 16:54:14 +0000 Subject: [PATCH] moveDynamicMesh: Iterate over mesh.update() according to the PIMPLE settings Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1926 --- .../moveDynamicMesh/moveDynamicMesh.C | 15 +++++++++++++-- .../SnakeRiverCanyon/system/fvSolution | 5 ++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C index d2f25bb46f..2fac9f25c0 100644 --- a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C +++ b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C @@ -32,6 +32,7 @@ Description #include "argList.H" #include "Time.H" #include "dynamicFvMesh.H" +#include "pimpleControl.H" #include "vtkSurfaceWriter.H" #include "cyclicAMIPolyPatch.H" @@ -129,13 +130,23 @@ int main(int argc, char *argv[]) Info<< "Writing VTK files with weights of AMI patches." << nl << endl; } + pimpleControl pimple(mesh); + + bool moveMeshOuterCorrectors + ( + pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false) + ); + while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << endl; - for (int i = 0; i<2; i++) + while (pimple.loop()) { - mesh.update(); + if (pimple.firstIter() || moveMeshOuterCorrectors) + { + mesh.update(); + } } mesh.checkMesh(true); diff --git a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution index 898ec2420b..04d9fe6cc6 100644 --- a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution +++ b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution @@ -33,7 +33,7 @@ solvers relTol 0; } - cellDisplacement + "cellDisplacement.*" { solver GAMG; tolerance 1e-08; @@ -53,5 +53,8 @@ solvers } } +PIMPLE +{} + // ************************************************************************* //