31 void Foam::solvers::multicomponentFluid::setRDeltaT()
37 Info<<
"Time scales min/max:" <<
endl;
45 const scalar
maxCo(pimpleDict.lookup<scalar>(
"maxCo"));
51 if (pimpleDict.found(
"maxDeltaT"))
53 rDeltaT.max(1/pimpleDict.lookup<scalar>(
"maxDeltaT"));
55 if (pimpleDict.found(
"minDeltaT"))
57 rDeltaT.min(1/pimpleDict.lookup<scalar>(
"minDeltaT"));
61 << 1/
gMax(rDeltaT.primitiveField()) <<
", "
62 << 1/
gMin(rDeltaT.primitiveField()) <<
endl;
67 const scalar alphaTemp(pimpleDict.lookupOrDefault(
"alphaTemp", 0.05));
77 Info<<
" Temperature = "
78 << 1/(
gMax(rDeltaTT.field()) + vSmall) <<
", "
79 << 1/(
gMin(rDeltaTT.field()) + vSmall) <<
endl;
81 rDeltaT.ref() =
max(rDeltaT(), rDeltaTT);
85 if (pimpleDict.found(
"alphaY"))
89 const scalar alphaY(pimpleDict.lookup<scalar>(
"alphaY"));
91 const dictionary Yref(pimpleDict.subDict(
"Yref"));
113 if (Yref.found(Yi.name()))
116 scalar Yrefi = Yref.lookup<scalar>(Yi.name());
118 rDeltaTY.field() =
max
133 Info<<
" Composition = "
134 << 1/(
gMax(rDeltaTY.field()) + vSmall) <<
", "
135 << 1/(
gMin(rDeltaTY.field()) + vSmall) <<
endl;
137 rDeltaT.ref() =
max(rDeltaT(), rDeltaTY);
142 <<
"Cannot find any active species in Yref " << Yref
148 rDeltaT.correctBoundaryConditions();
151 const scalar rDeltaTSmoothingCoeff
153 pimpleDict.lookupOrDefault<scalar>(
"rDeltaTSmoothingCoeff", 0.1)
157 if (rDeltaTSmoothingCoeff < 1)
167 pimpleDict.found(
"rDeltaTDampingCoeff")
172 const scalar rDeltaTDampingCoeff
174 pimpleDict.lookup<scalar>(
"rDeltaTDampingCoeff")
180 (scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
185 rDeltaT.correctBoundaryConditions();
188 << 1/
gMax(rDeltaT.primitiveField())
189 <<
", " << 1/
gMin(rDeltaT.primitiveField()) <<
endl;
#define forAll(list, i)
Loop across all elements in list.
DimensionedField< Type, GeoMesh > Internal
Type of the internal field from which this GeometricField is derived.
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
label timeIndex() const
Return current time index.
virtual label startTimeIndex() const
Return start time index.
bool solve(label speciei) const
Return true if the specie should be solved for.
virtual const volScalarField & T() const =0
Temperature [K].
virtual const volScalarField & Cp() const =0
Heat capacity at constant pressure [J/kg/K].
const word & name() const
Return const reference to name.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
virtual const dictionary & dict() const
Return the solution dictionary.
pimpleNoLoopControl pimple
PIMPLE inner-loop controls.
const Time & runTime
Time.
const fvMesh & mesh
Region mesh.
const surfaceScalarField & phi
Mass-flux field.
tmp< volScalarField > trDeltaT
Optional LTS reciprocal time-step field.
const volScalarField & rho
Reference to the continuity density field.
const PtrList< volScalarField > & Y
Reference to the composition.
basicSpecieMixture & composition
PtrList< volScalarField > & Y_
autoPtr< combustionModel > reaction
const fluidMulticomponentThermo & thermo
Reference to the fluid thermophysical properties.
Provides functions smooth spread and sweep which use the FvFaceCellWave algorithm to smooth and redis...
#define WarningInFunction
Report a warning using Foam::Warning.
tmp< VolField< Type > > surfaceSum(const SurfaceField< Type > &ssf)
void smooth(volScalarField &field, const scalar coeff)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
VolField< scalar > volScalarField
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Type gMin(const FieldField< Field, Type > &f)
Type gMax(const FieldField< Field, Type > &f)