Commit 1d938852 authored by andy's avatar andy
Browse files

ENH: surface film - updated Courant number calculation

parent d302bf68
......@@ -440,6 +440,7 @@ kinematicSingleLayer::kinematicSingleLayer
cumulativeContErr_(0.0),
deltaSmall_("deltaSmall", dimLength, SMALL),
deltaCoLimit_(solution().lookupOrDefault("deltaCoLimit", 1e-4)),
rho_
(
......@@ -898,15 +899,17 @@ scalar kinematicSingleLayer::CourantNumber() const
if (regionMesh().nInternalFaces() > 0)
{
const scalarField sumPhi(fvc::surfaceSum(mag(phi_)));
const scalarField& V = regionMesh().V();
const scalarField sumPhi
(
fvc::surfaceSum(mag(phi_))().internalField()
/ (deltaRho_.internalField() + ROOTVSMALL)
);
forAll(deltaRho_, i)
forAll(delta_, i)
{
if (deltaRho_[i] > SMALL)
if (delta_[i] > deltaCoLimit_)
{
CoNum = max(CoNum, sumPhi[i]/deltaRho_[i]/V[i]);
CoNum = max(CoNum, sumPhi[i]/(delta_[i]*magSf()[i]));
}
}
......
......@@ -100,6 +100,9 @@ protected:
//- Small delta
const dimensionedScalar deltaSmall_;
//- Film thickness above which Courant number calculation in valid
scalar deltaCoLimit_;
// Thermo properties
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment