ENH: Adding dynamic mesh to solidFoam and tutorial

This commit is contained in:
sergio
2020-12-08 15:01:32 +00:00
committed by Andrew Heather
parent df777ce3c6
commit 348c2a87ad
16 changed files with 739 additions and 4 deletions

View File

@ -2,6 +2,8 @@ EXE_INC = \
-DFULLDEBUG -g -O0 \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
@ -13,6 +15,9 @@ EXE_LIBS = \
-lfvOptions \
-lmeshTools \
-lsampling \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lradiationModels \

View File

@ -11,6 +11,16 @@
fvOptions(rho, h)
);
if (mesh.changing())
{
surfaceScalarField phihMesh
(
fvc::interpolate(betav*rho*h)*mesh.phi()
);
hEqn -= fvc::div(phihMesh);
}
hEqn.relax();
fvOptions.constrain(hEqn);

View File

@ -35,6 +35,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "solidThermo.H"
#include "radiationModel.H"
#include "fvOptions.H"
@ -57,7 +58,7 @@ int main(int argc, char *argv[])
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createDynamicFvMesh.H"
#include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -92,13 +93,20 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl;
while (pimple.correctNonOrthogonal())
while (pimple.loop())
{
#include "hEqn.H"
if (pimple.firstIter())
{
mesh.update();
}
while (pimple.correct())
{
#include "hEqn.H"
}
}
runTime.write();
runTime.printExecutionTime(Info);
}
}