38 const DimensionedField<vector, volMesh>& iF
41 mixedFixedValueSlipFvPatchVectorField(p, iF),
44 psiName_(
"thermo:psi"),
47 accommodationCoeff_(1.0),
48 Uwall_(p.size(),
vector(0.0, 0.0, 0.0)),
56 const maxwellSlipUFvPatchVectorField& mspvf,
58 const DimensionedField<vector, volMesh>& iF,
59 const fvPatchFieldMapper& mapper
62 mixedFixedValueSlipFvPatchVectorField(mspvf, p, iF, mapper),
64 rhoName_(mspvf.rhoName_),
65 psiName_(mspvf.psiName_),
66 muName_(mspvf.muName_),
67 tauMCName_(mspvf.tauMCName_),
68 accommodationCoeff_(mspvf.accommodationCoeff_),
70 thermalCreep_(mspvf.thermalCreep_),
71 curvature_(mspvf.curvature_)
78 const DimensionedField<vector, volMesh>& iF,
79 const dictionary& dict
82 mixedFixedValueSlipFvPatchVectorField(p, iF),
83 TName_(dict.lookupOrDefault<word>(
"T",
"T")),
84 rhoName_(dict.lookupOrDefault<word>(
"rho",
"rho")),
85 psiName_(dict.lookupOrDefault<word>(
"psi",
"thermo:psi")),
86 muName_(dict.lookupOrDefault<word>(
"mu",
"thermo:mu")),
87 tauMCName_(dict.lookupOrDefault<word>(
"tauMC",
"tauMC")),
89 Uwall_(
"Uwall", dict, p.size()),
90 thermalCreep_(dict.lookupOrDefault(
"thermalCreep", true)),
91 curvature_(dict.lookupOrDefault(
"curvature", true))
95 mag(accommodationCoeff_) < SMALL
96 ||
mag(accommodationCoeff_) > 2.0
102 ) <<
"unphysical accommodationCoeff_ specified" 103 <<
"(0 < accommodationCoeff_ <= 1)" <<
endl 107 if (dict.found(
"value"))
114 if (dict.found(
"refValue") && dict.found(
"valueFraction"))
116 this->refValue() =
vectorField(
"refValue", dict, p.size());
117 this->valueFraction() =
122 this->refValue() = *
this;
123 this->valueFraction() = scalar(1);
131 const maxwellSlipUFvPatchVectorField& mspvf,
132 const DimensionedField<vector, volMesh>& iF
135 mixedFixedValueSlipFvPatchVectorField(mspvf, iF),
136 TName_(mspvf.TName_),
137 rhoName_(mspvf.rhoName_),
138 psiName_(mspvf.psiName_),
139 muName_(mspvf.muName_),
140 tauMCName_(mspvf.tauMCName_),
141 accommodationCoeff_(mspvf.accommodationCoeff_),
142 Uwall_(mspvf.Uwall_),
143 thermalCreep_(mspvf.thermalCreep_),
144 curvature_(mspvf.curvature_)
161 const fvPatchField<scalar>& ppsi =
166 sqrt(ppsi*constant::mathematical::piByTwo)
167 * (2.0 - accommodationCoeff_)/accommodationCoeff_
170 Field<scalar> pnu(pmu/prho);
171 valueFraction() = (1.0/(1.0 + patch().deltaCoeffs()*C1*pnu));
179 label patchi = this->patch().index();
181 Field<vector> gradpT(
fvc::grad(vsfT)().boundaryField()[patchi]);
184 refValue() -= 3.0*pnu/(4.0*pT)*
transform(
I -
n*
n, gradpT);
196 mixedFixedValueSlipFvPatchVectorField::updateCoeffs();
203 writeEntryIfDifferent<word>(os,
"T",
"T", TName_);
204 writeEntryIfDifferent<word>(os,
"rho",
"rho", rhoName_);
205 writeEntryIfDifferent<word>(os,
"psi",
"thermo:psi", psiName_);
206 writeEntryIfDifferent<word>(os,
"mu",
"thermo:mu", muName_);
207 writeEntryIfDifferent<word>(os,
"tauMC",
"tauMC", tauMCName_);
209 os.writeKeyword(
"accommodationCoeff")
211 Uwall_.writeEntry(
"Uwall", os);
212 os.writeKeyword(
"thermalCreep")
216 refValue().writeEntry(
"refValue", os);
217 valueFraction().writeEntry(
"valueFraction", os);
219 writeEntry(
"value", os);
230 maxwellSlipUFvPatchVectorField
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
virtual void write(Ostream &) const
Write.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
fvPatchField< vector > fvPatchVectorField
errorManipArg< error, int > exit(error &err, const int errNo=1)
friend Ostream & operator(Ostream &, const fvPatchField< Type > &)
GeometricField< tensor, fvPatchField, volMesh > volTensorField
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Vector< scalar > vector
A scalar version of the templated Vector.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void write(Ostream &) const
Write.
fvPatchField< tensor > fvPatchTensorField
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
makePatchTypeField(fvPatchVectorField, SRFFreestreamVelocityFvPatchVectorField)
stressControl lookup("compactNormalStress") >> compactNormalStress
static const Identity< scalar > I
fvPatchField< scalar > fvPatchScalarField
Calculate the gradient of the given field.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
maxwellSlipUFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
Tensor< scalar > tensor
Tensor of scalars.
dimensionSet transform(const dimensionSet &)