Go to the documentation of this file.
51 mixedFvPatchScalarField(
p, iF),
65 TnbrName_(
"undefined-Tnbr"),
70 this->refValue() = 0.0;
71 this->refGrad() = 0.0;
72 this->valueFraction() = 1.0;
85 mixedFvPatchScalarField(ptf,
p, iF, mapper),
93 TnbrName_(ptf.TnbrName_),
94 thicknessLayers_(ptf.thicknessLayers_),
95 kappaLayers_(ptf.kappaLayers_),
96 contactRes_(ptf.contactRes_)
108 mixedFvPatchScalarField(
p, iF),
121 if (
dict.readIfPresent(
"thicknessLayers", thicknessLayers_))
123 dict.readEntry(
"kappaLayers", kappaLayers_);
125 if (thicknessLayers_.size() > 0)
128 forAll(thicknessLayers_, iLayer)
130 contactRes_ += thicknessLayers_[iLayer]/kappaLayers_[iLayer];
132 contactRes_ = 1.0/contactRes_;
138 if (
dict.found(
"refValue"))
150 valueFraction() = 1.0;
156 this->internalField().
name(),
161 this->internalField().
name() +
"_weights",
162 this->
patch().deltaCoeffs()
174 mixedFvPatchScalarField(wtcsf, iF),
182 TnbrName_(wtcsf.TnbrName_),
183 thicknessLayers_(wtcsf.thicknessLayers_),
184 kappaLayers_(wtcsf.kappaLayers_),
185 contactRes_(wtcsf.contactRes_)
195 mixedFvPatchScalarField(wtcsf),
203 TnbrName_(wtcsf.TnbrName_),
204 thicknessLayers_(wtcsf.thicknessLayers_),
205 kappaLayers_(wtcsf.kappaLayers_),
206 contactRes_(wtcsf.contactRes_)
229 this->internalField()
242 const auto& nbrMesh = refCast<const fvMesh>(mpp.
sampleMesh());
244 const auto& nbrPatch = nbrMesh.boundary()[nbrPatchID];
259 if (contactRes_ == 0.0)
265 nbrKDelta = nbrField.
kappa(nbrField)*nbrPatch.deltaCoeffs();
275 nbrKDelta =
new scalarField(nbrField.size(), contactRes_);
282 if (contactRes_ == 0.0)
290 nbrKDelta =
new scalarField(this->size(), contactRes_);
321 this->refValue() = nbrIntFld();
322 this->refGrad() = 0.0;
323 this->valueFraction() = nbrKDelta()/(nbrKDelta() + myKDelta());
325 mixedFvPatchScalarField::updateCoeffs();
331 Info<<
patch().boundaryMesh().mesh().name() <<
':'
332 <<
patch().name() <<
':'
333 << this->internalField().name() <<
" <- "
336 << this->internalField().name() <<
" :"
337 <<
" heat transfer rate:" << Q
338 <<
" walltemperature "
339 <<
" min:" <<
gMin(*
this)
340 <<
" max:" <<
gMax(*
this)
357 thicknessLayers_.
writeEntry(
"thicknessLayers", os);
int debug
Static debugging option.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
Type gAverage(const FieldField< Field, Type > &f)
const polyPatch & samplePolyPatch() const
Get the patch on the region.
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Common functions used in temperature coupled boundaries.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool sameWorld() const
Is world the local world.
Type gSum(const FieldField< Field, Type > &f)
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
virtual void write(Ostream &) const
Write.
makePatchTypeField(fvPatchScalarField, alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField)
#define forAll(list, i)
Loop across all elements in list.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
const polyMesh & sampleMesh() const
Get the region mesh.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
void distribute(const word &fieldName, Field< T > &newValues) const
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Mixed boundary condition for temperature, to be used for heat-transfer on back-to-back baffles....
GeometricField< scalar, fvPatchField, volMesh > volScalarField
static const mappedPatchBase & mapper(const fvPatch &p, const DimensionedField< Type, volMesh > &iF)
Check that patch is of correct type.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
To & refCast(From &r)
Reference type cast template function.
const word & sampleRegion() const
Region to sample.
virtual void write(Ostream &os) const
Write.
static int & msgType()
Message tag of standard messages.
const std::string patch
OpenFOAM patch number as a std::string.
virtual tmp< Field< scalar > > mappedInternalField() const
Map internal of sampleField onto *this patch.
virtual tmp< scalarField > kappa(const scalarField &Tp) const
Given patch temperature calculate corresponding K field.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
void initRetrieveField(const objectRegistry &obr, const word ®ion, const word &patch, const mapDistribute &map, const word &fieldName, const Field< T > &fld) const
Construct field from registered elements.
Foam::fvPatchFieldMapper.
void write(Ostream &os) const
Write.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Type gMin(const FieldField< Field, Type > &f)
virtual void operator=(const UList< scalar > &)
label index() const
The index of this patch in the boundaryMesh.
Type gMax(const FieldField< Field, Type > &f)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE)