ENH: Adding option mesh flux correction to solidFoam
This commit is contained in:
parent
83243cf01e
commit
af864cdcd1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user