mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Adding dynamic mesh to solidFoam and tutorial
This commit is contained in:
@ -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 \
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user