34 namespace radiationModels
36 namespace absorptionEmissionModels
62 specieIndex_(
label(0)),
68 if (!isA<fluidMulticomponentThermo>(
thermo_))
71 <<
"Model requires a multi-component thermo package"
78 if (!iter().isDict())
continue;
87 if (!iter().isDict())
continue;
89 const word& key = iter().keyword();
99 <<
"specie: " << key <<
" is not in all the bands"
103 coeffs_[nBand][nSpec].initialise(
dict.subDict(key));
110 if (
dict.found(
"lookUpTableFileName"))
128 <<
"specie ft is not present to use with "
129 <<
"lookUpTableFileName " <<
nl
148 Info<<
"specie: " << iter.key() <<
" found on look-up table "
149 <<
" with index: " << index <<
endl;
158 Info<<
"specie: " << iter.key() <<
" is being solved" <<
endl;
163 <<
"specie: " << iter.key()
164 <<
" is neither in look-up table: "
166 <<
" nor is being solved" <<
nl
179 <<
" there is no lookup table and the specie" <<
nl
181 <<
" is not found " <<
nl
229 if (specieIndex_[
n] != 0)
234 const List<scalar>& Ynft = lookUpTablePtr_().lookUp(ft[celli]);
237 Xipi = unitAtm.
toUser(Ynft[specieIndex_[
n]]*
p[celli]);
244 invWt += mcThermo.
Y(
s)[celli]/mcThermo.
WiValue(
s);
250 mcThermo.
Y(index)[celli]/(mcThermo.
WiValue(index)*invWt);
252 Xipi = unitAtm.
toUser(Xk*
p[celli]);
255 scalar Ti =
T[celli];
258 coeffs_[bandi][
n].coeffs(
T[celli]);
260 if (coeffs_[bandi][
n].invTemp())
268 ((((
b[5]*Ti +
b[4])*Ti +
b[3])*Ti +
b[2])*Ti +
b[1])*Ti
306 for (
label j=0; j<nBands_; j++)
308 aLambda[j].primitiveFieldRef() = this->a(j);
311 aLambda[j].primitiveField()
312 *(iBands_[j][1] - iBands_[j][0])
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
bool found(const Key &) const
Return true if hashedEntry is found in table.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
static const word & constant()
Return constant name.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A class for handling file names.
Base-class for multi-component fluid thermodynamic properties.
Base-class for fluid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
virtual const speciesTable & species() const =0
The table of species.
virtual scalar WiValue(const label speciei) const =0
Molecular weight [kg/kmol].
virtual PtrList< volScalarField > & Y()=0
Access the mass-fraction fields.
Type & lookupObjectRef(const word &name) const
Lookup and return the object reference of the given Type.
bool foundObject(const word &name) const
Is the named Type in registry.
A base class for physical properties.
Model to supply absorption and emission coefficients for radiation modelling.
const fvMesh & mesh() const
Reference to the mesh.
virtual tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
const fluidThermo & thermo_
Thermo package.
void correct(volScalarField &a, PtrList< volScalarField > &aLambda) const
Correct rays.
UPtrList< volScalarField > Yj_
Pointer list of species being solved involved in the absorption.
FixedList< FixedList< absorptionCoeffs, nSpecies_ >, maxBands_ > coeffs_
Absorption coefficients.
tmp< volScalarField > aCont(const label bandi=0) const
Absorption coefficient for continuous phase.
HashTable< label > speciesNames_
Hash table with species names.
wideBand(const dictionary &dict, const fvMesh &mesh, const word &modelName=typeName)
Construct from components.
autoPtr< interpolationLookUpTable > lookUpTablePtr_
Look-up table of species related to ft.
FixedList< label, nSpecies_ > specieIndex_
Indices of species in the look-up table.
tmp< volScalarField > ECont(const label bandi=0) const
Emission contribution for continuous phase.
tmp< volScalarField > eCont(const label bandi=0) const
Emission coefficient for continuous phase.
virtual ~wideBand()
Destructor.
FixedList< Vector2D< scalar >, maxBands_ > iBands_
Bands.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
T toUser(const T &) const
Convert a value to user units.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), lagrangian::cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
defineTypeNameAndDebug(greyMeanCombustion, 0)
addToRunTimeSelectionTable(absorptionEmissionModel, greyMeanCombustion, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
const dimensionSet dimless
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
const dimensionSet dimLength
const HashTable< unitConversion > & units()
Get the table of unit conversions.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.