51 const word& modelType,
57 Tmin_(coeffs_.get<scalar>(
"min")),
58 Tmax_(coeffs_.get<scalar>(
"max")),
59 phase_(coeffs_.getOrDefault<
word>(
"phase",
word::null))
81 coeffs_.readEntry(
"min", Tmin_);
82 coeffs_.readEntry(
"max", Tmax_);
87 <<
"Minimum temperature limit cannot exceed maximum limit" <<
nl
88 <<
"min = " << Tmin_ <<
nl
96 <<
"Minimum temperature limit cannot be negative" <<
nl
126 scalar Tmin0 =
min(
T);
127 scalar Tmax0 =
max(
T);
137 const label celli = cells_[i];
138 if (hec[celli] < heMin[i])
140 hec[celli] = heMin[i];
143 else if (hec[celli] > heMax[i])
145 hec[celli] = heMax[i];
157 const auto percent = [](scalar num, label denom) -> scalar
159 return (denom ? 1
e-2*round(1e4*num/denom) : 0);
162 Info<<
type() <<
' ' << name_ <<
" Lower limited " << nBelowMin <<
" ("
163 << percent(nBelowMin, nTotCells)
164 <<
"%) of cells, with min limit " << Tmin_ <<
endl;
166 Info<<
type() <<
' ' << name_ <<
" Upper limited " << nAboveMax <<
" ("
167 << percent(nAboveMax, nTotCells)
168 <<
"%) of cells, with max limit " << Tmax_ <<
endl;
170 Info<<
type() <<
' ' << name_ <<
" Unlimited Tmin " << Tmin0 <<
endl;
171 Info<<
type() <<
' ' << name_ <<
" Unlimited Tmax " << Tmax0 <<
endl;
175 bool changedValues = (nBelowMin || nAboveMax);
196 if (hep[facei] < heMinp[facei])
198 hep[facei] = heMinp[facei];
199 changedValues =
true;
201 else if (hep[facei] > heMaxp[facei])
203 hep[facei] = heMaxp[facei];
204 changedValues =
true;
216 he.correctBoundaryConditions();
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
void resize(const label len)
Adjust allocated size of list.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
virtual bool read()
Re-read model coefficients if they have changed.
void size(const label n)
Older name for setAddressableSize.
Abstract base-class for fluid and solid thermodynamic properties.
static const word dictName
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
virtual bool fixesValue() const
Return true if this patch field fixes a value.
Intermediate abstract class for handling cell-set options for the derived fvOptions.
bool useSubMesh() const noexcept
True if sub-selection should be used.
Corrects temperature field (i.e. T) within a specified region by applying limits between a given mini...
word phase_
Optional phase name [K].
Base abstract class for handling finite volume options (i.e. fvOption).
const fvMesh & mesh_
Reference to the mesh database.
wordList fieldNames_
Field names to apply source to - populated by derived models.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const Type & lookupObject(const word &name, const bool recursive=false) const
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.