40 const DimensionedField<scalar, volMesh>& iF
43 fixedValueFvPatchScalarField(p, iF),
54 const DimensionedField<scalar, volMesh>& iF,
55 const dictionary&
dict 58 fixedValueFvPatchScalarField(p, iF, dict),
59 q_(
"q", dict, p.size()),
60 relax_(dict.lookupOrDefault<scalar>(
"relax", 1.0)),
61 Tmin_(dict.lookupOrDefault<scalar>(
"Tmin", 273))
68 const fixedMultiPhaseHeatFluxFvPatchScalarField& psf,
70 const DimensionedField<scalar, volMesh>& iF,
71 const fvPatchFieldMapper& mapper
74 fixedValueFvPatchScalarField(psf, p, iF, mapper),
84 const fixedMultiPhaseHeatFluxFvPatchScalarField& psf
87 fixedValueFvPatchScalarField(psf),
97 const fixedMultiPhaseHeatFluxFvPatchScalarField& psf,
98 const DimensionedField<scalar, volMesh>& iF
101 fixedValueFvPatchScalarField(psf, iF),
119 const phaseSystem& fluid =
121 db().lookupObject<phaseSystem>(
"phaseProperties")
132 const phaseModel& phase = fluid.phases()[
phasei];
133 const fluidThermo& thermo = phase.thermo();
136 phase.boundaryField()[patch().index()];
139 thermo.T().boundaryField()[patch().index()];
141 const scalarField kappaEff(phase.kappaEff(patch().index()));
148 Info<< patch().name() <<
" " << phase.name()
149 <<
": Heat flux " <<
gMin(q0) <<
" - " <<
gMax(q0) <<
endl;
152 A += T.patchInternalField()*alpha*kappaEff*patch().deltaCoeffs();
153 B += alpha*kappaEff*patch().deltaCoeffs();
158 Info<< patch().name() <<
" " <<
": overall heat flux " 159 <<
gMin(Q) <<
" - " <<
gMax(Q) <<
" W/m2, power: " 160 <<
gSum(patch().magSf()*Q) <<
" W" <<
endl;
163 operator==((1 - relax_)*Tp + relax_*
max(Tmin_,(q_ + A)/(B)));
165 fixedValueFvPatchScalarField::updateCoeffs();
171 const fvPatchFieldMapper& m
174 fixedValueFvPatchScalarField::autoMap(m);
185 fixedValueFvPatchScalarField::rmap(ptf, addr);
187 const fixedMultiPhaseHeatFluxFvPatchScalarField& mptf =
188 refCast<const fixedMultiPhaseHeatFluxFvPatchScalarField>(ptf);
190 q_.rmap(mptf.q_, addr);
210 fixedMultiPhaseHeatFluxFvPatchScalarField
#define forAll(list, i)
Loop across all elements in list.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Type gMin(const FieldField< Field, Type > &f)
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
Type gSum(const FieldField< Field, Type > &f)
fixedMultiPhaseHeatFluxFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
fvPatchField< scalar > fvPatchScalarField
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
List< label > labelList
A List of labels.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Type gMax(const FieldField< Field, Type > &f)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
virtual void write(Ostream &) const
Write.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)