56 runTime.controlDict().lookupOrDefault<scalar>(
"maxCo", vGreat);
59 runTime.controlDict().found(
"maxDeltaT")
60 ? runTime.controlDict().lookup<scalar>(
"maxDeltaT", runTime.userUnits())
87 const scalar meshCoNum
89 0.5*
gMax(sumPhi/mesh.V().primitiveField())*runTime.deltaTValue()
92 const scalar meanMeshCoNum
95 *(
gSum(sumPhi)/
gSum(mesh.V().primitiveField()))
96 *runTime.deltaTValue()
99 Info<<
"Mesh Courant Number mean: " << meanMeshCoNum
100 <<
" max: " << meshCoNum <<
endl;
105 template<
class RhoType>
106 void Foam::solvers::fluidSolver::correctCoNum
117 CoNum_ = 0.5*
gMax(sumPhi/mesh.V().primitiveField())*runTime.deltaTValue();
121 *(
gSum(sumPhi)/
gSum(mesh.V().primitiveField()))
122 *runTime.deltaTValue();
135 void Foam::solvers::fluidSolver::correctCoNum
141 correctCoNum<volScalarField>(
rho, phi);
153 runTime.deltaTValue()
154 *
mag(contErr)().weightedAverage(mesh.V()).value();
157 runTime.deltaTValue()
181 if (mesh.schemes().steady())
183 continuityErrors(phi);
233 if (maxCo < vGreat && CoNum > small)
dimensioned< Type > weightedAverage(const DimensionedField< scalar, GeoMesh > &) const
Calculate and return weighted average.
Generic GeometricField class.
const IOdictionary & controlDict() const
Return the control dict.
Mesh data needed to do the Finite Volume discretisation.
const fvSolution & solution() const
Return the fvSolution.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
virtual bool modified() const
Return true if the object's file (or files for objectRegistry)
Abstract base class for run-time selectable region solvers.
const Time & runTime
Time.
const fvMesh & mesh
Region mesh.
virtual bool read()
Read controls.
Base solver module for fluid solvers.
fluidSolver(fvMesh &mesh)
Construct from region mesh.
void continuityErrors(const surfaceScalarField &phi)
Calculate and print the continuity errors.
virtual bool dependenciesModified() const
Return true if the solver's dependencies have been modified.
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.
virtual bool read()
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)