ENH: surface film - updated Courant number calculation

This commit is contained in:
andy
2013-11-26 15:01:53 +00:00
parent d302bf6819
commit 1d93885257
2 changed files with 12 additions and 6 deletions

View File

@ -440,6 +440,7 @@ kinematicSingleLayer::kinematicSingleLayer
cumulativeContErr_(0.0), cumulativeContErr_(0.0),
deltaSmall_("deltaSmall", dimLength, SMALL), deltaSmall_("deltaSmall", dimLength, SMALL),
deltaCoLimit_(solution().lookupOrDefault("deltaCoLimit", 1e-4)),
rho_ rho_
( (
@ -898,15 +899,17 @@ scalar kinematicSingleLayer::CourantNumber() const
if (regionMesh().nInternalFaces() > 0) if (regionMesh().nInternalFaces() > 0)
{ {
const scalarField sumPhi(fvc::surfaceSum(mag(phi_))); const scalarField sumPhi
(
fvc::surfaceSum(mag(phi_))().internalField()
/ (deltaRho_.internalField() + ROOTVSMALL)
);
const scalarField& V = regionMesh().V(); forAll(delta_, i)
forAll(deltaRho_, 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]));
} }
} }

View File

@ -100,6 +100,9 @@ protected:
//- Small delta //- Small delta
const dimensionedScalar deltaSmall_; const dimensionedScalar deltaSmall_;
//- Film thickness above which Courant number calculation in valid
scalar deltaCoLimit_;
// Thermo properties // Thermo properties