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
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();
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()
183 continuityErrors(phi);
233 if (maxCo < vGreat && CoNum > small)
dimensioned< Type > weightedAverage(const DimensionedField< scalar, GeoMesh, PrimitiveField2 > &) 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 DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
const surfaceScalarField & phi() const
Return cell face motion fluxes.
const fvSchemes & schemes() const
Return the fvSchemes.
const fvSolution & solution() const
Return the fvSolution.
bool dynamic() const
Is this mesh dynamic?
bool steady() const
Return true if the default ddtScheme is steadyState.
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)
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
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.
dimensioned< Type > domainIntegrate(const VolField< Type > &vf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< VolInternalField< Type > > surfaceSum(const SurfaceField< Type > &ssf)
defineTypeNameAndDebug(compressibleMultiphaseVoF, 0)
Type gSum(const FieldField< Field, Type > &f)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
Type gMax(const FieldField< Field, Type > &f)