54greyMeanSolidAbsorptionEmission::X(
const word specie)
const
63 auto& rhoInv = tRhoInv.ref();
65 forAll(mixture_.Y(), specieI)
72 Yi[iCell]/mixture_.rho(specieI,
p[iCell],
T[iCell]);
76 const label mySpecieI = mixture_.species().
find(specie);
79 Xj[iCell] = Yj[iCell]/mixture_.rho(mySpecieI,
p[iCell],
T[iCell]);
95 coeffsDict_((
dict.optionalSubDict(
typeName +
"Coeffs"))),
99 solidData_(mixture_.
Y().size())
104 <<
"Model requires a multi-component thermo package"
111 for (
const entry& dEntry : functionDicts)
113 if (!dEntry.isDict())
118 const word&
key = dEntry.keyword();
121 if (!mixture_.contains(key))
124 <<
" specie: " <<
key <<
" is not found in the solid mixture"
126 <<
" specie is the mixture are:" << mixture_.species() <<
nl
129 speciesNames_.insert(key, nFunc);
131 dict.readEntry(
"absorptivity", solidData_[nFunc][absorptivity]);
132 dict.readEntry(
"emissivity", solidData_[nFunc][emissivity]);
141Foam::tmp<Foam::volScalarField>
142Foam::radiation::greyMeanSolidAbsorptionEmission::
143calc(
const label propertyId)
const
153 auto& a = ta.ref().primitiveFieldRef();
157 if (mixture_.contains(iter.key()))
159 a += solidData_[iter.val()][propertyId]*X(iter.key());
163 ta.ref().correctBoundaryConditions();
174 return calc(emissivity);
184 return calc(absorptivity);
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< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
@ NO_REGISTER
Do not request registration (bool: false).
label find(const T &val) const
Find index of the first occurrence of the value.
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
Abstract base-class for fluid and solid thermodynamic properties.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A keyword and a list of tokens is an 'entry'.
Mesh data needed to do the Finite Volume discretisation.
static const word & extrapolatedCalculatedType() noexcept
The type name for extrapolatedCalculated patch fields combines zero-gradient and calculated.
Model to supply absorption and emission coefficients for radiation modelling.
const fvMesh & mesh() const
Reference to the mesh.
absorptionEmissionModel(const dictionary &dict, const fvMesh &mesh)
Construct from components.
const dictionary & dict() const
Reference to the dictionary.
greyMeanSolidAbsorptionEmission radiation absorption and emission coefficients for solid mixture
greyMeanSolidAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
Fundamental solid thermodynamic properties.
Base class of the thermophysical property types.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
PtrList< volScalarField > & Y
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word dictName("faMeshDefinition")
#define WarningInFunction
Report a warning using Foam::Warning.
constexpr auto key(const Type &t) noexcept
Helper function to return the enum value.
Namespace for radiation modelling.
const dimensionSet dimless
Dimensionless.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.
Unit conversion functions.