From 07c16f14545bfd8fec77dc8b7360358feb08f4a4 Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Thu, 13 Jun 2019 11:14:49 +0200 Subject: [PATCH] Updates to oversetMesh include files --- .../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())