interMixingFoam: Added support for mesh-motion and automatic refinement/unrefinement
This commit is contained in:
@ -23,6 +23,7 @@ EXE_LIBS = \
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lfiniteVolume \
|
||||
-ldynamicFvMesh \
|
||||
-lmeshTools \
|
||||
-lfvOptions \
|
||||
-lsampling
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user