44 absorptionEmissionModel,
45 wideBandAbsorptionEmission,
61 coeffsDict_((
dict.optionalSubDict(typeName +
"Coeffs"))),
71 for (
const entry& dEntry : functionDicts)
78 const dictionary&
dict = dEntry.dict();
82 totalWaveLength_ += iBands_[nBand][1] - iBands_[nBand][0];
86 const dictionary& specDicts =
dict.
subDict(
"species");
87 for (
const entry& dEntry : specDicts)
89 const word&
key = dEntry.keyword();
98 <<
"specie: " <<
key <<
" is not in all the bands" 101 coeffs_[nBand][nSpec].initialise(specDicts.subDict(
key));
110 coeffsDict_.
found(
"lookUpTableFileName")
111 &&
"none" != coeffsDict_.
get<word>(
"lookUpTableFileName")
114 lookUpTablePtr_.reset
116 new interpolationLookUpTable<scalar>
118 coeffsDict_.
get<fileName>(
"lookUpTableFileName"),
127 <<
"specie ft is not present to use with " 128 <<
"lookUpTableFileName " <<
nl 139 const word& specieName = iter.key();
140 const label index = iter.val();
146 if (lookUpTablePtr_().found(specieName))
148 const label fieldIndex =
149 lookUpTablePtr_().findFieldIndex(specieName);
151 Info<<
"specie: " << specieName <<
" found on look-up table " 152 <<
" with index: " << fieldIndex <<
endl;
154 specieIndex_[index] = fieldIndex;
159 specieIndex_[index] = 0;
161 Info<<
"specie: " << specieName <<
" is being solved" <<
endl;
166 <<
"specie: " << specieName
167 <<
" is neither in look-up table: " 168 << lookUpTablePtr_().tableName()
169 <<
" nor is being solved" <<
nl 176 specieIndex_[index] = 0;
182 <<
"There is no lookup table and the specie" <<
nl 184 <<
" is not found " <<
nl 232 const label
n = iter();
234 if (specieIndex_[
n] != 0)
239 const List<scalar>& Ynft = lookUpTablePtr_().lookUp(ft[celli]);
242 Xipi = Ynft[specieIndex_[
n]]*
paToAtm(
p[celli]);
252 const label index =
mixture.species().find(iter.key());
260 scalar Ti =
T[celli];
263 coeffs_[bandi][
n].coeffs(
T[celli]);
265 if (coeffs_[bandi][
n].invTemp())
273 ((((
b[5]*Ti +
b[4])*Ti +
b[3])*Ti +
b[2])*Ti +
b[1])*Ti
318 E.
ref().primitiveFieldRef() =
320 *
Qdot.primitiveField()
321 *(iBands_[bandi][1] - iBands_[bandi][0])
327 E.ref().primitiveFieldRef() =
329 *
Qdot.primitiveField()
330 *(iBands_[bandi][1] - iBands_[bandi][0])
336 <<
"Incompatible dimensions for Qdot field" <<
endl;
352 for (label j=0; j<nBands_; j++)
354 aLambda[j].primitiveFieldRef() = this->a(j);
357 aLambda[j].primitiveField()
358 *(iBands_[j][1] - iBands_[j][0])
tmp< volScalarField > aCont(const label bandi=0) const
Absorption coefficient for continuous phase.
Abstract base-class for fluid and solid thermodynamic properties.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void correct(volScalarField &a, PtrList< volScalarField > &aLambda) const
Correct rays.
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.
bool found(const Key &key) const
Same as contains()
Unit conversion functions.
constexpr scalar paToAtm(const scalar pa) noexcept
Conversion from Pa to atm.
constexpr char nl
The newline '\n' character (0x0a)
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
const word dictName("faMeshDefinition")
defineTypeNameAndDebug(cloudAbsorptionEmission, 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const fvMesh & mesh() const
Reference to the mesh.
FixedList< FixedList< absorptionCoeffs, nSpecies_ >, maxBands_ > coeffs_
Absorption coefficients.
const dictionary & dict() const
Reference to the dictionary.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
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 dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
Macros for easy insertion into run-time selection tables.
virtual ~wideBandAbsorptionEmission()
Destructor.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
#define forAll(list, i)
Loop across all elements in list.
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.
const dimensionSet dimVolume(pow3(dimLength))
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Type * getObjectPtr(const word &name, const bool recursive=false) const
Return non-const pointer to the object of the given Type, using a const-cast to have it behave like a...
Fundamental fluid thermodynamic properties.
const word & constant() const noexcept
Return constant name.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const dimensionSet dimEnergy
dimensionedScalar pow3(const dimensionedScalar &ds)
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
#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
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Mesh data needed to do the Finite Volume discretisation.
FixedList< scalar, nCoeffs_ > coeffArray
addToRunTimeSelectionTable(absorptionEmissionModel, cloudAbsorptionEmission, dictionary)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
wideBandAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
bool foundObject(const word &name, const bool recursive=false) const
Is the named Type found?
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.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))
Defines the attributes of an object for which implicit objectRegistry management is supported...
tmp< volScalarField > ECont(const label bandi=0) const
Emission contribution for continuous phase.
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)
tmp< volScalarField > eCont(const label bandi=0) const
Emission coefficient for continuous phase.