CourantNos.H
Go to the documentation of this file.
1  #include "CourantNo.H"
2 
3 {
4  scalar UrCoNum = 0.5*gMax
5  (
6  fvc::surfaceSum(mag(phi1 - phi2))().primitiveField()/mesh.V().field()
7  )*runTime.deltaTValue();
8 
9  Info<< "Max Ur Courant Number = " << UrCoNum << endl;
10 
11  CoNum = max(CoNum, UrCoNum);
12 }
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::fvc::surfaceSum
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcSurfaceIntegrate.C:135
phi1
surfaceScalarField & phi1
Definition: setRegionFluidFields.H:12
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
phi2
surfaceScalarField & phi2
Definition: setRegionFluidFields.H:16
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
CoNum
scalar CoNum
Definition: compressibleCourantNo.H:31
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::gMax
Type gMax(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:592