48 patch().boundaryMesh().mesh()
60 qByKappa = sumq/
kappa;
76 mixedFvPatchScalarField(
p, iF,
dict, false),
91 db().time().userUnits(),
104 db().time().userUnits(),
116 db().time().userUnits(),
146 qrName_ !=
word::null
158 if (!haveQ_ && !haveq_ && !haveh_)
161 <<
"One or more of Q (heat power), q (heat flux), and h (heat "
162 <<
"transfer coefficient) must be specified"
166 if (thicknessLayers_.
size() != kappaLayers_.
size())
169 <<
"If either thicknessLayers or kappaLayers is specified, then "
170 <<
"both must be specified and be lists of the same length "
174 if (
dict.found(
"refValue"))
208 mixedFvPatchScalarField(ptf,
p, iF, mapper),
216 emissivity_(ptf.emissivity_),
217 thicknessLayers_(ptf.thicknessLayers_),
218 kappaLayers_(ptf.kappaLayers_),
220 qrName_(ptf.qrName_),
221 qrRelax_(ptf.qrRelax_),
224 qrName_ !=
word::null
225 ? mapper(ptf.qrPrevious_)()
238 mixedFvPatchScalarField(tppsf, iF),
239 haveQ_(tppsf.haveQ_),
241 haveq_(tppsf.haveq_),
243 haveh_(tppsf.haveh_),
245 Ta_(tppsf.Ta_, false),
246 emissivity_(tppsf.emissivity_),
247 thicknessLayers_(tppsf.thicknessLayers_),
248 kappaLayers_(tppsf.kappaLayers_),
249 relax_(tppsf.relax_),
250 qrName_(tppsf.qrName_),
251 qrRelax_(tppsf.qrRelax_),
252 qrPrevious_(tppsf.qrPrevious_)
264 mixedFvPatchScalarField::map(ptf, mapper);
267 refCast<const externalTemperatureFvPatchScalarField>(ptf);
271 mapper(qrPrevious_, tiptf.qrPrevious_);
281 mixedFvPatchScalarField::reset(ptf);
284 refCast<const externalTemperatureFvPatchScalarField>(ptf);
288 qrPrevious_.reset(tiptf.qrPrevious_);
307 + (1 - qrRelax_)*qrPrevious_;
315 sumq += Q_->value(db().time().value())/
gSum(patch().magSf());
319 sumq += q_->value(db().time().value());
342 scalar totalSolidRes = 0;
343 if (thicknessLayers_.size())
345 forAll(thicknessLayers_, iLayer)
347 const scalar l = thicknessLayers_[iLayer];
348 if (kappaLayers_[iLayer] > 0)
350 totalSolidRes += l/kappaLayers_[iLayer];
355 const scalar
h = h_->
value(this->db().time().value());
356 const scalar Ta = Ta_->value(this->db().time().value());
368 *((
pow3(Ta) +
pow3(Tw)) + Ta*Tw*(Ta + Tw))
375 sumKappaByDelta += hp;
376 sumKappaTByDelta += hp*Ta;
378 refValue() = sumKappaTByDelta/sumKappaByDelta;
386 sumKappaByDelta/(
kappa*patch().deltaCoeffs() + sumKappaByDelta);
388 refGrad() = qByKappa;
394 valueFraction() = 1 - relax_*(1 -
f);
395 refValue() = (
f*relax_*refValue() + (1 - relax_)*Tw)/valueFraction();
399 mixedFvPatchScalarField::updateCoeffs();
405 Info<< patch().boundaryMesh().mesh().name() <<
':'
406 << patch().name() <<
':'
407 << this->internalField().name() <<
" :"
408 <<
" heat transfer rate:" << Q
409 <<
" walltemperature "
410 <<
" min:" <<
gMin(*
this)
411 <<
" max:" <<
gMax(*
this)
440 db().time().userUnits(),
473 writeEntry(os,
"valueFraction", valueFraction());
493 externalWallHeatFluxTemperature,
494 "externalWallHeatFluxTemperature"
502 externalWallHeatFluxTemperature,
503 "externalWallHeatFluxTemperature"
#define forAll(list, i)
Loop across all elements in list.
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...
const dimensionSet & dimensions() const
Return dimensions.
Run-time selectable general function of one variable.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
const Type & value() const
Return const reference to value.
This boundary condition applies a heat flux condition to temperature on an external wall....
void write(Ostream &) const
Write.
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void map(const fvPatchScalarField &, const fieldMapper &)
Map the given fvPatchField onto this fvPatchField.
virtual void getKappa(scalarField &kappa, scalarField &sumKappaTByDelta, scalarField &sumKappaByDelta, scalarField &Tref, scalarField &Tw, scalarField &sumq, scalarField &qByKappa) const
Get the patch kappa, kappa*Tc/delta, kappa/delta,.
externalTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
Abstract base class for field mapping.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
friend Ostream & operator(Ostream &, const fvPatchField< Type > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Abstract base class for all fluid and solid thermophysical transport models.
virtual tmp< scalarField > qCorr(const label patchi) const =0
Return the patch heat flux correction [W/m^2].
virtual tmp< volScalarField > kappaEff() const =0
Effective thermal turbulent conductivity.
A class for managing temporary objects.
bool valid() const
Is this temporary object valid,.
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
const dimensionedScalar h
Planck constant.
tmp< SurfaceField< Type > > snGrad(const VolField< Type > &vf, const word &name)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Type gSum(const FieldField< Field, Type > &f)
void writeEntryIfDifferent(Ostream &os, const word &entryName, const EntryType &value1, const EntryType &value2)
Helper function to write the keyword and entry only if the.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimPower
const dimensionSet dimLength
const dimensionSet dimTemperature
List< scalar > scalarList
A List of scalars.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
addBackwardCompatibleToRunTimeSelectionTable(fvPatchScalarField, coupledTemperatureFvPatchScalarField, patchMapper, turbulentTemperatureCoupledBaffleMixed, "compressible::turbulentTemperatureCoupledBaffleMixed")
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
VolField< scalar > volScalarField
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Type gAverage(const FieldField< Field, Type > &f)
const dimensionSet dimArea
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
Type gMin(const FieldField< Field, Type > &f)
const dimensionSet dimThermalConductivity
Type gMax(const FieldField< Field, Type > &f)
const unitConversion unitFraction