Cantera  3.1.0a1
Species Class Reference

Contains data about a single chemical species. More...

#include <Species.h>

Detailed Description

Contains data about a single chemical species.

This class stores the data about a species which may be needed to add it to a ThermoPhase or Transport object.

Definition at line 24 of file Species.h.

Public Member Functions

 Species (const string &name, const Composition &comp, double charge=0.0, double size=1.0)
 Constructor. More...
 
 Species (const Species &)=delete
 Species objects are not copyable or assignable. More...
 
Speciesoperator= (const Species &other)=delete
 
AnyMap parameters (const ThermoPhase *phase=0, bool withInput=true) const
 
double molecularWeight ()
 The molecular weight [amu] of the species. More...
 
void setMolecularWeight (double weight)
 Set the molecular weight of the species. More...
 

Public Attributes

string name
 The name of the species. More...
 
Composition composition
 The elemental composition of the species. More...
 
double charge = 0.0
 The electrical charge on the species, in units of the elementary charge. More...
 
double size = 1.0
 The effective size of the species. More...
 
shared_ptr< TransportDatatransport
 
shared_ptr< SpeciesThermoInterpTypethermo
 Thermodynamic data for the species. More...
 
AnyMap input
 Input parameters used to define a species, for example from a YAML input file. More...
 

Protected Attributes

double m_molecularWeight = Undef
 The molecular weight of the species, in atomic mass units. More...
 

Constructor & Destructor Documentation

◆ Species() [1/2]

Species ( const string &  name,
const Composition comp,
double  charge = 0.0,
double  size = 1.0 
)

Constructor.

Definition at line 20 of file Species.cpp.

◆ Species() [2/2]

Species ( const Species )
delete

Species objects are not copyable or assignable.

Member Function Documentation

◆ molecularWeight()

double molecularWeight ( )

The molecular weight [amu] of the species.

Calculates and sets the molecular weight from the elemental composition of the species and element definitions in Elements.cpp, if the molecular weight is Undef.

Since
New in version 3.0

Definition at line 29 of file Species.cpp.

◆ setMolecularWeight()

void setMolecularWeight ( double  weight)

Set the molecular weight of the species.

Since phases can have custom element weights, the phase will always call this method when a species is added to that phase. The species may also call this method the first time the molecularWeight() method is called if the species has not been added to a phase.

Parameters
weightThe weight of this species to assign
Since
New in version 3.0

Definition at line 48 of file Species.cpp.

Member Data Documentation

◆ name

string name

The name of the species.

Definition at line 41 of file Species.h.

◆ composition

Composition composition

The elemental composition of the species.

Keys are element names; values are the corresponding atomicities.

Definition at line 45 of file Species.h.

◆ charge

double charge = 0.0

The electrical charge on the species, in units of the elementary charge.

Definition at line 48 of file Species.h.

◆ size

double size = 1.0

The effective size of the species.

Currently used only for surface species, where it represents the number of sites occupied.

Definition at line 52 of file Species.h.

◆ thermo

shared_ptr<SpeciesThermoInterpType> thermo

Thermodynamic data for the species.

Definition at line 80 of file Species.h.

◆ input

AnyMap input

Input parameters used to define a species, for example from a YAML input file.

Definition at line 83 of file Species.h.

◆ m_molecularWeight

double m_molecularWeight = Undef
protected

The molecular weight of the species, in atomic mass units.

Includes electron mass for charged species.

Definition at line 89 of file Species.h.


The documentation for this class was generated from the following files: