Minor updates to oversetCourantNo.H and oversetAlphaCourantNo.H
Just to make it more self-sustainable
This commit is contained in:
parent
506c150bdb
commit
f353593d6e
2 changed files with 16 additions and 7 deletions
|
@ -38,21 +38,28 @@ scalar maxAlphaCo
|
|||
scalar alphaCoNum = 0.0;
|
||||
scalar meanAlphaCoNum = 0.0;
|
||||
|
||||
surfaceScalarField alpha1f =
|
||||
const surfaceScalarField alpha1f =
|
||||
fvc::interpolate(min(max(alpha1, scalar(0)), scalar(1)));
|
||||
|
||||
const dimensionedScalar alphaOffset("alphaOffset", dimless, dAlpha);
|
||||
const dimensionedScalar alphaOffset
|
||||
(
|
||||
"alphaOffset",
|
||||
dimless,
|
||||
runTime.controlDict().lookupOrDefault("dAlpha", 0.01)
|
||||
);
|
||||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
surfaceScalarField magAlphaPhi
|
||||
const oversetMesh& om = oversetMesh::New(mesh);
|
||||
|
||||
const surfaceScalarField magAlphaPhi
|
||||
(
|
||||
pos(alpha1f - alphaOffset)*
|
||||
pos(scalar(1) - alphaOffset - alpha1f)*
|
||||
mag(faceOversetMask*phi)
|
||||
mag(om.sGamma()*phi)
|
||||
);
|
||||
|
||||
surfaceScalarField SfUfbyDelta =
|
||||
const surfaceScalarField SfUfbyDelta =
|
||||
mesh.surfaceInterpolation::deltaCoeffs()*magAlphaPhi;
|
||||
|
||||
const scalar deltaT = runTime.deltaT().value();
|
||||
|
|
|
@ -36,9 +36,11 @@ scalar velMag = 0.0;
|
|||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
surfaceScalarField magPhi = mag(faceOversetMask*phi);
|
||||
const oversetMesh& om = oversetMesh::New(mesh);
|
||||
|
||||
surfaceScalarField SfUfbyDelta =
|
||||
const surfaceScalarField magPhi = mag(om.sGamma()*phi);
|
||||
|
||||
const surfaceScalarField SfUfbyDelta =
|
||||
mesh.surfaceInterpolation::deltaCoeffs()*magPhi;
|
||||
|
||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
||||
|
|
Reference in a new issue