ENH: Adding option mesh flux correction to solidFoam

This commit is contained in:
sergio
2021-12-16 11:58:40 -08:00
parent 83243cf01e
commit af864cdcd1
3 changed files with 22 additions and 2 deletions

View File

@ -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 "createRadiationModel.H"
#include "createFvOptions.H" #include "createFvOptions.H"

View File

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

View File

@ -46,6 +46,7 @@ PIMPLE
nOuterCorrectors 2; nOuterCorrectors 2;
nCorrectors 1; nCorrectors 1;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
meshFluxCorrection true;
} }
relaxationFactors relaxationFactors