From f041b8e746e4c6a7e44008271d514799785ff5f5 Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Wed, 15 May 2019 17:47:07 +0200 Subject: [PATCH] Minor updates to oversetCourantNo.H and oversetAlphaCourantNo.H Just to make it more self-sustainable --- .../oversetMesh/include/oversetAlphaCourantNo.H | 17 ++++++++++++----- .../oversetMesh/include/oversetCourantNo.H | 6 ++++-- 2 files changed, 16 insertions(+), 7 deletions(-) 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())