36 namespace compressible
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;
71 mixedFvPatchScalarField(p, iF),
80 if (!isA<mappedPatchBase>(this->patch().patch()))
83 <<
"' not type '" << mappedPatchBase::typeName <<
"'" 84 <<
"\n for patch " << p.
name()
85 <<
" of field " << internalField().name()
86 <<
" in file " << internalField().objectPath()
90 if (dict.
found(
"thicknessLayers"))
92 dict.
lookup(
"thicknessLayers") >> thicknessLayers_;
93 dict.
lookup(
"kappaLayers") >> kappaLayers_;
95 if (thicknessLayers_.size() > 0)
98 forAll(thicknessLayers_, iLayer)
100 contactRes_ += thicknessLayers_[iLayer]/kappaLayers_[iLayer];
102 contactRes_ = 1.0/contactRes_;
108 if (dict.
found(
"refValue"))
120 valueFraction() = 1.0;
134 mixedFvPatchScalarField(psf, p, iF, mapper),
136 TnbrName_(psf.TnbrName_),
137 qrNbrName_(psf.qrNbrName_),
138 qrName_(psf.qrName_),
139 thicknessLayers_(psf.thicknessLayers_),
140 kappaLayers_(psf.kappaLayers_),
141 contactRes_(psf.contactRes_)
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];
194 if (!isA<thisType>(nbrTp))
197 <<
"Patch field for " << internalField().name() <<
" on " 198 << patch().name() <<
" is of type " << thisType::typeName
199 <<
endl <<
"The neighbouring patch field " << TnbrName_ <<
" on " 200 << nbrPatch.
name() <<
" is required to be the same, but is " 204 const thisType& nbrField = refCast<const thisType>(nbrTp);
213 if (contactRes_ == 0.0)
215 KDeltaNbr = nbrField.kappa(nbrField)*nbrPatch.
deltaCoeffs();
219 KDeltaNbr.
setSize(nbrField.size(), contactRes_);
226 if (qrName_ !=
"none")
232 if (qrNbrName_ !=
"none")
238 valueFraction() = KDeltaNbr/(KDeltaNbr + KDelta);
240 refGrad() = (qr + qrNbr)/
kappa(*
this);
242 mixedFvPatchScalarField::updateCoeffs();
248 Info<< patch().boundaryMesh().mesh().name() <<
':' 249 << patch().name() <<
':' 250 << this->internalField().name() <<
" <- " 251 << nbrMesh.name() <<
':' 252 << nbrPatch.
name() <<
':' 253 << this->internalField().name() <<
" :" 254 <<
" heat transfer rate:" << Q
255 <<
" walltemperature " 256 <<
" min:" <<
gMin(Tp)
257 <<
" max:" <<
gMax(Tp)
276 writeEntry(os,
"thicknessLayers", thicknessLayers_);
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.
void size(const label)
Override size to be inconsistent with allocated storage.
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.
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 ...
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
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)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
const GeometricField::Patch & lookupPatchField(const word &name) const
Lookup and return the patchField of the named field from the.
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,.
tmp< scalarField > kappa(const fvPatchScalarField &Tp) const
Given patch temperature calculate corresponding K field.
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.
virtual const word & name() const
Return name.
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)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.