mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: surface film - updated Courant number calculation
This commit is contained in:
@ -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]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user