44 mixedFvPatchVectorField(p, iF),
50 refValue() = patchInternalField();
64 mixedFvPatchVectorField(ptf, p, iF, mapper),
79 mixedFvPatchVectorField(p, iF),
80 UInf_(dict.
lookup(
"UInf")),
85 if (dict.
found(
"value"))
105 "supersonicFreestreamFvPatchVectorField::"
106 "supersonicFreestreamFvPatchVectorField"
107 "(const fvPatch&, const vectorField&, const dictionary&)",
109 ) <<
" unphysical pInf specified (pInf <= 0.0)"
110 <<
"\n on patch " << this->patch().name()
111 <<
" of field " << this->dimensionedInternalField().name()
112 <<
" in file " << this->dimensionedInternalField().objectPath()
123 mixedFvPatchVectorField(sfspvf),
127 gamma_(sfspvf.gamma_)
137 mixedFvPatchVectorField(sfspvf, iF),
141 gamma_(sfspvf.gamma_)
149 if (!size() || updated())
165 scalar
R = 1.0/(ppsi[0]*pT[0]);
167 scalar MachInf =
mag(UInf_)/
sqrt(gamma_*R*TInf_);
173 "supersonicFreestreamFvPatchVectorField::updateCoeffs()"
174 ) <<
" MachInf < 1.0, free stream must be supersonic"
175 <<
"\n on patch " << this->patch().name()
176 <<
" of field " << this->dimensionedInternalField().name()
177 <<
" in file " << this->dimensionedInternalField().objectPath()
215 sqrt((gamma_ + 1)/(gamma_ - 1))
216 *
atan(
sqrt((gamma_ - 1)/(gamma_ + 1)*(
sqr(MachInf) - 1)))
225 if (pp[facei] >= pInf_)
232 /(gamma_*
sqr(MachInf))*
mag(Ut[facei])*
log(pp[facei]/pInf_);
234 Up[facei] = Ut[facei] + fpp*nHatInf[facei];
237 scalar Mach =
mag(Up[facei])/
sqrt(gamma_/ppsi[facei]);
243 Up[facei] = U[facei];
244 valueFraction()[facei] = 0;
255 (2/(gamma_ - 1))*(1 + ((gamma_ - 1)/2)*
sqr(MachInf))
256 *
pow(pp[facei]/pInf_, (1 - gamma_)/gamma_)
266 sqrt((gamma_ + 1)/(gamma_ - 1))
267 *
atan(
sqrt((gamma_ - 1)/(gamma_ + 1)*(
sqr(Mach) - 1)))
270 scalar fpp = (nuMachInf - nuMachf)*
mag(Ut[facei]);
272 Up[facei] = Ut[facei] + fpp*nHatInf[facei];
278 "supersonicFreestreamFvPatchVectorField::updateCoeffs()"
279 ) <<
"unphysical subsonic inflow has been generated"
280 <<
"\n on patch " << this->patch().name()
281 <<
" of field " << this->dimensionedInternalField().name()
283 << this->dimensionedInternalField().objectPath()
300 writeEntry(
"value", os);