Skip to content
Snippets Groups Projects
Commit f125005e authored by andy's avatar andy
Browse files

ENH: Surface films - updated Co number calculation

parent de772cfd
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -879,22 +879,19 @@ scalar kinematicSingleLayer::CourantNumber() const
if (regionMesh().nInternalFaces() > 0)
{
const scalar deltaT = time_.deltaTValue();
const scalarField sumPhi(fvc::surfaceSum(mag(phi_)));
const surfaceScalarField SfUfbyDelta
(
regionMesh().surfaceInterpolation::deltaCoeffs()*mag(phi_)
);
const surfaceScalarField rhoDelta(fvc::interpolate(rho_*delta_));
const surfaceScalarField& magSf = regionMesh().magSf();
const scalarField& V = regionMesh().V();
forAll(rhoDelta, i)
forAll(deltaRho_, i)
{
if (rhoDelta[i] > ROOTVSMALL)
if (deltaRho_[i] > SMALL)
{
CoNum = max(CoNum, SfUfbyDelta[i]/rhoDelta[i]/magSf[i]*deltaT);
CoNum = max(CoNum, sumPhi[i]/deltaRho_[i]/V[i]);
}
}
CoNum *= 0.5*time_.deltaTValue();
}
reduce(CoNum, maxOp<scalar>());
......
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