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.
Public Member Functions | |
Species (const string &name, const Composition &comp, double charge=0.0, double size=1.0) | |
Constructor. | |
Species (const Species &)=delete | |
Species objects are not copyable or assignable. | |
Species & | operator= (const Species &other)=delete |
AnyMap | parameters (const ThermoPhase *phase=0, bool withInput=true) const |
double | molecularWeight () |
The molecular weight [amu] of the species. | |
void | setMolecularWeight (double weight) |
Set the molecular weight of the species. | |
Public Attributes | |
string | name |
The name of the species. | |
Composition | composition |
The elemental composition of the species. | |
double | charge = 0.0 |
The electrical charge on the species, in units of the elementary charge. | |
double | size = 1.0 |
The effective size of the species. | |
shared_ptr< TransportData > | transport |
shared_ptr< SpeciesThermoInterpType > | thermo |
Thermodynamic data for the species. | |
AnyMap | input |
Input parameters used to define a species, for example from a YAML input file. | |
Protected Attributes | |
double | m_molecularWeight = Undef |
The molecular weight of the species, in atomic mass units. | |
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]
Member Function Documentation
◆ parameters()
AnyMap parameters | ( | const ThermoPhase * | phase = 0 , |
bool | withInput = true |
||
) | const |
Definition at line 66 of file Species.cpp.
◆ 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
-
weight The weight of this species to assign
- Since
- New in version 3.0
Definition at line 48 of file Species.cpp.
Member Data Documentation
◆ name
◆ composition
Composition composition |
◆ charge
double charge = 0.0 |
◆ size
double size = 1.0 |
◆ transport
shared_ptr<TransportData> transport |
◆ thermo
shared_ptr<SpeciesThermoInterpType> thermo |
◆ input
AnyMap input |
◆ m_molecularWeight
|
protected |
The documentation for this class was generated from the following files:
Generated by 1.9.7