41 fixedValueFvPatchScalarField(p, iF),
59 fixedValueFvPatchScalarField(p, iF),
67 if (dict.
found(
"value"))
76 scalar p0 = pressure_->value(this->db().time().timeOutputValue());
91 fixedValueFvPatchScalarField(p, iF),
93 phiName_(ptf.phiName_),
94 rhoName_(ptf.rhoName_),
95 psiName_(ptf.psiName_),
97 pressure_(ptf.pressure_().clone().ptr())
100 const scalar t = this->db().time().timeOutputValue();
111 fixedValueFvPatchScalarField(ptf),
113 phiName_(ptf.phiName_),
114 rhoName_(ptf.rhoName_),
115 psiName_(ptf.psiName_),
119 ptf.pressure_.valid()
120 ? ptf.pressure_().clone().ptr()
133 fixedValueFvPatchScalarField(ptf, iF),
135 phiName_(ptf.phiName_),
136 rhoName_(ptf.rhoName_),
137 psiName_(ptf.psiName_),
141 ptf.pressure_.valid()
142 ? ptf.pressure_().clone().ptr()
160 scalar p0 = pressure_->value(this->db().time().timeOutputValue());
165 if (psiName_ ==
"none" && rhoName_ ==
"none")
169 else if (rhoName_ ==
"none")
176 scalar gM1ByG = (gamma_ - 1.0)/gamma_;
183 (1.0 + 0.5*psip*gM1ByG*(1.0 -
pos(phip))*
magSqr(Up)),
193 else if (psiName_ ==
"none")
202 FatalErrorIn(
"uniformTotalPressureFvPatchScalarField::updateCoeffs()")
203 <<
" rho or psi set inconsitently, rho = " << rhoName_
204 <<
", psi = " << psiName_ <<
".\n" 205 <<
" Set either rho or psi or neither depending on the " 206 "definition of total pressure.\n" 207 <<
" Set the unused variables to 'none'.\n" 208 <<
" on patch " << this->patch().name()
214 fixedValueFvPatchScalarField::updateCoeffs();
220 updateCoeffs(patch().lookupPatchField<volVectorField, vector>(UName_));
227 writeEntryIfDifferent<word>(os,
"U",
"U", UName_);
228 writeEntryIfDifferent<word>(os,
"phi",
"phi", phiName_);
232 pressure_->writeData(os);
233 writeEntry(
"value", os);
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
A class for handling words, derived from string.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Foam::fvPatchFieldMapper.
This boundary condition provides a time-varying form of the uniform total pressure boundary condition...
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual void write(Ostream &) const
Write.
virtual void write(Ostream &) const
Write.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Macros for easy insertion into run-time selection tables.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
rDeltaT dimensionedInternalField()
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar pos(const dimensionedScalar &ds)
makePatchTypeField(fvPatchVectorField, SRFFreestreamVelocityFvPatchVectorField)
uniformTotalPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
volScalarField scalarField(fieldObject, mesh)
virtual label size() const
Return size.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...