76 const scalar meshCoNum
78 0.5*
gMax(sumPhi/mesh.V().field())*runTime.deltaTValue()
81 const scalar meanMeshCoNum
83 0.5*(
gSum(sumPhi)/
gSum(mesh.V().field()))*runTime.deltaTValue()
86 Info<<
"Mesh Courant Number mean: " << meanMeshCoNum
87 <<
" max: " << meshCoNum <<
endl;
92 template<
class RhoType>
93 void Foam::solvers::fluidSolver::correctCoNum
104 CoNum = 0.5*
gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
107 0.5*(
gSum(sumPhi)/
gSum(mesh.V().field()))*runTime.deltaTValue();
120 void Foam::solvers::fluidSolver::correctCoNum
126 correctCoNum<volScalarField>(
rho, phi);
138 runTime.deltaTValue()
139 *
mag(contErr)().weightedAverage(mesh.V()).value();
142 runTime.deltaTValue()
166 if (mesh.schemes().steady())
168 continuityErrors(phi);
dimensioned< Type > weightedAverage(const DimensionedField< scalar, GeoMesh > &) const
Calculate and return weighted average.
Generic GeometricField class.
const dictionary & controlDict() const
Return the control dict.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Mesh data needed to do the Finite Volume discretisation.
bool dynamic() const
Is this mesh dynamic?
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
virtual const dictionary & dict() const
Return the solution dictionary.
Abstract base class for run-time selectable region solvers.
pimpleNoLoopControl pimple
PIMPLE inner-loop controls.
const Time & runTime
Time.
const fvMesh & mesh
Region mesh.
Base solver module for fluid solvers.
fluidSolver(fvMesh &mesh)
Construct from region mesh.
bool correctPhi
Switch to correct the flux after mesh change.
void continuityErrors(const surfaceScalarField &phi)
Calculate and print the continuity errors.
virtual scalar maxDeltaT() const
Return the current maximum time-step for stable solution.
void meshCourantNo() const
Check mesh Courant numbers for moving mesh cases.
virtual ~fluidSolver()
Destructor.
void readControls()
Read controls.
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
pimpleControl pimple(mesh)
Calculate the divergence of the given field.
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
Volume integrate volField creating a volField.
tmp< VolField< Type > > surfaceSum(const SurfaceField< Type > &ssf)
dimensioned< Type > domainIntegrate(const VolField< Type > &vf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
defineTypeNameAndDebug(compressibleMultiphaseVoF, 0)
Type gSum(const FieldField< Field, Type > &f)
Ostream & endl(Ostream &os)
Add newline and flush stream.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensioned< scalar > mag(const dimensioned< Type > &)
Type gMax(const FieldField< Field, Type > &f)