35 namespace radiationModels
37 namespace absorptionEmissionModels
43 absorptionEmissionModel,
62 coeffsDict_(dict.
subDict(modelName +
"Coeffs")),
64 specieIndex_(
label(0)),
73 if (!iter().isDict())
continue;
76 dict.
lookup(
"bandLimits") >> iBands_[nBand];
77 totalWaveLength_ += iBands_[nBand][1] - iBands_[nBand][0];
82 if (!iter().isDict())
continue;
84 const word& key = iter().keyword();
87 speciesNames_.insert(key, nSpec);
91 if (!speciesNames_.found(key))
94 <<
"specie: " << key <<
" is not in all the bands" 98 coeffs_[nBand][nSpec].initialise(dict.
subDict(key));
105 if (coeffsDict_.found(
"lookUpTableFileName"))
107 const word name = coeffsDict_.lookup(
"lookUpTableFileName");
114 fileName(coeffsDict_.lookup(
"lookUpTableFileName")),
123 <<
"specie ft is not present to use with " 124 <<
"lookUpTableFileName " <<
nl 136 if (!lookUpTablePtr_.empty())
138 if (lookUpTablePtr_().found(iter.key()))
141 lookUpTablePtr_().findFieldIndex(iter.key());
143 Info<<
"specie: " << iter.key() <<
" found on look-up table " 144 <<
" with index: " << index <<
endl;
146 specieIndex_[iter()] = index;
151 specieIndex_[iter()] = 0;
153 Info<<
"specie: " << iter.key() <<
" is being solved" <<
endl;
158 <<
"specie: " << iter.key()
159 <<
" is neither in look-up table: " 160 << lookUpTablePtr_().tableName()
161 <<
" nor is being solved" <<
nl 168 specieIndex_[iter()] = 0;
174 <<
" there is no lookup table and the specie" <<
nl 176 <<
" is not found " <<
nl 222 if (specieIndex_[n] != 0)
227 const List<scalar>& Ynft = lookUpTablePtr_().lookUp(ft[celli]);
230 Xipi = Ynft[specieIndex_[
n]]*
paToAtm(p[celli]);
237 invWt += mixture.
Y(
s)[celli]/mixture.
Wi(
s);
243 mixture.
Y(index)[celli]/(mixture.
Wi(index)*invWt);
248 scalar Ti = T[celli];
251 coeffs_[bandi][
n].coeffs(T[celli]);
253 if (coeffs_[bandi][n].invTemp())
261 ((((b[5]*Ti + b[4])*Ti + b[3])*Ti + b[2])*Ti + b[1])*Ti
299 for (
label j=0; j<nBands_; j++)
301 aLambda[j].primitiveFieldRef() = this->a(j);
304 aLambda[j].primitiveField()
305 *(iBands_[j][1] - iBands_[j][0])
addToRunTimeSelectionTable(absorptionEmissionModel, greyMeanCombustion, dictionary)
#define forAll(list, i)
Loop across all elements in list.
tmp< volScalarField > aCont(const label bandi=0) const
Absorption coefficient for continuous phase.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
virtual tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
T & ref() const
Return non-const reference or generate a fatal error.
Unit conversion functions.
Type & lookupObjectRef(const word &name) const
Lookup and return the object reference of the given Type.
virtual ~wideBand()
Destructor.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool foundObject(const word &name) const
Is the named Type found?
defineTypeNameAndDebug(greyMeanCombustion, 0)
wideBand(const dictionary &dict, const fvMesh &mesh, const word &modelName=typeName)
Construct from components.
virtual scalar Wi(const label speciei) const =0
Molecular weight of the given specie [kg/kmol].
const dimensionSet dimless
const Time & time() const
Return the top-level database.
Specialisation of basicMixture for a mixture consisting of a number for molecular species...
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
void correct(volScalarField &a, PtrList< volScalarField > &aLambda) const
Correct rays.
Macros for easy insertion into run-time selection tables.
const dimensionSet dimLength
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A class for handling words, derived from string.
Base-class for fluid thermodynamic properties.
const word & constant() const
Return constant name.
tmp< volScalarField > eCont(const label bandi=0) const
Emission coefficient for continuous phase.
An STL-conforming hash table.
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
word name(const complex &)
Return a string representation of a complex.
scalar paToAtm(const scalar pa)
Conversion from atm to Pa.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Mesh data needed to do the Finite Volume discretisation.
tmp< volScalarField > ECont(const label bandi=0) const
Emission contribution for continuous phase.
Model to supply absorption and emission coefficients for radiation modelling.
A class for managing temporary objects.
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
const speciesTable & species() const
Return the table of species.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.