Go to the documentation of this file.
43 mixedFvPatchVectorField(
p, iF),
46 psiName_(
"thermo:psi"),
52 refValue() = patchInternalField();
66 mixedFvPatchVectorField(
p, iF),
67 TName_(
dict.getOrDefault<
word>(
"T",
"T")),
68 pName_(
dict.getOrDefault<
word>(
"p",
"p")),
69 psiName_(
dict.getOrDefault<
word>(
"psi",
"thermo:psi")),
71 pInf_(
dict.
get<scalar>(
"pInf")),
72 TInf_(
dict.
get<scalar>(
"TInf")),
73 gamma_(
dict.
get<scalar>(
"gamma"))
77 if (
dict.found(
"value"))
96 <<
" unphysical pInf specified (pInf <= 0.0)"
97 <<
"\n on patch " << this->
patch().name()
98 <<
" of field " << this->internalField().name()
99 <<
" in file " << this->internalField().objectPath()
108 const supersonicFreestreamFvPatchVectorField& ptf,
110 const DimensionedField<vector, volMesh>& iF,
111 const fvPatchFieldMapper& mapper
114 mixedFvPatchVectorField(ptf,
p, iF, mapper),
117 psiName_(ptf.psiName_),
131 mixedFvPatchVectorField(sfspvf),
132 TName_(sfspvf.TName_),
133 pName_(sfspvf.pName_),
134 psiName_(sfspvf.psiName_),
138 gamma_(sfspvf.gamma_)
149 mixedFvPatchVectorField(sfspvf, iF),
150 TName_(sfspvf.TName_),
151 pName_(sfspvf.pName_),
152 psiName_(sfspvf.psiName_),
156 gamma_(sfspvf.gamma_)
164 if (!size() || updated())
169 const fvPatchField<scalar>& pT =
172 const fvPatchField<scalar>& pp =
175 const fvPatchField<scalar>& ppsi =
180 scalar
R = 1.0/(ppsi[0]*pT[0]);
182 scalar MachInf =
mag(UInf_)/
sqrt(gamma_*
R*TInf_);
187 <<
"\n on patch " << this->
patch().name()
188 <<
" of field " << this->internalField().name()
189 <<
" in file " << this->internalField().objectPath()
207 tmp<vectorField> nnInfHat = UInfHat ^
patch().nf();
222 sqrt((gamma_ + 1)/(gamma_ - 1))
223 *
atan(
sqrt((gamma_ - 1)/(gamma_ + 1)*(
sqr(MachInf) - 1)))
232 if (pp[facei] >= pInf_)
239 /(gamma_*
sqr(MachInf))*
mag(Ut[facei])*
log(pp[facei]/pInf_);
241 Up[facei] = Ut[facei] + fpp*nHatInf[facei];
244 scalar Mach =
mag(Up[facei])/
sqrt(gamma_/ppsi[facei]);
250 Up[facei] =
U[facei];
251 valueFraction()[facei] = 0;
262 (2/(gamma_ - 1))*(1 + ((gamma_ - 1)/2)*
sqr(MachInf))
263 *
pow(pp[facei]/pInf_, (1 - gamma_)/gamma_)
273 sqrt((gamma_ + 1)/(gamma_ - 1))
274 *
atan(
sqrt((gamma_ - 1)/(gamma_ + 1)*(
sqr(Mach) - 1)))
277 scalar fpp = (nuMachInf - nuMachf)*
mag(Ut[facei]);
279 Up[facei] = Ut[facei] + fpp*nHatInf[facei];
284 <<
"unphysical subsonic inflow has been generated"
285 <<
"\n on patch " << this->
patch().name()
286 <<
" of field " << this->internalField().name()
288 << this->internalField().objectPath()
294 mixedFvPatchVectorField::updateCoeffs();
308 writeEntry(
"value",
os);
319 supersonicFreestreamFvPatchVectorField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
virtual void operator=(const UList< Type > &)
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
A class for handling words, derived from Foam::string.
virtual void write(Ostream &) const
A class for managing temporary objects.
static constexpr const zero Zero
This boundary condition provides a supersonic free-stream condition.
Field< vector > vectorField
Specialisation of Field<T> for vector.
#define R(A, B, C, D, E, F, K, M)
Generic templated field type.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Lookup type of boundary radiation properties.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dimensionedScalar log(const dimensionedScalar &ds)
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
Vector< scalar > vector
A scalar version of the templated Vector.
virtual void updateCoeffs()
errorManipArg< error, int > exit(error &err, const int errNo=1)
fvPatchField< vector > fvPatchVectorField
supersonicFreestreamFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
#define FatalErrorInFunction
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedScalar atan(const dimensionedScalar &ds)
Ostream & writeEntry(const keyType &key, const T &value)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
#define FatalIOErrorInFunction(ios)
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...