50 const word& sourceName,
51 const word& modelType,
54 const word& defaultAreaName
57 fa::faceSetOption(sourceName, modelType,
dict,
mesh, defaultAreaName),
65 TprimaryName_(
dict.getOrDefault<word>(
"Tprimary",
"T")),
70 fieldNames_.resize(1, TName_);
80Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::areaMesh>>
81Foam::fa::contactHeatFluxSource::htc()
const
89 auto& htc = thtc.ref();
93 PtrList<scalarField> patchValues(coupling_.size());
97 const auto* tempCoupled = coupling_.get(patchi);
101 const fvPatch&
p = tempCoupled->patch();
107 tempCoupled->kappa(
p.patchInternalField(Tprimary_))
114 vsm().mapToSurface<scalar>(patchValues, htc.field());
116 if (contactRes_ != 0)
118 htc.field() += contactRes_;
155 vsm().mapInternalToSurface<scalar>(Tprimary_, Twall.ref().
field());
159 curTimeIndex_ =
mesh().time().timeIndex();
168 coeffs_.readIfPresent(
"T", TName_);
172 if (
dict.readIfPresent(
"thicknessLayers", thicknessLayers_))
174 dict.readEntry(
"kappaLayers", kappaLayers_);
178 forAll(thicknessLayers_, iLayer)
180 contactRes_ += thicknessLayers_[iLayer]/kappaLayers_[iLayer];
183 if (thicknessLayers_.size())
185 contactRes_ = scalar(1)/contactRes_;
201 coupling_.resize_null(
patches.back()+1);
204 for (
const label patchi :
patches)
206 const fvPatch&
p = mesh_.boundary()[patchi];
211 new temperatureCoupling(
p,
dict)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &iField)
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions, copy of internal field....
const word & name() const noexcept
Return the object name.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A special matrix type and solver, designed for finite area solutions of scalar equations....
const GeometricField< Type, faPatchField, areaMesh > & psi() const
void subsetFilter(List< Type > &field) const
Zero all non-selected locations within field.
virtual bool isActive()
Is the source active?
faceSetOption(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
Construct from components.
Base abstract class for handling finite area options (i.e. faOption).
const fvMesh & mesh() const noexcept
Return const access to the volume mesh.
virtual bool read(const dictionary &dict)
Read source dictionary.
const fvMesh & mesh_
Reference to the mesh database.
dictionary coeffs_
Dictionary containing source coefficients.
const word & name() const noexcept
The source name.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const faMesh & regionMesh() const
Return the region mesh database (demand-driven).
Mesh data needed to do the Finite Volume discretisation.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
const volSurfaceMapping vsm(aMesh)
Calculate the finiteArea matrix for implicit and explicit sources.
#define DebugInfo
Report an information message using Foam::Info.
Namespace for finite-area.
zeroField Sp(const Foam::zero, const GeometricField< Type, faPatchField, areaMesh > &)
A no-op source.
const dimensionSet dimPower
bool read(const char *buf, int32_t &val)
Same as readInt32.
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimArea(sqr(dimLength))
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
static constexpr const zero Zero
Global zero (0).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
#define forAll(list, i)
Loop across all elements in list.