diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options index ebde2396b1..bc2bd05dac 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options @@ -23,6 +23,7 @@ EXE_LIBS = \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lfiniteVolume \ + -ldynamicFvMesh \ -lmeshTools \ -lfvOptions \ -lsampling diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C index f1f1d8eb6c..c9fb5dc69c 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C @@ -25,20 +25,22 @@ Application interMixingFoam Description - Solver for 3 incompressible fluids, two of which are miscible, - using a VOF method to capture the interface. + Solver for 3 incompressible fluids, two of which are miscible, using a VOF + method to capture the interface, with optional mesh motion and mesh topology + changes including adaptive re-meshing. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "CMULES.H" +#include "localEulerDdtScheme.H" #include "subCycle.H" #include "immiscibleIncompressibleThreePhaseMixture.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvOptions.H" #include "CorrectPhi.H" -#include "localEulerDdtScheme.H" #include "fvcSmooth.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +51,7 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTime.H" - #include "createMesh.H" + #include "createDynamicFvMesh.H" #include "initContinuityErrs.H" #include "createDyMControls.H" #include "createFields.H" @@ -91,6 +93,38 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { + if (pimple.firstIter() || moveMeshOuterCorrectors) + { + mesh.update(); + + if (mesh.changing()) + { + gh = (g & mesh.C()) - ghRef; + ghf = (g & mesh.Cf()) - ghRef; + + MRF.update(); + + if (correctPhi) + { + // Calculate absolute flux + // from the mapped surface velocity + phi = mesh.Sf() & Uf(); + + #include "correctPhi.H" + + // Make the flux relative to the mesh motion + fvc::makeRelative(phi, U); + + mixture.correct(); + } + + if (checkMeshCourantNo) + { + #include "meshCourantNo.H" + } + } + } + #include "alphaControls.H" #include "alphaEqnSubCycle.H"