45 absorptionEmissionModel,
46 greyMeanAbsorptionEmission,
62 coeffsDict_((
dict.optionalSubDict(typeName +
"Coeffs"))),
67 EhrrCoeff_(coeffsDict_.
get<scalar>(
"EhrrCoeff")),
70 if (!isA<basicSpecieMixture>(thermo_))
73 <<
"Model requires a multi-component thermo package" 81 for (
const entry& dEntry : functionDicts)
88 const word&
key = dEntry.keyword();
99 coeffsDict_.
found(
"lookUpTableFileName")
100 &&
"none" != coeffsDict_.
get<word>(
"lookUpTableFileName")
103 lookUpTablePtr_.reset
105 new interpolationLookUpTable<scalar>
107 coeffsDict_.
get<fileName>(
"lookUpTableFileName"),
116 <<
"specie ft is not present to use with " 117 <<
"lookUpTableFileName " <<
nl 128 const word& specieName = iter.key();
129 const label index = iter.val();
135 if (lookUpTablePtr_().found(specieName))
137 const label fieldIndex =
138 lookUpTablePtr_().findFieldIndex(specieName);
140 Info<<
"specie: " << specieName <<
" found on look-up table " 141 <<
" with index: " << fieldIndex <<
endl;
143 specieIndex_[index] = fieldIndex;
148 specieIndex_[index] = 0;
150 Info<<
"specie: " << iter.key() <<
" is being solved" <<
endl;
155 <<
"specie: " << specieName
156 <<
" is neither in look-up table: " 157 << lookUpTablePtr_().tableName()
158 <<
" nor is being solved" <<
nl 165 specieIndex_[index] = 0;
171 <<
"There is no lookup table and the specie" <<
nl 173 <<
" is not found " <<
nl 199 "aCont" +
name(bandI),
205 auto& a = ta.ref().primitiveFieldRef();
213 if (specieIndex_[
n] != 0)
219 const List<scalar>& Ynft = lookUpTablePtr_().lookUp(ft[celli]);
221 Xipi = Ynft[specieIndex_[
n]]*
paToAtm(
p[celli]);
231 const label index =
mixture.species().find(iter.key());
239 scalar Ti =
T[celli];
241 if (coeffs_[
n].invTemp())
248 ((((
b[5]*Ti +
b[4])*Ti +
b[3])*Ti +
b[2])*Ti +
b[1])*Ti
253 ta.ref().correctBoundaryConditions();
270 "ECont" +
name(bandI),
284 E.
ref().primitiveFieldRef() = EhrrCoeff_*
Qdot/mesh_.V();
288 E.ref().primitiveFieldRef() = EhrrCoeff_*
Qdot;
295 <<
"Incompatible dimensions for Qdot field" <<
endl;
302 <<
"Qdot field not found in mesh" <<
endl;
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
Abstract base-class for fluid and solid thermodynamic properties.
void initialise(const dictionary &)
tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
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.
const dictionary & dict() const
Reference to the dictionary.
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.
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
Macros for easy insertion into run-time selection tables.
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.
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))
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
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.
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.
greyMeanAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
errorManip< error > abort(error &err)
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
const word & constant() const noexcept
Return constant name.
int debug
Static debugging option.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const dimensionSet dimEnergy
dimensionedScalar pow3(const dimensionedScalar &ds)
#define WarningInFunction
Report a warning using Foam::Warning.
absorptionCoeffs coeffs_[nSpecies_]
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
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()
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))
static const word & extrapolatedCalculatedType() noexcept
The type name for extrapolatedCalculated patch fields combines zero-gradient and calculated.
virtual ~greyMeanAbsorptionEmission()
Destructor.
Do not request registration (bool: false)
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
forAllConstIters(mixture.phases(), phase)
static constexpr const zero Zero
Global zero (0)