38 const bool pRefRequired
71 scalar rhoRefMax = -GREAT;
72 scalar rhoRefMin = GREAT;
73 bool rhoLimits =
false;
77 if (pbf[patchi].fixesValue())
82 pMax =
max(pMax,
max(pbf[patchi]));
85 rhoRefMax =
max(rhoRefMax,
max(rhobf[patchi]));
86 rhoRefMin =
min(rhoRefMin,
min(rhobf[patchi]));
109 <<
"'pMaxFactor' specified rather than 'pMax'" <<
nl
110 <<
" but the corresponding reference pressure cannot"
111 " be evaluated from the boundary conditions." <<
nl
112 <<
" Please specify 'pMax' rather than 'pMaxFactor'"
124 <<
"'rhoMax' specified rather than 'pMax' or 'pMaxFactor'"
126 <<
" This is supported for backward-compatibility but"
127 " 'pMax' or 'pMaxFactor' are more reliable." <<
endl;
132 <<
"'rhoMax' specified rather than 'pMax'" <<
nl
133 <<
" but the corresponding reference pressure cannot"
134 " be evaluated from the boundary conditions." <<
nl
135 <<
" Please specify 'pMax' rather than 'rhoMax'"
142 <<
"'rhoMax' specified rather than 'pMaxFactor'" <<
nl
143 <<
" but the corresponding reference density cannot"
144 " be evaluated from the boundary conditions." <<
nl
145 <<
" Please specify 'pMaxFactor' rather than 'rhoMax'"
164 <<
"'pMinFactor' specified rather than 'pMin'" <<
nl
165 <<
" but the corresponding reference pressure cannot"
166 " be evaluated from the boundary conditions." <<
nl
167 <<
" Please specify 'pMin' rather than 'pMinFactor'"
179 <<
"'rhoMin' specified rather than 'pMin' or 'pMinFactor'" <<
nl
180 <<
" This is supported for backward-compatibility but"
181 " 'pMin' or 'pMinFactor' are more reliable." <<
endl;
186 <<
"'rhoMin' specified rather than 'pMin'" <<
nl
187 <<
" but the corresponding reference pressure cannot"
188 " be evaluated from the boundary conditions." <<
nl
189 <<
" Please specify 'pMin' rather than 'rhoMin'"
196 <<
"'rhoMin' specified rather than 'pMinFactor'" <<
nl
197 <<
" but the corresponding reference density cannot"
198 " be evaluated from the boundary conditions." <<
nl
199 <<
" Please specify 'pMinFactor' rather than 'rhoMin'"
210 if (limitMaxP_ || limitMinP_)
212 Info<<
"pressureControl" <<
nl;
233 if (limitMaxP_ || limitMinP_)
237 const scalar pMax =
max(
p).value();
239 if (pMax > pMax_.value())
241 Info<<
"pressureControl: p max " << pMax <<
endl;
const dimensionedScalar & pMin
const Boundary & boundaryField() const
Return const-reference to the boundary field.
friend complex limit(const complex &c1, const complex &c2)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
const Type & value() const
Return const reference to value.
Provides controls for the pressure reference is closed-volume simulations and a general method for li...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Find the reference cell nearest (in index) to the given cell but which is not on a cyclic,...
const dimensionedScalar rhoMin
const dimensionedScalar rhoMax
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
const dimensionSet dimPressure
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)
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.
const dimensionSet dimDensity
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool setRefCell(const volScalarField &field, const volScalarField &fieldRef, const dictionary &dict, label &refCelli, scalar &refValue, const bool forceReference=false)
If the field fieldRef needs referencing find the reference cell nearest.
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.