mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added dicts for themo and chemistry + code tidying
This commit is contained in:
@ -104,10 +104,13 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return access to the list of species
|
||||
virtual const speciesTable& species() const = 0;
|
||||
|
||||
//- Return access to the thermo packages
|
||||
virtual const HashPtrTable<ThermoType>& speciesThermo() const = 0;
|
||||
|
||||
//- Return access to the list of reactions
|
||||
virtual const ReactionList<ThermoType>& reactions() const = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -37,17 +37,11 @@ Foam::foamChemistryReader<ThermoType>::foamChemistryReader
|
||||
)
|
||||
:
|
||||
chemistryReader<ThermoType>(),
|
||||
speciesThermo_(dictionary(IFstream(thermoFileName.expand())())),
|
||||
speciesTable_
|
||||
(
|
||||
dictionary(IFstream(reactionsFileName.expand())()).lookup("species")
|
||||
),
|
||||
reactions_
|
||||
(
|
||||
speciesTable_,
|
||||
speciesThermo_,
|
||||
dictionary(IFstream(reactionsFileName))
|
||||
)
|
||||
chemDict_(IFstream(reactionsFileName.expand())),
|
||||
thermoDict_(IFstream(thermoFileName.expand())),
|
||||
speciesThermo_(thermoDict_),
|
||||
speciesTable_(chemDict_.lookup("species")),
|
||||
reactions_(speciesTable_, speciesThermo_, chemDict_)
|
||||
{}
|
||||
|
||||
|
||||
@ -58,38 +52,23 @@ Foam::foamChemistryReader<ThermoType>::foamChemistryReader
|
||||
)
|
||||
:
|
||||
chemistryReader<ThermoType>(),
|
||||
speciesThermo_
|
||||
chemDict_
|
||||
(
|
||||
dictionary
|
||||
IFstream
|
||||
(
|
||||
IFstream
|
||||
(
|
||||
fileName(thermoDict.lookup("foamChemistryThermoFile")).expand()
|
||||
)()
|
||||
)
|
||||
fileName(thermoDict.lookup("foamChemistryFile")).expand()
|
||||
)()
|
||||
),
|
||||
speciesTable_
|
||||
thermoDict_
|
||||
(
|
||||
dictionary
|
||||
IFstream
|
||||
(
|
||||
IFstream
|
||||
(
|
||||
fileName(thermoDict.lookup("foamChemistryFile")).expand()
|
||||
)()
|
||||
).lookup("species")
|
||||
fileName(thermoDict.lookup("foamChemistryThermoFile")).expand()
|
||||
)()
|
||||
),
|
||||
reactions_
|
||||
(
|
||||
speciesTable_,
|
||||
speciesThermo_,
|
||||
dictionary
|
||||
(
|
||||
IFstream
|
||||
(
|
||||
fileName(thermoDict.lookup("foamChemistryFile")).expand()
|
||||
)()
|
||||
)
|
||||
)
|
||||
speciesThermo_(thermoDict_),
|
||||
speciesTable_(chemDict_.lookup("species")),
|
||||
reactions_(speciesTable_, speciesThermo_, chemDict_)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -39,7 +39,6 @@ SourceFiles
|
||||
#include "fileName.H"
|
||||
#include "typeInfo.H"
|
||||
#include "HashPtrTable.H"
|
||||
#include "SLPtrList.H"
|
||||
#include "labelList.H"
|
||||
#include "speciesTable.H"
|
||||
#include "atomicWeights.H"
|
||||
@ -58,6 +57,12 @@ class foamChemistryReader
|
||||
:
|
||||
public chemistryReader<ThermoType>
|
||||
{
|
||||
//- Chemistry/reactions dictionary
|
||||
dictionary chemDict_;
|
||||
|
||||
//- Thermo properties dictionary
|
||||
dictionary thermoDict_;
|
||||
|
||||
//- Table of the thermodynamic data given in the foamChemistry file
|
||||
HashPtrTable<ThermoType> speciesThermo_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user