36Foam::lumpedMassWallTemperatureFvPatchScalarField::
37lumpedMassWallTemperatureFvPatchScalarField
43 mixedFvPatchScalarField(
p, iF),
58 valueFraction() = 1.0;
62Foam::lumpedMassWallTemperatureFvPatchScalarField::
63lumpedMassWallTemperatureFvPatchScalarField
71 mixedFvPatchScalarField(ptf,
p, iF, mapper),
79Foam::lumpedMassWallTemperatureFvPatchScalarField::
80lumpedMassWallTemperatureFvPatchScalarField
87 mixedFvPatchScalarField(
p, iF),
89 Cp_(
dict.get<scalar>(
"Cp")),
90 mass_(
dict.get<scalar>(
"mass")),
94 valueFraction() = 1.0;
101Foam::lumpedMassWallTemperatureFvPatchScalarField::
102lumpedMassWallTemperatureFvPatchScalarField
107 mixedFvPatchScalarField(tppsf),
115Foam::lumpedMassWallTemperatureFvPatchScalarField::
116lumpedMassWallTemperatureFvPatchScalarField
122 mixedFvPatchScalarField(tppsf, iF),
137 mixedFvPatchScalarField::autoMap(mapper);
148 mixedFvPatchScalarField::rmap(ptf, addr);
162 if (updated() || (curTimeIndex_ == this->db().time().
timeIndex()))
171 const scalar deltaT(db().time().deltaTValue());
178 const scalar Q =
gSum(q*magSf);
180 Tp += -(Q/mass_/Cp_)*deltaT;
184 valueFraction() = 1.0;
186 mixedFvPatchScalarField::updateCoeffs();
197 Qout += q[facei]*magSf[facei];
199 else if (q[facei] < 0.0)
201 Qin += q[facei]*magSf[facei];
205 Info<< patch().boundaryMesh().mesh().name() <<
':'
206 << patch().name() <<
':'
207 << this->internalField().name() <<
" :"
208 <<
" heat transfer rate:" << Q
209 <<
" wall temperature "
210 <<
" min:" <<
gMin(*
this)
211 <<
" max:" <<
gMax(*
this)
213 <<
" Qin [W]:" << Qin
214 <<
" Qout [W]:" << Qout
218 curTimeIndex_ = this->db().time().timeIndex();
227 mixedFvPatchScalarField::write(
os);
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void operator=(const UList< scalar > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Employs a lumped mass model for temperature.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void rmap(const fvPatchField< scalar > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Common functions used in temperature coupled boundaries.
virtual void autoMap(const fvPatchFieldMapper &)=0
Map (and resize as needed) from self given a mapping object.
virtual void rmap(const fvPatchField< scalar > &, const labelList &)=0
Reverse map the given fvPatchField onto this fvPatchField.
A class for managing temporary objects.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Type gSum(const FieldField< Field, Type > &f)
To & refCast(From &r)
Reference type cast template function.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Type gAverage(const FieldField< Field, Type > &f)
Type gMin(const FieldField< Field, Type > &f)
Type gMax(const FieldField< Field, Type > &f)
#define forAll(list, i)
Loop across all elements in list.