55 { operationMode::fixedPower,
"power" },
57 { operationMode::fixedHeatTransferCoeff,
"coefficient" },
65 const word& sourceName,
66 const word& modelType,
69 const word& defaultAreaName
72 fa::faceSetOption(sourceName, modelType,
dict, m, defaultAreaName),
73 mode_(operationModeNames.get(
"mode",
dict)),
76 dict.getOrDefaultCompat<word>
82 emissivity_(
dict.getOrDefault<scalar>(
"emissivity", 0))
84 fieldNames_.resize(1, TName_);
105 <<
name() <<
": applying source to "
110 const scalar timeVal = mesh_.time().timeOutputValue();
123 qflux = q_->value(timeVal);
161 case fixedHeatTransferCoeff:
181 auto& hp = thp.ref();
183 DimensionedField<scalar, areaMesh> hpTa(hp*Ta);
206 dict.readIfPresent(
"T", TName_);
207 dict.readIfPresent(
"emissivity", emissivity_);
209 mode_ = operationModeNames.get(
"mode",
dict);
220 Q_ = Function1<scalar>::New(
"Q",
dict, &mesh_);
225 Q_ = Function1<scalar>::New(
"q",
dict, &mesh_);
228 case fixedHeatTransferCoeff:
230 h_ = Function1<scalar>::New(
"h",
dict, &mesh_);
231 Ta_ = Function1<scalar>::New(
"Ta",
dict, &mesh_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const DynamicField< Type > & field() const noexcept
Return const-reference to the primitive field values.
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....
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
const word & name() const noexcept
Return the object name.
A List with indirect addressing. Like IndirectList but does not store addressing.
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
Applies a heat flux condition for a specified faMesh region to temperature on an external wall for co...
static const Enum< operationMode > operationModeNames
Names for operationMode.
virtual void addSup(const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
virtual bool read(const dictionary &dict)
Read source dictionary.
operationMode
Options for the heat transfer condition mode.
@ fixedPower
Fixed heat power [W].
@ fixedHeatTransferCoeff
Fixed heat transfer coefficient.
@ fixedHeatFlux
Fixed heat flux [W/m2].
externalHeatFluxSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
Construct from explicit source name and mesh.
void subsetFilter(List< Type > &field) const
Zero all non-selected locations within field.
bool useSubMesh() const noexcept
True if sub-selection should be used.
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.
const labelList & faces() const noexcept
Return const access to the local finite-area face selection.
scalar A() const noexcept
Return const access to the total face area.
Base abstract class for handling finite area options (i.e. faOption).
virtual bool read(const dictionary &dict)
Read source dictionary.
const fvMesh & mesh_
Reference to the mesh database.
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 class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Namespace of functions to calculate implicit derivatives returning a matrix. Time derivatives are cal...
#define DebugInfo
Report an information message using Foam::Info.
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
Namespace for finite-area.
zeroField SuSp(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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensionedScalar pow3(const dimensionedScalar &ds)
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.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)