42 absorptionEmissionModel,
43 greyMeanAbsorptionEmission,
59 coeffsDict_((dict.
subDict(typeName +
"Coeffs"))),
61 specieIndex_(
label(0)),
64 EhrrCoeff_(
readScalar(coeffsDict_.lookup(
"EhrrCoeff"))),
67 if (!isA<basicSpecieMixture>(thermo_))
70 <<
"Model requires a multi-component thermo package" 85 const word& key = iter().keyword();
86 speciesNames_.insert(key, nFunc);
88 coeffs_[nFunc].initialise(dict);
92 if (coeffsDict_.found(
"lookUpTableFileName"))
94 const word name = coeffsDict_.lookup(
"lookUpTableFileName");
101 fileName(coeffsDict_.lookup(
"lookUpTableFileName")),
110 <<
"specie ft is not present to use with " 111 <<
"lookUpTableFileName " <<
nl 123 if (!lookUpTablePtr_.empty())
125 if (lookUpTablePtr_().found(iter.key()))
127 label index = lookUpTablePtr_().findFieldIndex(iter.key());
129 Info<<
"specie: " << iter.key() <<
" found on look-up table " 130 <<
" with index: " << index <<
endl;
132 specieIndex_[iter()] = index;
142 specieIndex_[iter()] = 0;
144 Info<<
"specie: " << iter.key() <<
" is being solved" <<
endl;
149 <<
"specie: " << iter.key()
150 <<
" is neither in look-up table: " 151 << lookUpTablePtr_().tableName()
152 <<
" nor is being solved" <<
nl 165 specieIndex_[iter()] = 0;
171 <<
" there is not lookup table and the specie" <<
nl 173 <<
" is not found " <<
nl 204 "aCont" +
name(bandI),
212 extrapolatedCalculatedFvPatchVectorField::typeName
224 if (specieIndex_[n] != 0)
230 const List<scalar>& Ynft = lookUpTablePtr_().lookUp(ft[celli]);
232 Xipi = Ynft[specieIndex_[
n]]*
paToAtm(p[celli]);
239 invWt += mixture.
Y(
s)[celli]/mixture.
W(
s);
243 scalar Xk = mixture.
Y(index)[celli]/(mixture.
W(index)*invWt);
250 scalar Ti = T[celli];
252 if (coeffs_[n].invTemp())
259 ((((b[5]*Ti + b[4])*Ti + b[3])*Ti + b[2])*Ti + b[1])*Ti
264 ta.
ref().correctBoundaryConditions();
285 "ECont" +
name(bandI),
286 mesh_.time().timeName(),
303 E.
ref().primitiveFieldRef() = EhrrCoeff_*dQ/mesh_.V();
307 E.
ref().primitiveFieldRef() = EhrrCoeff_*
dQ;
314 <<
"Incompatible dimensions for dQ field" <<
endl;
321 <<
"dQ field not found in mesh" <<
endl;
#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)
A list of keyword definitions, which are a keyword followed by any number of values (e...
bool foundObject(const word &name) const
Is the named Type found?
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Unit conversion functions.
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.
defineTypeNameAndDebug(cloudAbsorptionEmission, 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const dimensionSet dimVolume(pow3(dimLength))
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 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.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
greyMeanAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
errorManip< error > abort(error &err)
const dimensionSet & dimensions() const
Return dimensions.
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
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.
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.
PtrList< volScalarField > & Y
Mesh data needed to do the Finite Volume discretisation.
addToRunTimeSelectionTable(absorptionEmissionModel, cloudAbsorptionEmission, dictionary)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const speciesTable & species() const
Return the table of species.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
virtual scalar W(const label speciei) const =0
Molecular weight of the given specie [kg/kmol].
T & ref() const
Return non-const reference or generate a fatal error.
virtual ~greyMeanAbsorptionEmission()
Destructor.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
const Time & time() const
Return the top-level database.