31 #include "fvPatchFieldMapper.H"
32 #include "volFields.H"
33 #include "surfaceFields.H"
34 #include "addToRunTimeSelectionTable.H"
41 const DimensionedField<scalar, volMesh>& iF
44 fixedGradientFvPatchScalarField(p, iF)
51 const DimensionedField<scalar, volMesh>& iF,
52 const dictionary& dict
55 fixedGradientFvPatchScalarField(p, iF)
57 patchType() = dict.lookupOrDefault<word>(
"patchType", word::null);
59 if (dict.found(
"value") && dict.found(
"gradient"))
61 fvPatchField<scalar>::operator=
63 scalarField(
"value", dict, p.size())
65 gradient() = scalarField(
"gradient", dict, p.size());
69 fvPatchField<scalar>::operator=(patchInternalField());
77 const mQhdFluxFvPatchScalarField& ptf,
79 const DimensionedField<scalar, volMesh>& iF,
80 const fvPatchFieldMapper& mapper
83 fixedGradientFvPatchScalarField(p, iF)
85 patchType() = ptf.patchType();
89 gradient().map(ptf.gradient(), mapper);
98 scalarField::operator=
104 + gradient()*(patch().nf() & patch().delta())
111 this->map(ptf, mapper);
117 this->map(ptf, mapper);
124 const mQhdFluxFvPatchScalarField& wbppsf
127 fixedGradientFvPatchScalarField(wbppsf)
134 const DimensionedField<scalar, volMesh>& iF
137 fixedGradientFvPatchScalarField(wbppsf, iF)
167 if (this->patch().boundaryMesh().mesh().thisDb().
168 foundObject<surfaceScalarField>(
"phiwm")
171 const surfaceScalarField&
phiwm =
172 this->patch().boundaryMesh().mesh().
173 thisDb().lookupObject<surfaceScalarField>
176 if (this->patch().boundaryMesh().mesh().thisDb().
177 foundObject<surfaceScalarField>(
"coeffp")
180 const surfaceScalarField&
coeffp =
181 this->patch().boundaryMesh().mesh().
182 thisDb().lookupObject<surfaceScalarField>
185 scalarField fluxSnGrad
187 phiwm.boundaryField()[patch().index()]
189 coeffp.boundaryField()[patch().index()]
193 this->gradient() = fluxSnGrad;
197 fixedGradientFvPatchScalarField::updateCoeffs();
203 fixedGradientFvPatchScalarField::write(os);
204 writeEntry(
"value", os);
215 mQhdFluxFvPatchScalarField
makePatchTypeField(fvPatchVectorField, cosVelocityFvPatchVectorField)
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the patch pressure gradient field.
mQhdFluxFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
surfaceScalarField phiwm("phiwm", phiwo1 *0.0)
This boundary condition sets the pressure gradient to the provided value such that the flux on the bo...
surfaceScalarField coeffp("coeffp",)