30 #include "fvPatchFieldMapper.H"
31 #include "volFields.H"
32 #include "surfaceFields.H"
33 #include "addToRunTimeSelectionTable.H"
40 const DimensionedField<scalar, volMesh>& iF
43 fixedGradientFvPatchScalarField(p, iF)
50 const DimensionedField<scalar, volMesh>& iF,
51 const dictionary& dict
54 fixedGradientFvPatchScalarField(p, iF)
56 patchType() = dict.lookupOrDefault<word>(
"patchType", word::null);
58 if (dict.found(
"value") && dict.found(
"gradient"))
60 fvPatchField<scalar>::operator=
62 scalarField(
"value", dict, p.size())
64 gradient() = scalarField(
"gradient", dict, p.size());
68 fvPatchField<scalar>::operator=(patchInternalField());
76 const qhdFluxFvPatchScalarField& ptf,
78 const DimensionedField<scalar, volMesh>& iF,
79 const fvPatchFieldMapper& mapper
82 fixedGradientFvPatchScalarField(p, iF)
84 patchType() = ptf.patchType();
88 gradient().map(ptf.gradient(), mapper);
97 scalarField::operator=
103 + gradient()*(patch().nf() & patch().delta())
110 this->map(ptf, mapper);
116 this->map(ptf, mapper);
123 const qhdFluxFvPatchScalarField& wbppsf
126 fixedGradientFvPatchScalarField(wbppsf)
133 const DimensionedField<scalar, volMesh>& iF
136 fixedGradientFvPatchScalarField(wbppsf, iF)
166 if (this->patch().boundaryMesh().mesh().thisDb().
167 foundObject<surfaceScalarField>(
"phiwStar")
170 const surfaceScalarField& phiws =
171 this->patch().boundaryMesh().mesh().
172 thisDb().lookupObject<surfaceScalarField>
175 if (this->patch().boundaryMesh().mesh().thisDb().
176 foundObject<surfaceScalarField>(
"rhof")
179 if (this->patch().boundaryMesh().mesh().thisDb().
180 foundObject<surfaceScalarField>(
"tauQGDf")
183 const surfaceScalarField&
rhof =
184 this->patch().boundaryMesh().mesh().
185 thisDb().lookupObject<surfaceScalarField>
188 const surfaceScalarField&
tauQGDf =
189 this->patch().boundaryMesh().mesh().
190 thisDb().lookupObject<surfaceScalarField>
193 scalarField fluxSnGrad
195 phiws.boundaryField()[patch().index()]
197 tauQGDf.boundaryField()[patch().index()]
199 rhof.boundaryField()[patch().index()]
203 this->gradient() = -fluxSnGrad;
208 fixedGradientFvPatchScalarField::updateCoeffs();
224 fixedGradientFvPatchScalarField::write(os);
225 writeEntry(
"value", os);
236 qhdFluxFvPatchScalarField
makePatchTypeField(fvPatchVectorField, cosVelocityFvPatchVectorField)
This boundary condition sets the pressure gradient to the provided value such that the flux on the bo...
const surfaceScalarField & tauQGDf
virtual void write(Ostream &) const
Write.
qhdFluxFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the patch pressure gradient field.