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 qgdFluxFvPatchScalarField& 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 qgdFluxFvPatchScalarField& 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>(
"tauQGDf")
179 const surfaceScalarField&
tauQGDf =
180 this->patch().boundaryMesh().mesh().
181 thisDb().lookupObject<surfaceScalarField>
184 scalarField fluxSnGrad
186 phiws.boundaryField()[patch().index()]
188 tauQGDf.boundaryField()[patch().index()]
192 this->gradient() = -fluxSnGrad;
197 fixedGradientFvPatchScalarField::updateCoeffs();
213 fixedGradientFvPatchScalarField::write(os);
214 writeEntry(
"value", os);
225 qgdFluxFvPatchScalarField
makePatchTypeField(fvPatchVectorField, cosVelocityFvPatchVectorField)
const surfaceScalarField & tauQGDf
virtual void write(Ostream &) const
Write.
qgdFluxFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
This boundary condition sets the pressure gradient to the provided value such that the flux on the bo...
virtual void updateCoeffs()
Update the patch pressure gradient field.