68 mixedFvPatchScalarField(p, iF),
76 qrName_(
"undefined-qr"),
94 mixedFvPatchScalarField(p, iF),
96 mode_(operationModeNames.read(dict.
lookup(
"mode"))),
120 case fixedHeatTransferCoeff:
125 if (dict.
found(
"thicknessLayers"))
127 dict.
lookup(
"thicknessLayers") >> thicknessLayers_;
128 dict.
lookup(
"kappaLayers") >> kappaLayers_;
137 if (qrName_ !=
"none")
139 if (dict.
found(
"qrPrevious"))
149 if (dict.
found(
"refValue"))
175 mixedFvPatchScalarField(ptf, p, iF, mapper),
180 relaxation_(ptf.relaxation_),
181 emissivity_(ptf.emissivity_),
182 qrRelaxation_(ptf.qrRelaxation_),
183 qrName_(ptf.qrName_),
184 thicknessLayers_(ptf.thicknessLayers_),
185 kappaLayers_(ptf.kappaLayers_)
198 case fixedHeatTransferCoeff:
205 if (qrName_ !=
"none")
207 mapper(qrPrevious_, ptf.qrPrevious_);
218 mixedFvPatchScalarField(tppsf),
224 Ta_(tppsf.Ta_,
false),
225 relaxation_(tppsf.relaxation_),
226 emissivity_(tppsf.emissivity_),
227 qrPrevious_(tppsf.qrPrevious_),
228 qrRelaxation_(tppsf.qrRelaxation_),
229 qrName_(tppsf.qrName_),
230 thicknessLayers_(tppsf.thicknessLayers_),
231 kappaLayers_(tppsf.kappaLayers_)
242 mixedFvPatchScalarField(tppsf, iF),
248 Ta_(tppsf.Ta_,
false),
249 relaxation_(tppsf.relaxation_),
250 emissivity_(tppsf.emissivity_),
251 qrPrevious_(tppsf.qrPrevious_),
252 qrRelaxation_(tppsf.qrRelaxation_),
253 qrName_(tppsf.qrName_),
254 thicknessLayers_(tppsf.thicknessLayers_),
255 kappaLayers_(tppsf.kappaLayers_)
266 mixedFvPatchScalarField::autoMap(m);
280 case fixedHeatTransferCoeff:
288 if (qrName_ !=
"none")
290 m(qrPrevious_, qrPrevious_);
301 mixedFvPatchScalarField::rmap(ptf, addr);
304 refCast<const externalWallHeatFluxTemperatureFvPatchScalarField>(ptf);
314 q_.
rmap(tiptf.q_, addr);
318 case fixedHeatTransferCoeff:
320 h_.rmap(tiptf.h_, addr);
326 if (qrName_ !=
"none")
328 qrPrevious_.rmap(tiptf.qrPrevious_, addr);
347 if (qrName_ !=
"none")
352 + (1 - qrRelaxation_)*qrPrevious_;
361 refGrad() = (Q_/
gSum(patch().magSf()) + qr)/
kappa(Tp);
369 refGrad() = (q_ + qr)/
kappa(Tp);
375 case fixedHeatTransferCoeff:
377 scalar totalSolidRes = 0;
378 if (thicknessLayers_.size())
380 forAll(thicknessLayers_, iLayer)
382 const scalar l = thicknessLayers_[iLayer];
383 if (kappaLayers_[iLayer] > 0)
385 totalSolidRes += l/kappaLayers_[iLayer];
391 const scalar Ta = Ta_->value(this->db().time().timeOutputValue());
398 if (totalSolidRes > 0)
420 this->
kappa(Tp)*patch().deltaCoeffs()
429 const scalar hpmqr = hp[i] - qr[i]/Tp[i];
431 refValue()[i] = hpTa[i]/hpmqr;
432 valueFraction()[i] = hpmqr/(hpmqr + kappaDeltaCoeffs[i]);
436 refValue()[i] = (hpTa[i] + qr[i])/hp[i];
437 valueFraction()[i] = hp[i]/(hp[i] + kappaDeltaCoeffs[i]);
446 relaxation_*valueFraction()
447 + (1 - relaxation_)*valueFraction0;
449 refValue() = relaxation_*refValue() + (1 - relaxation_)*refValue0;
451 mixedFvPatchScalarField::updateCoeffs();
457 Info<< patch().boundaryMesh().mesh().name() <<
':' 458 << patch().name() <<
':' 459 << this->internalField().name() <<
" :" 460 <<
" heat transfer rate:" << Q
461 <<
" walltemperature " 462 <<
" min:" <<
gMin(*
this)
463 <<
" max:" <<
gMax(*
this)
477 writeEntry(os,
"mode", operationModeNames[mode_]);
494 case fixedHeatTransferCoeff:
509 if (thicknessLayers_.size())
511 writeEntry(os,
"thicknessLayers", thicknessLayers_);
521 if (qrName_ !=
"none")
523 writeEntry(os,
"qrRelaxation", qrRelaxation_);
530 writeEntry(os,
"valueFraction", valueFraction());
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
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/m^2/K^4].
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
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)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
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.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
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)
static autoPtr< Function1< Type > > New(const word &entryName, const dictionary &dict)
Selector.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.