Cantera
2.0
|
Chemkin file reader class. More...
#include <CKReader.h>
Public Member Functions | |
CKReader () | |
Constructor. | |
~CKReader () | |
Destructor. Does nothing. | |
bool | read (const std::string &inputFile, const std::string &thermoDatabase, const std::string &logFile) |
Read and optionally validate a Chemkin input file. | |
void | write (string outputFile) |
not implemented. | |
Public Attributes | |
elementList | elements |
a list of Element objects | |
speciesList | species |
a list of Species objects | |
reactionList | reactions |
a list of Reaction objects | |
groupList | groups |
a list of Groups | |
speciesTable | speciesData |
a map from species names to Species objects | |
ReactionUnits | units |
reaction units | |
bool | verbose |
print detailed messages to log file | |
bool | validate |
validate elements, species, and reaction | |
bool | debug |
enable debugging output | |
Private Member Functions | |
bool | validateSpecies (ostream &log) |
validate the species. | |
bool | validateReactions (ostream &log) |
validate the reactions. | |
bool | writeReactions (ostream &log) |
print a summary of all reactions to the log file | |
Chemkin file reader class.
Class CKReader parses and validates a file containing a description of a chemical reaction mechanism in Chemkin format. See the Examples section for examples of how CKReader is used in user programs.
Definition at line 60 of file CKReader.h.
|
inline |
Constructor.
Construct a new CKReader instance. By default, validation is enabled, as well as verbose output to the log file.
Definition at line 68 of file CKReader.h.
|
inline |
Destructor. Does nothing.
Definition at line 71 of file CKReader.h.
bool read | ( | const std::string & | inputFile, |
const std::string & | thermoDatabase, | ||
const std::string & | logfile | ||
) |
Read and optionally validate a Chemkin input file.
read and optionally validate an input file in Chemkin format.
inputFile | path to the input file. |
thermoDatabase | path to the species thermodynamic property database. If no database is required, enter a null string. |
logFile | file to write logging and error messages to. |
inputFile | path to the input file |
thermoDatabase | path to the species database file |
logfile | path to the file where log messages should be written |
Definition at line 38 of file CKReader.cpp.
References Species::name, ckr::newTask(), ckr::NoThermoDatabase, ckr::pad(), CKParser::readElementSection(), CKParser::readSpeciesSection(), CKParser::readThermoSection(), and ckr::valid().
void write | ( | string | outputFile | ) |
not implemented.
|
private |
validate the species.
validate the species
Definition at line 382 of file CKReader.cpp.
References ckr::checkThermo(), Species::comp, ckr::getMapKeys(), Species::name, ckr::newTask(), Species::valid, and ckr::valid().
|
private |
validate the reactions.
validate the reactions
Definition at line 451 of file CKReader.cpp.
References ckr::checkBalance(), Reaction::duplicate, and Reaction::isDuplicate.
|
private |
print a summary of all reactions to the log file
Definition at line 318 of file CKReader.cpp.
References RateCoeff::A, Reaction::duplicate, Reaction::e3b, ckr::getMapKeys(), Reaction::isDuplicate, Reaction::isFalloffRxn, Reaction::isReversible, Reaction::kf, Reaction::kf_aux, Reaction::krev, Reaction::number, ckr::printReactionEquation(), ckr::writeFalloff(), and ckr::writeRateCoeff().
elementList elements |
a list of Element objects
Definition at line 73 of file CKReader.h.
speciesList species |
a list of Species objects
Definition at line 74 of file CKReader.h.
reactionList reactions |
a list of Reaction objects
Definition at line 75 of file CKReader.h.
groupList groups |
a list of Groups
Definition at line 76 of file CKReader.h.
speciesTable speciesData |
a map from species names to Species objects
Definition at line 77 of file CKReader.h.
ReactionUnits units |
reaction units
Definition at line 78 of file CKReader.h.
bool verbose |
print detailed messages to log file
Definition at line 93 of file CKReader.h.
bool validate |
validate elements, species, and reaction
Definition at line 94 of file CKReader.h.
bool debug |
enable debugging output
Definition at line 95 of file CKReader.h.