43 mixedFvPatchScalarField(
p, iF),
51 valueFraction() = 1.0;
64 mixedFvPatchScalarField(ptf,
p, iF, mapper),
80 mixedFvPatchScalarField(
p, iF),
82 Cp_(
dict.get<scalar>(
"Cp")),
83 mass_(
dict.get<scalar>(
"mass")),
90 valueFraction() = 1.0;
100 mixedFvPatchScalarField(tppsf),
115 mixedFvPatchScalarField(tppsf, iF),
130 mixedFvPatchScalarField::autoMap(mapper);
141 mixedFvPatchScalarField::rmap(ptf, addr);
155 if (updated() || (curTimeIndex_ == this->db().time().
timeIndex()))
164 const scalar deltaT(db().time().deltaTValue());
166 tmp<scalarField> tkappa(kappa(Tp));
173 Tp += -(Q/mass_/Cp_)*deltaT;
177 valueFraction() = 1.0;
179 mixedFvPatchScalarField::updateCoeffs();
190 Qout += q[facei]*magSf[facei];
192 else if (q[facei] < 0.0)
194 Qin += q[facei]*magSf[facei];
201 Info<<
patch().boundaryMesh().mesh().name() <<
':'
202 <<
patch().name() <<
':'
203 << this->internalField().name() <<
" :"
204 <<
" heat transfer rate:" << Q
205 <<
" wall temperature "
206 <<
" min:" <<
limits.min()
207 <<
" max:" <<
limits.max()
209 <<
" Qin [W]:" << Qin
210 <<
" Qout [W]:" << Qout
214 curTimeIndex_ = this->db().time().timeIndex();
226 os.writeEntry(
"Cp", Cp_);
227 os.writeEntry(
"mass", mass_);
238 lumpedMassWallTemperatureFvPatchScalarField
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...
@ MUST_READ
Reading required.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual void readDict(const dictionary &dict)
Read dictionary entries.
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...
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.
void write(Ostream &) const
Write.
virtual void rmap(const fvPatchField< scalar > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
lumpedMassWallTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void write(Ostream &) const
Write.
Common functions used in temperature coupled boundaries.
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 rmap(const fvPatchField< scalar > &, const labelList &)=0
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< scalarField > kappa(const scalarField &Tp) const
Given patch temperature calculate corresponding K field.
temperatureCoupledBase(const fvPatch &patch, const KMethodType method=KMethodType::mtFluidThermo)
Default construct from patch, using fluidThermo (default) or specified method.
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
Namespace for handling debugging switches.
const std::string patch
OpenFOAM patch number as a std::string.
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
static constexpr const zero Zero
Global zero (0).
fvPatchField< scalar > fvPatchScalarField
#define forAll(list, i)
Loop across all elements in list.