41 absorptionEmissionModel,
42 wideBandAbsorptionEmission,
60 specieIndex_(
label(0)),
77 dict.
lookup(
"bandLimits") >> iBands_[nBand];
78 dict.
lookup(
"EhrrCoeff") >> iEhrrCoeffs_[nBand];
79 totalWaveLength_ += iBands_[nBand][1] - iBands_[nBand][0];
85 const word& key = iter().keyword();
88 speciesNames_.insert(key, nSpec);
92 if (!speciesNames_.found(key))
95 <<
"specie: " << key <<
" is not in all the bands" 99 coeffs_[nBand][nSpec].initialise(specDicts.
subDict(key));
106 if (coeffsDict_.found(
"lookUpTableFileName"))
108 const word name = coeffsDict_.lookup(
"lookUpTableFileName");
115 fileName(coeffsDict_.lookup(
"lookUpTableFileName")),
124 <<
"specie ft is not present to use with " 125 <<
"lookUpTableFileName " <<
nl 137 if (!lookUpTablePtr_.empty())
139 if (lookUpTablePtr_().found(iter.key()))
142 lookUpTablePtr_().findFieldIndex(iter.key());
144 Info<<
"specie: " << iter.key() <<
" found on look-up table " 145 <<
" with index: " << index <<
endl;
147 specieIndex_[iter()] = index;
152 specieIndex_[iter()] = 0;
154 Info<<
"specie: " << iter.key() <<
" is being solved" <<
endl;
159 <<
"specie: " << iter.key()
160 <<
" is neither in look-up table: " 161 << lookUpTablePtr_().tableName()
162 <<
" nor is being solved" <<
nl 169 specieIndex_[iter()] = 0;
175 <<
" there is no lookup table and the specie" <<
nl 177 <<
" is not found " <<
nl 227 if (specieIndex_[n] != 0)
232 const List<scalar>& Ynft = lookUpTablePtr_().lookUp(ft[celli]);
235 Xipi = Ynft[specieIndex_[
n]]*
paToAtm(p[celli]);
242 invWt += mixture.
Y(
s)[celli]/mixture.
W(
s);
248 mixture.
Y(index)[celli]/(mixture.
W(index)*invWt);
253 scalar Ti = T[celli];
256 coeffs_[bandi][
n].coeffs(T[celli]);
258 if (coeffs_[bandi][n].invTemp())
266 ((((b[5]*Ti + b[4])*Ti + b[3])*Ti + b[2])*Ti + b[1])*Ti
303 if (
mesh().foundObject<volScalarField>(
"Qdot"))
310 E.
ref().primitiveFieldRef() =
313 *(iBands_[bandi][1] - iBands_[bandi][0])
319 E.
ref().primitiveFieldRef() =
322 *(iBands_[bandi][1] - iBands_[bandi][0])
328 <<
"Incompatible dimensions for Qdot field" <<
endl;
344 for (
label j=0; j<nBands_; j++)
346 aLambda[j].primitiveFieldRef() = this->a(j);
349 aLambda[j].primitiveField()
350 *(iBands_[j][1] - iBands_[j][0])
tmp< volScalarField > aCont(const label bandi=0) const
Absorption coefficient for continuous phase.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t 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)
void correct(volScalarField &a, PtrList< volScalarField > &aLambda) const
Correct rays.
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.
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.
defineTypeNameAndDebug(cloudAbsorptionEmission, 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const speciesTable & species() const
Return the table of species.
bool foundObject(const word &name) const
Is the named Type found?
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
const Time & time() const
Return the top-level database.
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
Model to supply absorption and emission coefficients for radiation modelling.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
Macros for easy insertion into run-time selection tables.
virtual ~wideBandAbsorptionEmission()
Destructor.
const word dictName() const
Return the local dictionary name (final part of scoped name)
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
const dimensionSet dimVolume(pow3(dimLength))
const dimensionSet & dimensions() const
Return dimensions.
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))
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
A class for handling words, derived from string.
Fundamental fluid thermodynamic properties.
const word & constant() const
Return constant name.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
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.
const dimensionSet dimEnergy
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
scalar paToAtm(const scalar pa)
Conversion from atm to Pa.
#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.
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.
addToRunTimeSelectionTable(absorptionEmissionModel, cloudAbsorptionEmission, dictionary)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
wideBandAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
virtual scalar W(const label speciei) const =0
Molecular weight of the given specie [kg/kmol].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
tmp< volScalarField > ECont(const label bandi=0) const
Emission contribution for continuous phase.
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
tmp< volScalarField > eCont(const label bandi=0) const
Emission coefficient for continuous phase.