48 mixedFvPatchScalarField(p, iF),
50 TnbrName_(
"undefined-Tnbr"),
51 qrNbrName_(
"undefined-qrNbr"),
52 qrName_(
"undefined-qr"),
57 this->refValue() = 0.0;
58 this->refGrad() = 0.0;
59 this->valueFraction() = 1.0;
72 mixedFvPatchScalarField(psf, p, iF, mapper),
74 TnbrName_(psf.TnbrName_),
75 qrNbrName_(psf.qrNbrName_),
77 thicknessLayers_(psf.thicknessLayers_),
78 kappaLayers_(psf.kappaLayers_),
79 contactRes_(psf.contactRes_)
91 mixedFvPatchScalarField(p, iF),
100 if (!isA<mappedPatchBase>(this->patch().patch()))
103 <<
"' not type '" << mappedPatchBase::typeName <<
"'" 104 <<
"\n for patch " << p.
name()
105 <<
" of field " << internalField().name()
106 <<
" in file " << internalField().objectPath()
110 if (dict.
found(
"thicknessLayers"))
112 dict.
lookup(
"thicknessLayers") >> thicknessLayers_;
113 dict.
lookup(
"kappaLayers") >> kappaLayers_;
115 if (thicknessLayers_.size() > 0)
118 forAll(thicknessLayers_, iLayer)
120 contactRes_ += thicknessLayers_[iLayer]/kappaLayers_[iLayer];
122 contactRes_ = 1.0/contactRes_;
128 if (dict.
found(
"refValue"))
140 valueFraction() = 1.0;
152 mixedFvPatchScalarField(psf, iF),
154 TnbrName_(psf.TnbrName_),
155 qrNbrName_(psf.qrNbrName_),
156 qrName_(psf.qrName_),
157 thicknessLayers_(psf.thicknessLayers_),
158 kappaLayers_(psf.kappaLayers_),
159 contactRes_(psf.contactRes_)
179 refCast<const mappedPatchBase>(patch().patch());
183 refCast<const fvMesh>(nbrMesh).
boundary()[samplePatchi];
203 if (contactRes_ == 0.0)
209 KDeltaNbr.
setSize(nbrField.size(), contactRes_);
216 if (qrName_ !=
"none")
222 if (qrNbrName_ !=
"none")
228 valueFraction() = KDeltaNbr/(KDeltaNbr + KDelta);
230 refGrad() = (qr + qrNbr)/
kappa(Tp);
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(Tp)
247 <<
" max:" <<
gMax(Tp)
266 thicknessLayers_.
writeEntry(
"thicknessLayers", os);
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.
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)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
const polyMesh & sampleMesh() const
Get the region mesh.
To & refCast(From &r)
Reference type cast template function.
void size(const label)
Override size to be inconsistent with allocated storage.
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.
Mixed boundary condition for temperature and radiation heat transfer to be used for in multiregion ca...
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)
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
turbulentTemperatureRadCoupledMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
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.
void setSize(const label)
Reset size of List.
Common functions used in temperature coupled boundaries.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
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.
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.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.