40 mixedFvPatchVectorField(p, iF),
43 psiName_(
"thermo:psi"),
49 refValue() = patchInternalField();
63 mixedFvPatchVectorField(p, iF),
67 UInf_(dict.
lookup(
"UInf")),
72 if (dict.
found(
"value"))
93 ) <<
" unphysical pInf specified (pInf <= 0.0)" 94 <<
"\n on patch " << this->patch().name()
95 <<
" of field " << this->internalField().name()
96 <<
" in file " << this->internalField().objectPath()
111 mixedFvPatchVectorField(ptf, p, iF, mapper),
114 psiName_(ptf.psiName_),
128 mixedFvPatchVectorField(sfspvf),
129 TName_(sfspvf.TName_),
130 pName_(sfspvf.pName_),
131 psiName_(sfspvf.psiName_),
135 gamma_(sfspvf.gamma_)
146 mixedFvPatchVectorField(sfspvf, iF),
147 TName_(sfspvf.TName_),
148 pName_(sfspvf.pName_),
149 psiName_(sfspvf.psiName_),
153 gamma_(sfspvf.gamma_)
161 if (!size() || updated())
177 scalar
R = 1.0/(ppsi[0]*pT[0]);
179 scalar MachInf =
mag(UInf_)/
sqrt(gamma_*R*TInf_);
184 <<
"\n on patch " << this->patch().name()
185 <<
" of field " << this->internalField().name()
186 <<
" in file " << this->internalField().objectPath()
219 sqrt((gamma_ + 1)/(gamma_ - 1))
220 *
atan(
sqrt((gamma_ - 1)/(gamma_ + 1)*(
sqr(MachInf) - 1)))
229 if (pp[facei] >= pInf_)
236 /(gamma_*
sqr(MachInf))*
mag(Ut[facei])*
log(pp[facei]/pInf_);
238 Up[facei] = Ut[facei] + fpp*nHatInf[facei];
241 scalar Mach =
mag(Up[facei])/
sqrt(gamma_/ppsi[facei]);
247 Up[facei] = U[facei];
248 valueFraction()[facei] = 0;
259 (2/(gamma_ - 1))*(1 + ((gamma_ - 1)/2)*
sqr(MachInf))
260 *
pow(pp[facei]/pInf_, (1 - gamma_)/gamma_)
270 sqrt((gamma_ + 1)/(gamma_ - 1))
271 *
atan(
sqrt((gamma_ - 1)/(gamma_ + 1)*(
sqr(Mach) - 1)))
274 scalar fpp = (nuMachInf - nuMachf)*
mag(Ut[facei]);
276 Up[facei] = Ut[facei] + fpp*nHatInf[facei];
281 <<
"unphysical subsonic inflow has been generated" 282 <<
"\n on patch " << this->patch().name()
283 <<
" of field " << this->internalField().name()
285 << this->internalField().objectPath()
291 mixedFvPatchVectorField::updateCoeffs();
298 writeEntryIfDifferent<word>(os,
"T",
"T", TName_);
299 writeEntryIfDifferent<word>(os,
"p",
"p", pName_);
300 writeEntryIfDifferent<word>(os,
"psi",
"thermo:psi", psiName_);
305 writeEntry(
"value", os);
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
dimensionedScalar log(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
volVectorField vectorField(fieldObject, mesh)
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
makePatchTypeField(fvPatchVectorField, SRFFreestreamVelocityFvPatchVectorField)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void write(Ostream &) const
Write.
A class for handling words, derived from string.
Foam::fvPatchFieldMapper.
virtual label size() const
Return size.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
This boundary condition provides a supersonic free-stream condition.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define R(A, B, C, D, E, F, K, M)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
dimensionedScalar atan(const dimensionedScalar &ds)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
supersonicFreestreamFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.