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_))
71 "radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission" 76 ) <<
"Model requires a multi-component thermo package" 91 const word& key = iter().keyword();
92 speciesNames_.insert(key, nFunc);
94 coeffs_[nFunc].initialise(dict);
98 if (coeffsDict_.found(
"lookUpTableFileName"))
100 const word name = coeffsDict_.lookup(
"lookUpTableFileName");
107 fileName(coeffsDict_.lookup(
"lookUpTableFileName")),
117 "Foam::radiation::greyMeanAbsorptionEmission(const" 118 "dictionary& dict, const fvMesh& mesh)" 119 ) <<
"specie ft is not present to use with " 120 <<
"lookUpTableFileName " <<
nl 132 if (!lookUpTablePtr_.empty())
134 if (lookUpTablePtr_().found(iter.key()))
136 label index = lookUpTablePtr_().findFieldIndex(iter.key());
138 Info<<
"specie: " << iter.key() <<
" found on look-up table " 139 <<
" with index: " << index <<
endl;
141 specieIndex_[iter()] = index;
151 specieIndex_[iter()] = 0;
153 Info<<
"specie: " << iter.key() <<
" is being solved" <<
endl;
159 "Foam::radiation::greyMeanAbsorptionEmission(const" 160 "dictionary& dict, const fvMesh& mesh)" 161 ) <<
"specie: " << iter.key()
162 <<
" is neither in look-up table: " 163 << lookUpTablePtr_().tableName()
164 <<
" nor is being solved" <<
nl 177 specieIndex_[iter()] = 0;
184 "Foam::radiation::greyMeanAbsorptionEmission(const" 185 "dictionary& dict, const fvMesh& mesh)" 186 ) <<
" there is not lookup table and the specie" <<
nl 188 <<
" is not found " <<
nl 219 "aCont" +
name(bandI),
227 zeroGradientFvPatchVectorField::typeName
239 if (specieIndex_[n] != 0)
245 const List<scalar>& Ynft = lookUpTablePtr_().lookUp(ft[cellI]);
247 Xipi = Ynft[specieIndex_[
n]]*
paToAtm(p[cellI]);
254 invWt += mixture.
Y(
s)[cellI]/mixture.
W(
s);
258 scalar Xk = mixture.
Y(index)[cellI]/(mixture.
W(index)*invWt);
265 scalar Ti = T[cellI];
267 if (coeffs_[n].invTemp())
274 ((((b[5]*Ti + b[4])*Ti + b[3])*Ti + b[2])*Ti + b[1])*Ti
279 ta().correctBoundaryConditions();
300 "ECont" +
name(bandI),
301 mesh_.time().timeName(),
318 E().internalField() = EhrrCoeff_*dQ/mesh_.V();
322 E().internalField() = EhrrCoeff_*
dQ;
330 "tmp<volScalarField>" 331 "radiation::greyMeanAbsorptionEmission::ECont" 336 <<
"Incompatible dimensions for dQ field" <<
endl;
344 "tmp<volScalarField>" 345 "radiation::greyMeanAbsorptionEmission::ECont" 349 ) <<
"dQ field not found in mesh" <<
endl;
dimensionedScalar pow3(const dimensionedScalar &ds)
Mesh data needed to do the Finite Volume discretisation.
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].
tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
word name(const complex &)
Return a string representation of a complex.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
bool foundObject(const word &name) const
Is the named Type found?
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
defineTypeNameAndDebug(cloudAbsorptionEmission, 0)
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual scalar W(const label speciei) const =0
Molecular weight of the given specie [kg/kmol].
const dimensionSet dimEnergy
addToRunTimeSelectionTable(absorptionEmissionModel, cloudAbsorptionEmission, dictionary)
A list of keyword definitions, which are a keyword followed by any number of values (e...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const word & constant() const
Return constant name.
const Time & time() const
Return the top-level database.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
#define WarningIn(functionName)
Report a warning using Foam::Warning.
Model to supply absorption and emission coefficients for radiation modelling.
greyMeanAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
PtrList< volScalarField > & Y
virtual ~greyMeanAbsorptionEmission()
Destructor.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Macros for easy insertion into run-time selection tables.
Unit conversion functions.
const dimensionSet & dimensions() const
Return dimensions.
errorManip< error > abort(error &err)
Fundamental fluid thermodynamic properties.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
const dimensionSet dimVolume(pow3(dimLength))
A class for handling file names.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
const word dictName() const
Return the local dictionary name (final part of scoped name)
const speciesTable & species() const
Return the table of species.
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
scalar paToAtm(const scalar pa)
Conversion from atm to Pa.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A class for managing temporary objects.
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.