diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index fa2e3fbb6c..e43f92ccd3 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -125,7 +125,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - if (pimple.firstPimpleIter() || moveMeshOuterCorrectors) + if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors()) { // Move the mesh mesh.move(); diff --git a/applications/solvers/incompressible/pimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/Make/options index b09281a516..02dcab0da3 100644 --- a/applications/solvers/incompressible/pimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/Make/options @@ -4,7 +4,7 @@ EXE_INC = \ -I$(LIB_SRC)/physicalProperties/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lmomentumTransportModels \ diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index 80c8a1fd3c..570e2fae01 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - if (pimple.firstPimpleIter() || moveMeshOuterCorrectors) + if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors()) { // Move the mesh mesh.move(); diff --git a/applications/solvers/modules/fluid/isothermalFluid/isothermalFluid.C b/applications/solvers/modules/fluid/isothermalFluid/isothermalFluid.C index d38daf98a0..1573c55f77 100644 --- a/applications/solvers/modules/fluid/isothermalFluid/isothermalFluid.C +++ b/applications/solvers/modules/fluid/isothermalFluid/isothermalFluid.C @@ -53,19 +53,13 @@ void Foam::solvers::isothermalFluid::read() correctPhi = pimple.dict().lookupOrDefault ( "correctPhi", - correctPhi + mesh.dynamic() ); checkMeshCourantNo = pimple.dict().lookupOrDefault ( "checkMeshCourantNo", - checkMeshCourantNo - ); - - moveMeshOuterCorrectors = pimple.dict().lookupOrDefault - ( - "moveMeshOuterCorrectors", - moveMeshOuterCorrectors + false ); } diff --git a/applications/solvers/modules/fluid/isothermalFluid/isothermalFluid.H b/applications/solvers/modules/fluid/isothermalFluid/isothermalFluid.H index e7c8db2946..a5442eb14b 100644 --- a/applications/solvers/modules/fluid/isothermalFluid/isothermalFluid.H +++ b/applications/solvers/modules/fluid/isothermalFluid/isothermalFluid.H @@ -84,10 +84,6 @@ protected: //- Switch to check the mesh Courant number after mesh change bool checkMeshCourantNo; - //- Switch to move the mesh at the start of every PIMPLE outer corrected - // rather than the first corrector only which is the default - bool moveMeshOuterCorrectors; - // Thermophysical properties diff --git a/applications/solvers/modules/fluid/isothermalFluid/moveMesh.C b/applications/solvers/modules/fluid/isothermalFluid/moveMesh.C index 3296e56804..a5db89544b 100644 --- a/applications/solvers/modules/fluid/isothermalFluid/moveMesh.C +++ b/applications/solvers/modules/fluid/isothermalFluid/moveMesh.C @@ -55,7 +55,7 @@ void Foam::solvers::isothermalFluid::meshCourantNo() const bool Foam::solvers::isothermalFluid::moveMesh() { - if (pimple.firstIter() || moveMeshOuterCorrectors) + if (pimple.firstIter() || pimple.moveMeshOuterCorrectors()) { // Move the mesh mesh.move(); diff --git a/applications/solvers/modules/fluid/isothermalFluid/prePredictor.C b/applications/solvers/modules/fluid/isothermalFluid/prePredictor.C index 73448d4bf4..a016ae43f2 100644 --- a/applications/solvers/modules/fluid/isothermalFluid/prePredictor.C +++ b/applications/solvers/modules/fluid/isothermalFluid/prePredictor.C @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "isothermalFluid.H" -#include "CorrectPhi.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index c1ae4f5517..e75b1099c8 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -118,7 +118,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - if (pimple.firstPimpleIter() || moveMeshOuterCorrectors) + if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors()) { if (correctPhi && !divU.valid()) { diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index db2366bc86..e706886e60 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -128,7 +128,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - if (pimple.firstPimpleIter() || moveMeshOuterCorrectors) + if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors()) { if ( diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C index 366bb35a2f..e2e236d2ed 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - if (pimple.firstPimpleIter() || moveMeshOuterCorrectors) + if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors()) { // Move the mesh mesh.move(); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/multiphaseEulerFoam.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/multiphaseEulerFoam.C index 129516d125..1001745cbb 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/multiphaseEulerFoam.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/multiphaseEulerFoam.C @@ -152,7 +152,11 @@ int main(int argc, char *argv[]) } else { - if (pimple.firstPimpleIter() || moveMeshOuterCorrectors) + if + ( + pimple.firstPimpleIter() + || pimple.moveMeshOuterCorrectors() + ) { if (correctPhi && !divU.valid()) { diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index ecfd090974..dccf9a0f08 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - if (pimple.firstPimpleIter() || moveMeshOuterCorrectors) + if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors()) { scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C index de9601f488..29a8e28aaf 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C @@ -111,7 +111,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - if (pimple.firstPimpleIter() || moveMeshOuterCorrectors) + if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors()) { // Move the mesh mesh.move(); diff --git a/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C b/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C index 161c339ea3..cbd3e514f5 100644 --- a/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C +++ b/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C @@ -93,11 +93,6 @@ int main(int argc, char *argv[]) pimpleControl pimple(mesh); - bool moveMeshOuterCorrectors - ( - pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false) - ); - while (runTime.run()) { // Update the mesh for topology change, mesh to mesh mapping @@ -109,7 +104,7 @@ int main(int argc, char *argv[]) while (pimple.loop()) { - if (pimple.firstPimpleIter() || moveMeshOuterCorrectors) + if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors()) { // Move the mesh mesh.move(); diff --git a/src/finiteVolume/cfdTools/general/include/createDyMControls.H b/src/finiteVolume/cfdTools/general/include/createDyMControls.H index 193604f192..5706baac9c 100644 --- a/src/finiteVolume/cfdTools/general/include/createDyMControls.H +++ b/src/finiteVolume/cfdTools/general/include/createDyMControls.H @@ -10,8 +10,3 @@ bool checkMeshCourantNo ( pimple.dict().lookupOrDefault("checkMeshCourantNo", false) ); - -bool moveMeshOuterCorrectors -( - pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false) -); diff --git a/src/finiteVolume/cfdTools/general/include/readDyMControls.H b/src/finiteVolume/cfdTools/general/include/readDyMControls.H index 1f96bedb3a..5371d79c3a 100644 --- a/src/finiteVolume/cfdTools/general/include/readDyMControls.H +++ b/src/finiteVolume/cfdTools/general/include/readDyMControls.H @@ -11,9 +11,3 @@ checkMeshCourantNo = pimple.dict().lookupOrDefault "checkMeshCourantNo", checkMeshCourantNo ); - -moveMeshOuterCorrectors = pimple.dict().lookupOrDefault -( - "moveMeshOuterCorrectors", - moveMeshOuterCorrectors -); diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControl.C b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControl.C index 2efe4189d8..8ad0fc7632 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControl.C @@ -79,6 +79,12 @@ bool Foam::pimpleNoLoopControl::read() return false; } + moveMeshOuterCorrectors_ = dict().lookupOrDefault + ( + "moveMeshOuterCorrectors", + false + ); + simpleRho_ = dict().lookupOrDefaultBackwardsCompatible ( diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControl.H b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControl.H index 84e2f65cbd..e2d05faf82 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControl.H +++ b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControl.H @@ -74,11 +74,15 @@ protected: // Protected data - //- Flag to indicate whether to update the density in SIMPLE mode rather - // than PISO mode + //- Switch to move the mesh at the start of every PIMPLE outer corrector + // rather than the first corrector only which is the default + bool moveMeshOuterCorrectors_; + + //- Switch to indicate whether to update the density in SIMPLE mode + // rather than PISO mode bool simpleRho_; - //- Flag to control whether turbulence is solved just on the final + //- Switch to control whether turbulence is solved just on the final // pimple iteration, or on every pimple iteration bool transportCorrectionFinal_; @@ -111,7 +115,12 @@ public: // Access - //- Flag to indicate whether to update the density in simple mode + //- Switch to move the mesh at the start of every PIMPLE + // outer corrected rather than the first corrector only + // which is the default + inline bool moveMeshOuterCorrectors() const; + + //- Switch to indicate whether to update the density in simple mode inline bool simpleRho() const; //- Flag to indicate whether to correct the transport properties diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControlI.H b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControlI.H index 88a9be2893..b22853e4c6 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControlI.H +++ b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleNoLoopControl/pimpleNoLoopControlI.H @@ -27,6 +27,12 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +inline bool Foam::pimpleNoLoopControl::moveMeshOuterCorrectors() const +{ + return moveMeshOuterCorrectors_; +} + + inline bool Foam::pimpleNoLoopControl::simpleRho() const { return simpleRho_;