44 absorptionEmissionModel,
45 greyMeanSolidAbsorptionEmission,
54 greyMeanSolidAbsorptionEmission::X(
const word specie)
const 63 auto& rhoInv = tRhoInv.ref();
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())
101 if (!isA<basicSpecieMixture>(thermo_))
104 <<
"Model requires a multi-component thermo package" 111 for (
const entry& dEntry : functionDicts)
113 if (!dEntry.isDict())
118 const word&
key = dEntry.keyword();
124 <<
" specie: " <<
key <<
" is not found in the solid mixture" 126 <<
" specie is the mixture are:" << mixture_.
species() <<
nl 131 dict.
readEntry(
"absorptivity", solidData_[nFunc][absorptivity]);
142 Foam::radiation::greyMeanSolidAbsorptionEmission::
143 calc(
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);
Abstract base-class for fluid and solid thermodynamic properties.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
greyMeanSolidAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
Unit conversion functions.
constexpr char nl
The newline '\n' character (0x0a)
const word dictName("faMeshDefinition")
defineTypeNameAndDebug(cloudAbsorptionEmission, 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const speciesTable & species() const
Return the table of species.
virtual const volScalarField & T() const
Temperature [K].
const dictionary & dict() const
Reference to the dictionary.
virtual scalar rho(const label speciei, const scalar p, const scalar T) const =0
Density [kg/m3].
const dimensionSet dimless
Dimensionless.
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
Model to supply absorption and emission coefficients for radiation modelling.
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
virtual volScalarField & p()
Pressure [Pa].
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect...
const dictionary & optionalSubDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary, otherwise return this dictionary.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
errorManip< error > abort(error &err)
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())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
Fundamental solid thermodynamic properties.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
PtrList< volScalarField > & Y
Mesh data needed to do the Finite Volume discretisation.
addToRunTimeSelectionTable(absorptionEmissionModel, cloudAbsorptionEmission, dictionary)
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
bool contains(const word &specieName) const
Does the mixture include this specie?
A class for managing temporary objects.
label find(const word &val) const
Find index of the value (searches the hash).
static const word & extrapolatedCalculatedType() noexcept
The type name for extrapolatedCalculated patch fields combines zero-gradient and calculated.
Do not request registration (bool: false)
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
forAllConstIters(mixture.phases(), phase)
A keyword and a list of tokens is an 'entry'.
static constexpr const zero Zero
Global zero (0)