68 mixedFvPatchScalarField(p, iF),
76 qrName_(
"undefined-qr"),
94 mixedFvPatchScalarField(p, iF),
96 mode_(operationModeNames.read(dict.
lookup(
"mode"))),
120 case fixedHeatTransferCoeff:
124 if (dict.
found(
"thicknessLayers"))
126 dict.
lookup(
"thicknessLayers") >> thicknessLayers_;
127 dict.
lookup(
"kappaLayers") >> kappaLayers_;
136 if (qrName_ !=
"none")
138 if (dict.
found(
"qrPrevious"))
148 if (dict.
found(
"refValue"))
174 mixedFvPatchScalarField(ptf, p, iF, mapper),
179 relaxation_(ptf.relaxation_),
180 emissivity_(ptf.emissivity_),
181 qrRelaxation_(ptf.qrRelaxation_),
182 qrName_(ptf.qrName_),
183 thicknessLayers_(ptf.thicknessLayers_),
184 kappaLayers_(ptf.kappaLayers_)
194 q_.map(ptf.q_, mapper);
198 case fixedHeatTransferCoeff:
200 h_.map(ptf.h_, mapper);
206 if (qrName_ !=
"none")
208 qrPrevious_.map(ptf.qrPrevious_, mapper);
219 mixedFvPatchScalarField(tppsf),
225 Ta_(tppsf.Ta_,
false),
226 relaxation_(tppsf.relaxation_),
227 emissivity_(tppsf.emissivity_),
228 qrPrevious_(tppsf.qrPrevious_),
229 qrRelaxation_(tppsf.qrRelaxation_),
230 qrName_(tppsf.qrName_),
231 thicknessLayers_(tppsf.thicknessLayers_),
232 kappaLayers_(tppsf.kappaLayers_)
243 mixedFvPatchScalarField(tppsf, iF),
249 Ta_(tppsf.Ta_,
false),
250 relaxation_(tppsf.relaxation_),
251 emissivity_(tppsf.emissivity_),
252 qrPrevious_(tppsf.qrPrevious_),
253 qrRelaxation_(tppsf.qrRelaxation_),
254 qrName_(tppsf.qrName_),
255 thicknessLayers_(tppsf.thicknessLayers_),
256 kappaLayers_(tppsf.kappaLayers_)
267 mixedFvPatchScalarField::autoMap(m);
281 case fixedHeatTransferCoeff:
289 if (qrName_ !=
"none")
291 qrPrevious_.autoMap(m);
302 mixedFvPatchScalarField::rmap(ptf, addr);
305 refCast<const externalWallHeatFluxTemperatureFvPatchScalarField>(ptf);
315 q_.
rmap(tiptf.q_, addr);
319 case fixedHeatTransferCoeff:
321 h_.rmap(tiptf.h_, addr);
327 if (qrName_ !=
"none")
329 qrPrevious_.rmap(tiptf.qrPrevious_, addr);
344 if (qrName_ !=
"none")
349 + (1 - qrRelaxation_)*qrPrevious_;
358 refGrad() = (Q_/
gSum(patch().magSf()) + qr)/
kappa(Tp);
366 refGrad() = (q_ + qr)/
kappa(Tp);
372 case fixedHeatTransferCoeff:
374 scalar totalSolidRes = 0;
375 if (thicknessLayers_.size())
377 forAll(thicknessLayers_, iLayer)
379 const scalar l = thicknessLayers_[iLayer];
380 if (kappaLayers_[iLayer] > 0)
382 totalSolidRes += l/kappaLayers_[iLayer];
388 const scalar Ta = Ta_->value(this->db().time().timeOutputValue());
395 if (totalSolidRes > 0)
417 this->
kappa(Tp)*patch().deltaCoeffs()
426 const scalar hpmqr = hp[i] - qr[i]/Tp[i];
428 refValue()[i] = hpTa[i]/hpmqr;
429 valueFraction()[i] = hpmqr/(hpmqr + kappaDeltaCoeffs[i]);
433 refValue()[i] = (hpTa[i] + qr[i])/hp[i];
434 valueFraction()[i] = hp[i]/(hp[i] + kappaDeltaCoeffs[i]);
442 valueFraction() = relaxation_*valueFraction() + (1 - relaxation_);
443 refValue() = relaxation_*refValue() + (1 - relaxation_)*Tp;
445 mixedFvPatchScalarField::updateCoeffs();
451 Info<< patch().boundaryMesh().mesh().name() <<
':' 452 << patch().name() <<
':' 453 << this->internalField().name() <<
" :" 454 <<
" heat transfer rate:" << Q
455 <<
" walltemperature " 456 <<
" min:" <<
gMin(*
this)
457 <<
" max:" <<
gMax(*
this)
486 q_.writeEntry(
"q", os);
490 case fixedHeatTransferCoeff:
492 h_.writeEntry(
"h", os);
507 if (thicknessLayers_.size())
509 thicknessLayers_.writeEntry(
"thicknessLayers", os);
510 kappaLayers_.writeEntry(
"kappaLayers", os);
519 if (qrName_ !=
"none")
524 qrPrevious_.writeEntry(
"qrPrevious", os);
527 refValue().writeEntry(
"refValue", os);
528 refGrad().writeEntry(
"refGradient", os);
529 valueFraction().writeEntry(
"valueFraction", os);
530 writeEntry(
"value", os);
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Type gMin(const FieldField< Field, Type > &f)
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
Initialise the NamedEnum HashTable from the static list of names.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
makePatchTypeField(fvPatchVectorField, SRFFreestreamVelocityFvPatchVectorField)
Type gSum(const FieldField< Field, Type > &f)
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
const Type & value() const
Return const reference to value.
virtual label size() const
Return size.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Type gMax(const FieldField< Field, Type > &f)
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
dimensionedScalar pow3(const dimensionedScalar &ds)
static const NamedEnum< operationMode, 3 > operationModeNames
void setSize(const label)
Reset size of List.
Common functions used in temperature coupled boundaries.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
operationMode
Operation mode enumeration.
Type gAverage(const FieldField< Field, Type > &f)
virtual void operator=(const UList< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensionedScalar pow4(const dimensionedScalar &ds)
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
externalWallHeatFluxTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
void write(Ostream &) const
Write.
This boundary condition applies a heat flux condition to temperature on an external wall in one of th...
void write(Ostream &) const
Write.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.