31 void Foam::solvers::multicomponentFluid::setRDeltaT()
37 Info<<
"Time scales min/max:" <<
endl;
45 const scalar
maxCo(pimpleDict.lookup<scalar>(
"maxCo"));
48 rDeltaT.internalFieldRef() =
52 scalar minRDeltaT =
gMin(rDeltaT.primitiveField());
53 if (pimpleDict.found(
"maxDeltaT") || minRDeltaT < rootVSmall)
55 const scalar clipRDeltaT = 1/pimpleDict.lookup<scalar>(
"maxDeltaT");
56 rDeltaT.max(clipRDeltaT);
57 minRDeltaT =
max(minRDeltaT, clipRDeltaT);
59 if (pimpleDict.found(
"minDeltaT"))
61 const scalar clipRDeltaT = 1/pimpleDict.lookup<scalar>(
"minDeltaT");
62 rDeltaT.min(clipRDeltaT);
63 minRDeltaT =
min(minRDeltaT, clipRDeltaT);
66 Info<<
"Flow time scale min/max = "
67 <<
gMin(1/rDeltaT.primitiveField()) <<
", " << 1/minRDeltaT <<
endl;
72 const scalar alphaTemp(pimpleDict.lookupOrDefault(
"alphaTemp", 0.05));
82 Info<<
" Temperature = "
83 << 1/(
gMax(rDeltaTT.primitiveField()) + vSmall) <<
", "
84 << 1/(
gMin(rDeltaTT.primitiveField()) + vSmall) <<
endl;
86 rDeltaT.internalFieldRef() =
max(rDeltaT(), rDeltaTT);
90 if (pimpleDict.found(
"alphaY"))
94 const scalar alphaY(pimpleDict.lookup<scalar>(
"alphaY"));
96 const dictionary Yref(pimpleDict.subDict(
"Yref"));
118 if (Yref.found(Yi.name()))
121 scalar Yrefi = Yref.lookup<scalar>(Yi.name());
123 rDeltaTY.primitiveFieldRef() =
max
138 Info<<
" Composition = "
139 << 1/(
gMax(rDeltaTY.primitiveField()) + vSmall) <<
", "
140 << 1/(
gMin(rDeltaTY.primitiveField()) + vSmall) <<
endl;
142 rDeltaT.internalFieldRef() =
max(rDeltaT(), rDeltaTY);
147 <<
"Cannot find any active species in Yref " << Yref
153 rDeltaT.correctBoundaryConditions();
156 const scalar rDeltaTSmoothingCoeff
158 pimpleDict.lookupOrDefault<scalar>(
"rDeltaTSmoothingCoeff", 0.1)
162 if (rDeltaTSmoothingCoeff < 1)
172 pimpleDict.found(
"rDeltaTDampingCoeff")
177 const scalar rDeltaTDampingCoeff
179 pimpleDict.lookup<scalar>(
"rDeltaTDampingCoeff")
185 (scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
190 rDeltaT.correctBoundaryConditions();
193 << 1/
gMax(rDeltaT.primitiveField())
194 <<
", " << 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.
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.
bool solveSpecie(const label speciei) const
Should the given specie be solved for? I.e., is it active and.
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.
fluidMulticomponentThermo & thermo_
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)
Ostream & endl(Ostream &os)
Add newline and flush stream.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
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)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.