51 valueFraction() = 1.0;
58 const this_bctype& ptf,
64 parent_bctype(ptf,
p, iF, mapper),
83 mass_(
dict.
get<scalar>(
"mass")),
90 valueFraction() = 1.0;
97 const this_bctype& tppsf,
101 parent_bctype(tppsf, iF),
116 this->parent_bctype::autoMap(mapper);
127 this->parent_bctype::rmap(ptf, addr);
129 const auto& tiptf = refCast<const this_bctype>(ptf);
137 if (updated() || (curTimeIndex_ == this->db().time().
timeIndex()))
146 const scalar deltaT(db().time().deltaTValue());
148 tmp<scalarField> tkappa(
kappa(Tp));
155 Tp += -(Q/mass_/Cp_)*deltaT;
159 valueFraction() = 1.0;
161 this->parent_bctype::updateCoeffs();
172 Qout += q[facei]*magSf[facei];
174 else if (q[facei] < 0.0)
176 Qin += q[facei]*magSf[facei];
183 Info<<
patch().boundaryMesh().mesh().name() <<
':' 184 <<
patch().name() <<
':' 185 << this->internalField().name() <<
" :" 186 <<
" heat transfer rate:" << Q
187 <<
" wall temperature " 188 <<
" min:" <<
limits.min()
189 <<
" max:" <<
limits.max()
191 <<
" Qin [W]:" << Qin
192 <<
" Qout [W]:" << Qout
196 curTimeIndex_ = this->db().time().timeIndex();
208 os.writeEntry(
"Cp", Cp_);
209 os.writeEntry(
"mass", mass_);
220 lumpedMassWallTemperatureFvPatchScalarField
virtual void readDict(const dictionary &dict)
Read dictionary entries.
Type gWeightedSum(const UList< scalar > &weights, const UList< Type > &fld, const label comm)
The global weighted sum (integral) of a field, using the mag() of the weights.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void rmap(const fvPatchField< scalar > &, const labelList &)=0
Reverse map the given fvPatchField onto this fvPatchField.
virtual void autoMap(const fvPatchFieldMapper &)=0
Map (and resize as needed) from self given a mapping object.
void write(Ostream &os) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
fvPatchField< scalar > fvPatchScalarField
constexpr T & get(FixedList< T, N > &list) noexcept
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
virtual void rmap(const fvPatchField< scalar > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
int debug
Static debugging option.
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
Common functions used in temperature coupled boundaries.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void write(Ostream &) const
Write.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
static constexpr const zero Zero
Global zero (0)
lumpedMassWallTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.