45 patch().boundaryMesh().mesh()
50 qByKappa = sumq/
kappa();
71 patch().boundaryMesh().mesh()
74 sumKappaByDeltaNbr = ttm.
kappaEff(patch().index())*patch().deltaCoeffs();
76 sumKappaTByDeltaNbr = sumKappaByDeltaNbr()*patchInternalField();
78 qNbr = ttm.
qCorr(patch().index());
89 patch().boundaryMesh().mesh()
95 internalField().name()
100 qNbr = ttm.
qCorr(patch().index());
112 result.
ref() += field;
122 result = field().clone();
138 mixedFvPatchScalarField(
p, iF,
dict, false),
139 TnbrName_(
dict.lookupOrDefault<
word>(
"Tnbr",
"T")),
140 qrNbrName_(
dict.lookupOrDefault<
word>(
"qrNbr",
"none")),
141 qrName_(
dict.lookupOrDefault<
word>(
"qr",
"none")),
156 if (
dict.found(
"thicknessLayers"))
158 dict.lookup(
"thicknessLayers") >> thicknessLayers_;
159 dict.lookup(
"kappaLayers") >> kappaLayers_;
161 if (thicknessLayers_.
size() > 0)
164 forAll(thicknessLayers_, i)
166 wallKappaByDelta_ += thicknessLayers_[i]/kappaLayers_[i];
168 wallKappaByDelta_ = 1/wallKappaByDelta_;
172 if (
dict.found(
"qs"))
174 if (
dict.found(
"Qs"))
177 <<
"Either qs or Qs should be specified, not both"
183 else if (
dict.found(
"Qs"))
185 Qs_ =
dict.lookup<scalar>(
"Qs");
191 if (
dict.found(
"refValue"))
217 mixedFvPatchScalarField(psf,
p, iF, mapper),
218 TnbrName_(psf.TnbrName_),
219 qrNbrName_(psf.qrNbrName_),
220 qrName_(psf.qrName_),
221 thicknessLayers_(psf.thicknessLayers_),
222 kappaLayers_(psf.kappaLayers_),
226 ? mapper(psf.qs_()).ptr()
230 wallKappaByDelta_(psf.wallKappaByDelta_)
241 mixedFvPatchScalarField(psf, iF),
242 TnbrName_(psf.TnbrName_),
243 qrNbrName_(psf.qrNbrName_),
244 qrName_(psf.qrName_),
245 thicknessLayers_(psf.thicknessLayers_),
246 kappaLayers_(psf.kappaLayers_),
249 wallKappaByDelta_(psf.wallKappaByDelta_)
271 refCast<const fvMesh>(mpp.
nbrMesh()).boundary()[patchiNbr];
276 if (!isA<coupledTemperatureFvPatchScalarField>(TpNbr))
279 <<
"Patch field for " << internalField().name() <<
" on "
280 << this->patch().name() <<
" is of type "
281 << coupledTemperatureFvPatchScalarField::typeName
282 <<
endl <<
"The neighbouring patch field "
283 << internalField().
name() <<
" on "
284 << patchNbr.
name() <<
" is required to be the same, but is "
289 refCast<const coupledTemperatureFvPatchScalarField>(TpNbr);
298 if (qrName_ !=
"none")
300 sumq += patch().lookupPatchField<
volScalarField, scalar>(qrName_);
303 if (qrNbrName_ !=
"none")
317 getThis(
kappa, sumKappaTByDelta, sumKappaByDelta, sumq, qByKappa);
325 if (wallKappaByDelta_ == 0)
327 coupledTemperatureNbr.
getNbr
341 coupledTemperatureNbr.
getNbr(TwNbr, qNbr);
353 this->valueFraction() =
354 sumKappaByDelta()/(
kappa()*patch().deltaCoeffs() + sumKappaByDelta());
356 this->refValue() = (sumKappaTByDelta() + sumq)/sumKappaByDelta();
358 this->refGrad() = qByKappa;
360 mixedFvPatchScalarField::updateCoeffs();
366 Info<< patch().boundaryMesh().mesh().name() <<
':'
367 << patch().name() <<
':'
368 << this->internalField().name() <<
" <- "
370 << patchNbr.
name() <<
':'
371 << this->internalField().name() <<
" :"
372 <<
" heat transfer rate:" << Q
373 <<
" walltemperature "
374 <<
" min:" <<
gMin(*
this)
375 <<
" max:" <<
gMax(*
this)
392 writeEntryIfDifferent<word>(os,
"Tnbr",
"T", TnbrName_);
393 writeEntryIfDifferent<word>(os,
"qrNbr",
"none", qrNbrName_);
394 writeEntryIfDifferent<word>(os,
"qr",
"none", qrName_);
400 else if (qs_.valid())
405 if (thicknessLayers_.size())
407 writeEntry(os,
"thicknessLayers", thicknessLayers_);
428 turbulentTemperatureCoupledBaffleMixed,
429 "compressible::turbulentTemperatureCoupledBaffleMixed"
437 turbulentTemperatureCoupledBaffleMixed,
438 "compressible::turbulentTemperatureCoupledBaffleMixed"
447 turbulentTemperatureRadCoupledMixed,
448 "compressible::turbulentTemperatureRadCoupledMixed"
456 turbulentTemperatureRadCoupledMixed,
457 "compressible::turbulentTemperatureRadCoupledMixed"
#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...
Generic GeometricField class.
const word & name() const
Return name.
virtual const fileName & name() const
Return the name of the stream.
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,...
static int & msgType()
Message tag of standard messages.
Mixed boundary condition for temperature, to be used for heat-transfer with another region in a CHT c...
virtual void getThis(tmp< scalarField > &kappa, tmp< scalarField > &sumKappaTByDelta, tmp< scalarField > &sumKappaByDelta, scalarField &qTot, tmp< scalarField > &qByKappa) const
Get the patch kappa, kappa*Tc/delta and kappa/delta and also the.
virtual void write(Ostream &) const
Write.
virtual void getNbr(tmp< scalarField > &sumKappaTByDeltaNbr, tmp< scalarField > &sumKappaByDeltaNbr, tmp< scalarField > &qNbr) const
Get the neighbour patch kappa*Tc/delta and kappa/delta.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
coupledTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
void add(tmp< scalarField > &result, const tmp< scalarField > &field) const
Add field to result which may have not been previously set.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Foam::fvPatchFieldMapper.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void operator=(const UList< Type > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual const word & name() const
Return name.
const GeometricField::Patch & lookupPatchField(const word &name) const
Lookup and return the patchField of the named field from the.
Engine which provides mapping between two patches.
const polyPatch & nbrPolyPatch() const
Get the patch to map from.
static const mappedPatchBase & getMap(const polyPatch &patch)
Cast the given polyPatch to a mappedPatchBase. Handle errors.
const polyMesh & nbrMesh() const
Get the mesh for the region to map from.
static void validateMapForField(const PatchFieldType &field, const FieldType &iF, const dictionary &context, const label froms=from::any)
Validate that the map exists and is appropriate for the given.
tmp< Field< Type > > fromNeighbour(const Field< Type > &nbrFld) const
Map/interpolate the neighbour patch field to this patch.
label index() const
Return the index of this patch in the boundaryMesh.
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,.
bool isTmp() const
Return true if this is really a temporary object.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool valid(const PtrList< ModelType > &l)
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
tmp< SurfaceField< Type > > snGrad(const VolField< Type > &vf, const word &name)
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Type gSum(const FieldField< Field, Type > &f)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
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)
static const label differentPatch