Skip to content
Snippets Groups Projects
Commit 3666d90f authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

ENH: interMixingFoam: Added support for mesh-motion and automatic refinement/unrefinement

parent ede4759b
Branches
Tags
No related merge requests found
......@@ -23,6 +23,7 @@ EXE_LIBS = \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lfiniteVolume \
-ldynamicFvMesh \
-lmeshTools \
-lfvOptions \
-lsampling \
......
......@@ -28,20 +28,22 @@ Group
grpMultiphaseSolvers
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"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -52,7 +54,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"
......@@ -94,6 +96,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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment