Go to the documentation of this file.
41 const DimensionedField<scalar, volMesh>& iF
44 mixedFvPatchScalarField(
p, iF),
47 psiName_(
"thermo:psi"),
49 accommodationCoeff_(1.0),
50 Twall_(
p.size(),
Zero),
55 valueFraction() = 0.0;
61 const smoluchowskiJumpTFvPatchScalarField& ptf,
63 const DimensionedField<scalar, volMesh>& iF,
64 const fvPatchFieldMapper& mapper
67 mixedFvPatchScalarField(ptf,
p, iF, mapper),
69 rhoName_(ptf.rhoName_),
70 psiName_(ptf.psiName_),
72 accommodationCoeff_(ptf.accommodationCoeff_),
81 const DimensionedField<scalar, volMesh>& iF,
82 const dictionary&
dict
85 mixedFvPatchScalarField(
p, iF),
86 UName_(
dict.getOrDefault<word>(
"U",
"U")),
87 rhoName_(
dict.getOrDefault<word>(
"rho",
"rho")),
88 psiName_(
dict.getOrDefault<word>(
"psi",
"thermo:psi")),
89 muName_(
dict.getOrDefault<word>(
"mu",
"thermo:mu")),
90 accommodationCoeff_(
dict.get<scalar>(
"accommodationCoeff")),
91 Twall_(
"Twall",
dict,
p.size()),
92 gamma_(
dict.getOrDefault<scalar>(
"gamma", 1.4))
96 mag(accommodationCoeff_) < SMALL
97 ||
mag(accommodationCoeff_) > 2.0
101 <<
"unphysical accommodationCoeff specified"
102 <<
"(0 < accommodationCoeff <= 1)" <<
endl
106 if (
dict.found(
"value"))
120 valueFraction() = 0.0;
126 const smoluchowskiJumpTFvPatchScalarField& ptpsf,
127 const DimensionedField<scalar, volMesh>& iF
130 mixedFvPatchScalarField(ptpsf, iF),
131 accommodationCoeff_(ptpsf.accommodationCoeff_),
132 Twall_(ptpsf.Twall_),
142 const fvPatchFieldMapper& m
145 mixedFvPatchScalarField::autoMap(m);
152 const fvPatchField<scalar>& ptf,
172 const fvPatchField<scalar>& ppsi =
178 const dictionary& thermophysicalProperties =
185 thermophysicalProperties.subDict(
"mixture").subDict(
"transport")
192 *2.0*gamma_/
Pr.
value()/(gamma_ + 1.0)
193 *(2.0 - accommodationCoeff_)/accommodationCoeff_
196 Field<scalar> aCoeff(prho.snGrad() - prho/C2);
197 Field<scalar> KEbyRho(0.5*
magSqr(pU));
199 valueFraction() = (1.0/(1.0 +
patch().deltaCoeffs()*C2));
203 mixedFvPatchScalarField::updateCoeffs();
212 os.writeEntryIfDifferent<word>(
"U",
"U", UName_);
213 os.writeEntryIfDifferent<word>(
"rho",
"rho", rhoName_);
214 os.writeEntryIfDifferent<word>(
"psi",
"thermo:psi", psiName_);
215 os.writeEntryIfDifferent<word>(
"mu",
"thermo:mu", muName_);
217 os.writeEntry(
"accommodationCoeff", accommodationCoeff_);
218 Twall_.writeEntry(
"Twall", os);
219 os.writeEntry(
"gamma", gamma_);
220 writeEntry(
"value", os);
231 smoluchowskiJumpTFvPatchScalarField
fvPatchField< scalar > fvPatchScalarField
List< label > labelList
A List of labels.
virtual void write(Ostream &) const
Write.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
static constexpr const zero Zero
Global zero (0)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
friend Ostream & operator(Ostream &, const fvPatchField< scalar > &)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type & value() const
Return const reference to value.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
smoluchowskiJumpTFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
dimensionedScalar Pr("Pr", dimless, laminarTransport)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual void write(Ostream &) const
Write.
word dictName() const
The local dictionary name (final part of scoped name)
Macros for easy insertion into run-time selection tables.
Vector< scalar > vector
A scalar version of the templated Vector.
errorManipArg< error, int > exit(error &err, const int errNo=1)
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual void rmap(const fvPatchField< scalar > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
fvPatchField< vector > fvPatchVectorField
constexpr scalar piByTwo(0.5 *M_PI)
const std::string patch
OpenFOAM patch number as a std::string.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void operator=(const UList< Type > &)