diff --git a/src/overset/oversetMesh/include/oversetAlphaCourantNo.H b/src/overset/oversetMesh/include/oversetAlphaCourantNo.H index aefb835fe..dd04e33dd 100644 --- a/src/overset/oversetMesh/include/oversetAlphaCourantNo.H +++ b/src/overset/oversetMesh/include/oversetAlphaCourantNo.H @@ -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(); diff --git a/src/overset/oversetMesh/include/oversetCourantNo.H b/src/overset/oversetMesh/include/oversetCourantNo.H index 261ef8b77..008b0a727 100644 --- a/src/overset/oversetMesh/include/oversetCourantNo.H +++ b/src/overset/oversetMesh/include/oversetCourantNo.H @@ -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())