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)),
57 const DimensionedField<vector, volMesh>& iF,
58 const dictionary& dict
61 mixedFixedValueSlipFvPatchVectorField(p, iF),
62 TName_(dict.lookupOrDefault<word>(
"T",
"T")),
63 rhoName_(dict.lookupOrDefault<word>(
"rho",
"rho")),
64 psiName_(dict.lookupOrDefault<word>(
"psi",
"thermo:psi")),
65 muName_(dict.lookupOrDefault<word>(
"mu",
"thermo:mu")),
66 tauMCName_(dict.lookupOrDefault<word>(
"tauMC",
"tauMC")),
67 accommodationCoeff_(dict.
lookup<scalar>(
"accommodationCoeff")),
68 Uwall_(
"Uwall", dict, p.size()),
69 thermalCreep_(dict.lookupOrDefault(
"thermalCreep", true)),
70 curvature_(dict.lookupOrDefault(
"curvature", true))
74 mag(accommodationCoeff_) < small
75 ||
mag(accommodationCoeff_) > 2.0
81 ) <<
"unphysical accommodationCoeff_ specified" 82 <<
"(0 < accommodationCoeff_ <= 1)" <<
endl 86 if (dict.found(
"value"))
93 if (dict.found(
"refValue") && dict.found(
"valueFraction"))
95 this->refValue() =
vectorField(
"refValue", dict, p.size());
96 this->valueFraction() =
101 this->refValue() = *
this;
102 this->valueFraction() = scalar(1);
110 const maxwellSlipUFvPatchVectorField& mspvf,
112 const DimensionedField<vector, volMesh>& iF,
113 const fvPatchFieldMapper& mapper
116 mixedFixedValueSlipFvPatchVectorField(mspvf, p, iF, mapper),
117 TName_(mspvf.TName_),
118 rhoName_(mspvf.rhoName_),
119 psiName_(mspvf.psiName_),
120 muName_(mspvf.muName_),
121 tauMCName_(mspvf.tauMCName_),
122 accommodationCoeff_(mspvf.accommodationCoeff_),
123 Uwall_(mapper(mspvf.Uwall_)),
124 thermalCreep_(mspvf.thermalCreep_),
125 curvature_(mspvf.curvature_)
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_)
152 const fvPatchFieldMapper& m
155 mixedFixedValueSlipFvPatchVectorField::autoMap(m);
166 mixedFixedValueSlipFvPatchVectorField::rmap(pvf, addr);
168 const maxwellSlipUFvPatchVectorField& mspvf =
169 refCast<const maxwellSlipUFvPatchVectorField>(pvf);
171 Uwall_.rmap(mspvf.Uwall_, addr);
186 const fvPatchField<scalar>& ppsi =
191 sqrt(ppsi*constant::mathematical::piByTwo)
192 * (2.0 - accommodationCoeff_)/accommodationCoeff_
195 Field<scalar> pnu(pmu/prho);
196 valueFraction() = (1.0/(1.0 + patch().deltaCoeffs()*C1*pnu));
204 label patchi = this->patch().index();
206 Field<vector> gradpT(
fvc::grad(vsfT)().boundaryField()[patchi]);
209 refValue() -= 3.0*pnu/(4.0*pT)*
transform(
I -
n*
n, gradpT);
221 mixedFixedValueSlipFvPatchVectorField::updateCoeffs();
228 writeEntryIfDifferent<word>(os,
"T",
"T", TName_);
229 writeEntryIfDifferent<word>(os,
"rho",
"rho", rhoName_);
230 writeEntryIfDifferent<word>(os,
"psi",
"thermo:psi", psiName_);
231 writeEntryIfDifferent<word>(os,
"mu",
"thermo:mu", muName_);
232 writeEntryIfDifferent<word>(os,
"tauMC",
"tauMC", tauMCName_);
234 writeEntry(os,
"accommodationCoeff", accommodationCoeff_);
236 writeEntry(os,
"thermalCreep", thermalCreep_);
240 writeEntry(os,
"valueFraction", valueFraction());
253 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
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.
List< label > labelList
A List of labels.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
#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.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
Tensor< scalar > tensor
Tensor of scalars.
dimensionSet transform(const dimensionSet &)