Cantera  2.3.0
Namespaces | Macros | Functions
Elements.h File Reference

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

#include "cantera/base/ct_defs.h"
Include dependency graph for 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

double LookupWtElements (const std::string &ename)
 Function to look up an atomic weight. More...
 
double getElementWeight (const std::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 std::string &ename)
 Get the symbol for an element. More...
 
string getElementSymbol (int atomicNumber)
 Get the symbol for an element. More...
 
string getElementName (const std::string &ename)
 Get the name of an element. More...
 
string getElementName (int atomicNumber)
 Get the name of an element. More...
 
int getAtomicNumber (const std::string &ename)
 Get the atomic number for an element. More...
 
int numElementsDefined ()
 Get the number of named elements defined in Cantera. More...
 
int numIsotopesDefined ()
 Get the number of named isotopes defined in Cantera. More...
 

Detailed Description

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

Definition in file Elements.h.

Macro Definition Documentation

◆ CT_ELEM_TYPE_TURNEDOFF

#define CT_ELEM_TYPE_TURNEDOFF   -1

An element constraint that is current turned off.

Definition at line 28 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 37 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 43 of file Elements.h.

Referenced by Phase::addElement(), and Phase::addSpecies().

◆ 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 49 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 56 of file Elements.h.

Referenced by LatticeSolidPhase::initThermo().

◆ 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 67 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 76 of file Elements.h.

◆ CT_ELEM_TYPE_OTHERCONSTRAINT

#define CT_ELEM_TYPE_OTHERCONSTRAINT   6

Other constraint equations.

currently there are none

Definition at line 82 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 87 of file Elements.h.

Referenced by Phase::entropyElement298(), Cantera::installElements(), and PDSS_HKFT::LookupGe().