Cantera  3.1.0a1
Elements.h File Reference

Contains the getElementWeight function and the definitions of element constraint types. More...

Include dependency graph for Elements.h:

Detailed Description

Contains the getElementWeight function and the definitions of element constraint types.

Definition in file Elements.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Cantera
 Namespace for the Cantera kernel.
 

Macros

#define ENTROPY298_UNKNOWN   -123456789.
 Number indicating we don't know the entropy of the element in its most stable state at 298.15 K and 1 bar. More...
 
Types of Element Constraint Equations

There may be several different types of element constraints handled by the equilibrium program and by Cantera in other contexts.

These defines are used to assign each constraint to one category.

#define CT_ELEM_TYPE_TURNEDOFF   -1
 An element constraint that is current turned off. More...
 
#define CT_ELEM_TYPE_ABSPOS   0
 Normal element constraint consisting of positive coefficients for the formula matrix. More...
 
#define CT_ELEM_TYPE_ELECTRONCHARGE   1
 This refers to conservation of electrons. More...
 
#define CT_ELEM_TYPE_CHARGENEUTRALITY   2
 This refers to a charge neutrality of a single phase. More...
 
#define CT_ELEM_TYPE_LATTICERATIO   3
 Constraint associated with maintaining a fixed lattice stoichiometry in a solid. More...
 
#define CT_ELEM_TYPE_KINETICFROZEN   4
 Constraint associated with maintaining frozen kinetic equilibria in some functional groups within molecules. More...
 
#define CT_ELEM_TYPE_SURFACECONSTRAINT   5
 Constraint associated with the maintenance of a surface phase. More...
 
#define CT_ELEM_TYPE_OTHERCONSTRAINT   6
 Other constraint equations. More...
 

Functions

const vector< string > & elementSymbols ()
 Get a vector of the atomic symbols of the elements defined in Cantera. More...
 
const vector< string > & elementNames ()
 Get a vector of the names of the elements defined in Cantera. More...
 
const map< string, double > & elementWeights ()
 Get a map with the element and isotope symbols and names as keys and weights as values. More...
 
double getElementWeight (const string &ename)
 Get the atomic weight of an element. More...
 
double getElementWeight (int atomicNumber)
 Get the atomic weight of an element. More...
 
string getElementSymbol (const string &ename)
 Get the symbol for an element. More...
 
string getElementSymbol (int atomicNumber)
 Get the symbol for an element. More...
 
string getElementName (const string &ename)
 Get the name of an element. More...
 
string getElementName (int atomicNumber)
 Get the name of an element. More...
 
int getAtomicNumber (const string &ename)
 Get the atomic number for an element. More...
 
size_t numElementsDefined ()
 Get the number of named elements defined in Cantera. More...
 
size_t numIsotopesDefined ()
 Get the number of named isotopes defined in Cantera. More...
 

Macro Definition Documentation

◆ CT_ELEM_TYPE_TURNEDOFF

#define CT_ELEM_TYPE_TURNEDOFF   -1

An element constraint that is current turned off.

Definition at line 26 of file Elements.h.

◆ CT_ELEM_TYPE_ABSPOS

#define CT_ELEM_TYPE_ABSPOS   0

Normal element constraint consisting of positive coefficients for the formula matrix.

All species have positive coefficients within the formula matrix. With this constraint, we may employ various strategies to handle small values of the element number successfully.

Definition at line 35 of file Elements.h.

◆ CT_ELEM_TYPE_ELECTRONCHARGE

#define CT_ELEM_TYPE_ELECTRONCHARGE   1

This refers to conservation of electrons.

Electrons may have positive or negative values in the Formula matrix.

Definition at line 41 of file Elements.h.

◆ CT_ELEM_TYPE_CHARGENEUTRALITY

#define CT_ELEM_TYPE_CHARGENEUTRALITY   2

This refers to a charge neutrality of a single phase.

Charge neutrality may have positive or negative values in the Formula matrix.

Definition at line 47 of file Elements.h.

◆ CT_ELEM_TYPE_LATTICERATIO

#define CT_ELEM_TYPE_LATTICERATIO   3

Constraint associated with maintaining a fixed lattice stoichiometry in a solid.

The constraint may have positive or negative values. The lattice 0 species will have negative values while higher lattices will have positive values

Definition at line 54 of file Elements.h.

◆ CT_ELEM_TYPE_KINETICFROZEN

#define CT_ELEM_TYPE_KINETICFROZEN   4

Constraint associated with maintaining frozen kinetic equilibria in some functional groups within molecules.

We seek here to say that some functional groups or ionic states should be treated as if they are separate elements given the time scale of the problem. This will be abs positive constraint. We have not implemented any examples yet. A requirement will be that we must be able to add and subtract these constraints.

Definition at line 65 of file Elements.h.

◆ CT_ELEM_TYPE_SURFACECONSTRAINT

#define CT_ELEM_TYPE_SURFACECONSTRAINT   5

Constraint associated with the maintenance of a surface phase.

We don't have any examples of this yet either. However, surfaces only exist because they are interfaces between bulk layers. If we want to treat surfaces within thermodynamic systems we must come up with a way to constrain their total number.

Definition at line 74 of file Elements.h.

◆ CT_ELEM_TYPE_OTHERCONSTRAINT

#define CT_ELEM_TYPE_OTHERCONSTRAINT   6

Other constraint equations.

currently there are none

Definition at line 80 of file Elements.h.

◆ ENTROPY298_UNKNOWN

#define ENTROPY298_UNKNOWN   -123456789.

Number indicating we don't know the entropy of the element in its most stable state at 298.15 K and 1 bar.

Definition at line 85 of file Elements.h.