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);
#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.
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)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
To & refCast(From &r)
Reference type cast template function.
void size(const label)
Override size to be inconsistent with allocated storage.
const word & name() const
Return name.
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...
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.
virtual void write(Ostream &) const
Write.
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.
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
virtual label size() const
Return size.
turbulentTemperatureRadCoupledMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
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.
void setSize(const label)
Reset size of List.
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.
volScalarField Qr(IOobject("Qr", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0))
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
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)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.