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_)
195 q_.setSize(mapper.
size());
196 q_.map(ptf.q_, mapper);
200 case fixedHeatTransferCoeff:
202 h_.setSize(mapper.
size());
203 h_.map(ptf.h_, mapper);
209 if (qrName_ !=
"none")
211 qrPrevious_.setSize(mapper.
size());
212 qrPrevious_.map(ptf.qrPrevious_, mapper);
223 mixedFvPatchScalarField(tppsf),
229 Ta_(tppsf.Ta_,
false),
230 relaxation_(tppsf.relaxation_),
231 emissivity_(tppsf.emissivity_),
232 qrPrevious_(tppsf.qrPrevious_),
233 qrRelaxation_(tppsf.qrRelaxation_),
234 qrName_(tppsf.qrName_),
235 thicknessLayers_(tppsf.thicknessLayers_),
236 kappaLayers_(tppsf.kappaLayers_)
247 mixedFvPatchScalarField(tppsf, iF),
253 Ta_(tppsf.Ta_,
false),
254 relaxation_(tppsf.relaxation_),
255 emissivity_(tppsf.emissivity_),
256 qrPrevious_(tppsf.qrPrevious_),
257 qrRelaxation_(tppsf.qrRelaxation_),
258 qrName_(tppsf.qrName_),
259 thicknessLayers_(tppsf.thicknessLayers_),
260 kappaLayers_(tppsf.kappaLayers_)
271 mixedFvPatchScalarField::autoMap(m);
285 case fixedHeatTransferCoeff:
293 if (qrName_ !=
"none")
295 qrPrevious_.autoMap(m);
306 mixedFvPatchScalarField::rmap(ptf, addr);
309 refCast<const externalWallHeatFluxTemperatureFvPatchScalarField>(ptf);
319 q_.
rmap(tiptf.q_, addr);
323 case fixedHeatTransferCoeff:
325 h_.rmap(tiptf.h_, addr);
331 if (qrName_ !=
"none")
333 qrPrevious_.rmap(tiptf.qrPrevious_, addr);
348 if (qrName_ !=
"none")
353 + (1 - qrRelaxation_)*qrPrevious_;
362 refGrad() = (Q_/
gSum(patch().magSf()) + qr)/
kappa(Tp);
370 refGrad() = (q_ + qr)/
kappa(Tp);
376 case fixedHeatTransferCoeff:
378 scalar totalSolidRes = 0;
379 if (thicknessLayers_.size())
381 forAll(thicknessLayers_, iLayer)
383 const scalar l = thicknessLayers_[iLayer];
384 if (kappaLayers_[iLayer] > 0)
386 totalSolidRes += l/kappaLayers_[iLayer];
392 const scalar Ta = Ta_->value(this->db().time().timeOutputValue());
399 if (totalSolidRes > 0)
421 this->
kappa(Tp)*patch().deltaCoeffs()
430 const scalar hpmqr = hp[i] - qr[i]/Tp[i];
432 refValue()[i] = hpTa[i]/hpmqr;
433 valueFraction()[i] = hpmqr/(hpmqr + kappaDeltaCoeffs[i]);
437 refValue()[i] = (hpTa[i] + qr[i])/hp[i];
438 valueFraction()[i] = hp[i]/(hp[i] + kappaDeltaCoeffs[i]);
446 valueFraction() = relaxation_*valueFraction() + (1 - relaxation_);
447 refValue() = relaxation_*refValue() + (1 - relaxation_)*Tp;
449 mixedFvPatchScalarField::updateCoeffs();
455 Info<< patch().boundaryMesh().mesh().name() <<
':' 456 << patch().name() <<
':' 457 << this->internalField().name() <<
" :" 458 <<
" heat transfer rate:" << Q
459 <<
" walltemperature " 460 <<
" min:" <<
gMin(*
this)
461 <<
" max:" <<
gMax(*
this)
490 q_.writeEntry(
"q", os);
494 case fixedHeatTransferCoeff:
496 h_.writeEntry(
"h", os);
511 if (thicknessLayers_.size())
513 thicknessLayers_.writeEntry(
"thicknessLayers", os);
514 kappaLayers_.writeEntry(
"kappaLayers", os);
523 if (qrName_ !=
"none")
528 qrPrevious_.writeEntry(
"qrPrevious", os);
531 refValue().writeEntry(
"refValue", os);
532 refGrad().writeEntry(
"refGradient", os);
533 valueFraction().writeEntry(
"valueFraction", os);
534 writeEntry(
"value", os);
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/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
virtual label size() const =0
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.
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.