Commit af864cdc authored by sergio's avatar sergio
Browse files

ENH: Adding option mesh flux correction to solidFoam

parent 83243cf0
......@@ -90,5 +90,24 @@ else
);
}
// Consider mesh flux to correct for mesh deformation
bool meshFluxCorr(false);
if (mesh.solutionDict().found("SIMPLE"))
{
meshFluxCorr =
mesh.solutionDict().subDict("SIMPLE").getOrDefault<bool>
(
"meshFluxCorrection", false
);
}
else if (mesh.solutionDict().found("PIMPLE"))
{
meshFluxCorr =
mesh.solutionDict().subDict("PIMPLE").getOrDefault<bool>
(
"meshFluxCorrection", false
);
}
#include "createRadiationModel.H"
#include "createFvOptions.H"
......@@ -11,14 +11,14 @@
fvOptions(rho, h)
);
if (mesh.changing())
if (meshFluxCorr)
{
surfaceScalarField phihMesh
(
fvc::interpolate(betav*rho*h)*mesh.phi()
);
hEqn -= fvc::div(phihMesh);
hEqn -= fvc::div(phihMesh);
}
hEqn.relax();
......
......@@ -46,6 +46,7 @@ PIMPLE
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
meshFluxCorrection true;
}
relaxationFactors
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment