33 void Foam::solvers::isothermalFluid::setRDeltaT()
43 pimpleDict.lookupOrDefault<scalar>(
"maxCo", 0.8)
46 const scalar rDeltaTSmoothingCoeff
48 pimpleDict.lookupOrDefault<scalar>(
"rDeltaTSmoothingCoeff", 0.02)
54 rDeltaT.internalFieldRef() =
62 rDeltaT.internalFieldRef() =
71 scalar minRDeltaT =
gMin(rDeltaT.primitiveField());
72 if (pimpleDict.found(
"maxDeltaT") || minRDeltaT < rootVSmall)
74 const scalar clipRDeltaT = 1/pimpleDict.lookup<scalar>(
"maxDeltaT");
75 rDeltaT.max(clipRDeltaT);
76 minRDeltaT =
max(minRDeltaT, clipRDeltaT);
78 if (pimpleDict.found(
"minDeltaT"))
80 const scalar clipRDeltaT = 1/pimpleDict.lookup<scalar>(
"minDeltaT");
81 rDeltaT.min(clipRDeltaT);
82 minRDeltaT =
min(minRDeltaT, clipRDeltaT);
85 Info<<
"Flow time scale min/max = "
86 <<
gMin(1/rDeltaT.primitiveField()) <<
", " << 1/minRDeltaT <<
endl;
89 rDeltaT.correctBoundaryConditions();
91 if (rDeltaTSmoothingCoeff < 1.0)
96 Info<<
"Smoothed flow time scale min/max = "
97 <<
gMin(1/rDeltaT.primitiveField())
98 <<
", " <<
gMax(1/rDeltaT.primitiveField()) <<
endl;
105 pimpleDict.found(
"rDeltaTDampingCoeff")
110 const scalar rDeltaTDampingCoeff
112 pimpleDict.lookup<scalar>(
"rDeltaTDampingCoeff")
117 *
max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff);
119 Info<<
"Damped flow time scale min/max = "
120 <<
gMin(1/rDeltaT.primitiveField())
121 <<
", " <<
gMax(1/rDeltaT.primitiveField()) <<
endl;
label timeIndex() const
Return current time index.
virtual label startTimeIndex() const
Return start time index.
bool transonic() const
Flag to indicate to solve using transonic algorithm.
virtual const volScalarField & psi() const =0
Compressibility [s^2/m^2].
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 volVectorField & U
Velocity field.
const volScalarField & rho
Reference to the continuity density field.
const fluidThermo & thermo
Reference to the fluid thermophysical properties.
Calculate the face-flux of the given field.
Provides functions smooth spread and sweep which use the FvFaceCellWave algorithm to smooth and redis...
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
const volScalarField & psi
tmp< VolField< Type > > surfaceSum(const SurfaceField< Type > &ssf)
tmp< SurfaceField< typename innerProduct< vector, Type >::type > > flux(const VolField< Type > &vf)
Return the face-flux field obtained from the given volVectorField.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
void smooth(volScalarField &field, const scalar coeff)
Ostream & endl(Ostream &os)
Add newline and flush stream.
SurfaceField< scalar > surfaceScalarField
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)