H2 Combustion
Compound Struct Reference

This stucture unifies all informations about a chemical compound. More...

Collaboration diagram for Compound:

List of all members.

Public Member Functions

void readComposition (std::string filename)
 Reads in the quantities for the substances from a file.
void readReactions (std::string filename)
 Reads in the available reaction using a ReactionParser.

Public Attributes

std::unordered_map< Substance
*, double > 
ingredients
std::vector< Reaction * > reactions
double Temperature

Detailed Description

It manages in which quantities substances are contained in the compound at a given moment. It also stores the temperature. Thus it gives a complete chemical state.

Furthermore it contains all reaction that are allowed to happen between the substances. It allows the information to be read in.


Member Function Documentation

void readComposition ( std::string  filename)
Parameters:
filenameThe name of file to read the quantities from.

The file is expected to be of the form containing alternating the name of the substance and the quantity, seperated by whitespaces: substance quantity [substance quantity ...]

void readReactions ( std::string  filename)
Parameters:
filenameThe name of file to read the reactions from. For the format, see ReactionParser.
 All Classes Files Functions