44 mixedFvPatchScalarField(
p, iF,
dict, false),
46 Q_(haveQ_ ?
dict.lookup<scalar>(
"Q") :
NaN),
52 emissivity_(
dict.lookupOrDefault<scalar>(
"emissivity", 0)),
61 relaxation_(
dict.lookupOrDefault<scalar>(
"relaxation", 1)),
63 qrRelaxation_(
dict.lookupOrDefault<scalar>(
"qrRelaxation", 1)),
75 if (!haveQ_ && !haveq_ && !haveh_)
78 <<
"One or more of Q (heat power), q (heat flux), and h (heat "
79 <<
"transfer coefficient) must be specified"
83 if (thicknessLayers_.
size() != kappaLayers_.
size())
86 <<
"If either thicknessLayers or kappaLayers is specified, then "
87 <<
"both must be specified and be lists of the same length "
91 if (
dict.found(
"refValue"))
117 mixedFvPatchScalarField(ptf,
p, iF, mapper),
125 emissivity_(ptf.emissivity_),
126 thicknessLayers_(ptf.thicknessLayers_),
127 kappaLayers_(ptf.kappaLayers_),
128 relaxation_(ptf.relaxation_),
129 qrName_(ptf.qrName_),
130 qrRelaxation_(ptf.qrRelaxation_),
133 qrName_ !=
word::null
134 ? mapper(ptf.qrPrevious_)()
147 mixedFvPatchScalarField(tppsf, iF),
148 haveQ_(tppsf.haveQ_),
150 haveq_(tppsf.haveq_),
152 haveh_(tppsf.haveh_),
154 Ta_(tppsf.Ta_, false),
155 emissivity_(tppsf.emissivity_),
156 thicknessLayers_(tppsf.thicknessLayers_),
157 kappaLayers_(tppsf.kappaLayers_),
158 relaxation_(tppsf.relaxation_),
159 qrName_(tppsf.qrName_),
160 qrRelaxation_(tppsf.qrRelaxation_),
161 qrPrevious_(tppsf.qrPrevious_)
173 mixedFvPatchScalarField::map(ptf, mapper);
176 refCast<const externalTemperatureFvPatchScalarField>(ptf);
180 mapper(q_, tiptf.q_);
185 mapper(h_, tiptf.h_);
190 mapper(qrPrevious_, tiptf.qrPrevious_);
200 mixedFvPatchScalarField::reset(ptf);
203 refCast<const externalTemperatureFvPatchScalarField>(ptf);
217 qrPrevious_.reset(tiptf.qrPrevious_);
242 + (1 - qrRelaxation_)*qrPrevious_;
250 qTot += Q_/
gSum(patch().magSf());
258 patch().boundaryMesh().mesh()
272 refGrad() = qTot/
kappa;
278 scalar totalSolidRes = 0;
279 if (thicknessLayers_.size())
281 forAll(thicknessLayers_, iLayer)
283 const scalar l = thicknessLayers_[iLayer];
284 if (kappaLayers_[iLayer] > 0)
286 totalSolidRes += l/kappaLayers_[iLayer];
291 const scalar Ta = Ta_->value(this->db().time().userTimeValue());
303 *((
pow3(Ta) +
pow3(Tp)) + Ta*Tp*(Ta + Tp))
314 kappa*patch().deltaCoeffs()
322 const scalar hpmqTot = hp[i] - qTot[i]/Tp[i];
323 refValue()[i] = hpTa[i]/hpmqTot;
324 valueFraction()[i] = hpmqTot/(hpmqTot + kappaDeltaCoeffs[i]);
328 refValue()[i] = (hpTa[i] + qTot[i])/hp[i];
329 valueFraction()[i] = hp[i]/(hp[i] + kappaDeltaCoeffs[i]);
336 relaxation_*valueFraction() + (1 - relaxation_)*valueFraction0;
338 relaxation_*refValue() + (1 - relaxation_)*refValue0;
340 mixedFvPatchScalarField::updateCoeffs();
346 Info<< patch().boundaryMesh().mesh().name() <<
':'
347 << patch().name() <<
':'
348 << this->internalField().name() <<
" :"
349 <<
" heat transfer rate:" << Q
350 <<
" walltemperature "
351 <<
" min:" <<
gMin(*
this)
352 <<
" max:" <<
gMax(*
this)
402 writeEntry(os,
"qrRelaxation", qrRelaxation_);
408 writeEntry(os,
"valueFraction", valueFraction());
428 externalWallHeatFluxTemperature,
429 "externalWallHeatFluxTemperature"
437 externalWallHeatFluxTemperature,
438 "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...
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,...
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 fvPatchFieldMapper &)
Map the given fvPatchField onto this fvPatchField.
externalTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
Foam::fvPatchFieldMapper.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
virtual void operator=(const UList< 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.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
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].
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)
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
Type gAverage(const FieldField< Field, Type > &f)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
Type gMin(const FieldField< Field, Type > &f)
Type gMax(const FieldField< Field, Type > &f)