48 mixedFvPatchScalarField(p, iF),
50 TnbrName_(
"undefined-Tnbr"),
55 this->refValue() = 0.0;
56 this->refGrad() = 0.0;
57 this->valueFraction() = 1.0;
70 mixedFvPatchScalarField(ptf, p, iF, mapper),
72 TnbrName_(ptf.TnbrName_),
73 thicknessLayers_(ptf.thicknessLayers_),
74 kappaLayers_(ptf.kappaLayers_),
75 contactRes_(ptf.contactRes_)
87 mixedFvPatchScalarField(p, iF),
89 TnbrName_(dict.
lookup(
"Tnbr")),
94 if (!isA<mappedPatchBase>(this->patch().patch()))
97 <<
"' not type '" << mappedPatchBase::typeName <<
"'" 98 <<
"\n for patch " << p.
name()
99 <<
" of field " << internalField().name()
100 <<
" in file " << internalField().objectPath()
104 if (dict.
found(
"thicknessLayers"))
106 dict.
lookup(
"thicknessLayers") >> thicknessLayers_;
107 dict.
lookup(
"kappaLayers") >> kappaLayers_;
109 if (thicknessLayers_.size() > 0)
112 forAll(thicknessLayers_, iLayer)
114 contactRes_ += thicknessLayers_[iLayer]/kappaLayers_[iLayer];
116 contactRes_ = 1.0/contactRes_;
122 if (dict.
found(
"refValue"))
134 valueFraction() = 1.0;
146 mixedFvPatchScalarField(wtcsf, iF),
148 TnbrName_(wtcsf.TnbrName_),
149 thicknessLayers_(wtcsf.thicknessLayers_),
150 kappaLayers_(wtcsf.kappaLayers_),
151 contactRes_(wtcsf.contactRes_)
171 refCast<const mappedPatchBase>(patch().patch());
175 refCast<const fvMesh>(nbrMesh).
boundary()[samplePatchi];
196 if (contactRes_ == 0.0)
198 nbrIntFld.
ref() = nbrField.patchInternalField();
203 nbrIntFld.ref() = nbrField;
204 nbrKDelta.ref() = contactRes_;
228 this->refValue() = nbrIntFld();
229 this->refGrad() = 0.0;
230 this->valueFraction() = nbrKDelta()/(nbrKDelta() + myKDelta());
232 mixedFvPatchScalarField::updateCoeffs();
238 Info<< patch().boundaryMesh().mesh().name() <<
':' 239 << patch().name() <<
':' 240 << this->internalField().name() <<
" <- " 241 << nbrMesh.name() <<
':' 242 << nbrPatch.
name() <<
':' 243 << this->internalField().name() <<
" :" 244 <<
" heat transfer rate:" << Q
245 <<
" walltemperature " 246 <<
" min:" <<
gMin(*
this)
247 <<
" max:" <<
gMax(*
this)
265 thicknessLayers_.
writeEntry(
"thicknessLayers", os);
Mixed boundary condition for temperature, to be used for heat-transfer on back-to-back baffles...
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type gMin(const FieldField< Field, Type > &f)
const polyMesh & sampleMesh() const
Get the region mesh.
T & ref() const
Return non-const reference or generate a fatal error.
To & refCast(From &r)
Reference type cast template function.
virtual void write(Ostream &) const
Write.
tmp< scalarField > kappa(const scalarField &Tp) const
Given patch temperature calculate corresponding K field.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
static int & msgType()
Message tag of standard messages.
const word & name() const
Return name.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Type gSum(const FieldField< Field, Type > &f)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
faceListList boundary(nPatches)
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.
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
Common functions used in temperature coupled boundaries.
const GeometricField::Patch & lookupPatchField(const word &name, const GeometricField *=nullptr, const Type *=nullptr) const
Lookup and return the patchField of the named field from the.
Type gAverage(const FieldField< Field, Type > &f)
const scalarField & deltaCoeffs() const
Return the face - cell distance coeffient.
label index() const
Return the index of this patch in the boundaryMesh.
virtual void operator=(const UList< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
const polyPatch & samplePolyPatch() const
Get the patch on the region.
void write(Ostream &) const
Write.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
makePatchTypeField(fvPatchScalarField, thermalBaffleFvPatchScalarField)
void writeEntry(Ostream &) const
Write the UList as a dictionary entry.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.