mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Adding option mesh flux correction to solidFoam
This commit is contained in:
@ -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"
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
@ -46,6 +46,7 @@ PIMPLE
|
|||||||
nOuterCorrectors 2;
|
nOuterCorrectors 2;
|
||||||
nCorrectors 1;
|
nCorrectors 1;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
meshFluxCorrection true;
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
Reference in New Issue
Block a user