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);
virtual void write(Ostream &) const
Write.
Mixed boundary condition for temperature, to be used for heat-transfer on back-to-back baffles...
#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.
const scalarField & deltaCoeffs() const
Return the face - cell distance coeffient.
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void write(Ostream &) const
Write.
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)
To & refCast(From &r)
Reference type cast template function.
const word & name() const
Return name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const polyMesh & sampleMesh() const
Get the region mesh.
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.
void writeEntry(Ostream &) const
Write the UList as a dictionary entry.
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.
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
virtual label size() const
Return size.
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
faceListList boundary(nPatches)
const GeometricField::Patch & lookupPatchField(const word &name, const GeometricField *=NULL, const Type *=NULL) const
Lookup and return the patchField of the named field from the.
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.
Common functions used in temperature coupled boundaries.
const polyPatch & samplePolyPatch() const
Get the patch on the region.
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...
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
tmp< scalarField > kappa(const scalarField &Tp) const
Given patch temperature calculate corresponding K field.
label index() const
Return the index of this patch in the boundaryMesh.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
makePatchTypeField(fvPatchScalarField, thermalBaffleFvPatchScalarField)
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.