|
chemmisol 0.1
|
#include <species.h>


Public Member Functions | |
| AqueousSpecies (const std::string &name, std::size_t id, double C) | |
| Phase | getPhase () const override |
| void | incrementConcentration (double extent) override |
| double | concentration () const override |
| double | concentration (double quantity) const override |
| double | quantity (double activity) const override |
| std::complex< double > | quantity (std::complex< double > activity) const override |
| double | activity (double concentration) const override |
| void | setActivity (double activity) override |
Public Member Functions inherited from chemmisol::ChemicalSpecies | |
| const std::string & | getName () const |
| std::size_t | getIndex () const |
| double | activity () const |
| double | quantity () const |
Static Public Attributes | |
| static const double | V |
Additional Inherited Members | |
Protected Member Functions inherited from chemmisol::ChemicalSpecies | |
| ChemicalSpecies (const std::string &name, std::size_t index) | |
Aqueous species implementation.
The concentration of an aqueous component is defined as C=n/V where n is the component quantity and V is the volume of the solution. A concentration is usually expressed in mol/L (molar).
The activity of an aqueous component is defined as C/C0 where C0 is the standard state concentration defined as 1mol/L.
|
inline |
Defines a new AqueousSpecies and initializes its concentration to C. It is the responsibility of the user to ensure unit consistency. Predefined units can be used for this purpose, for example:
using namespace mineral;
AqueousSpecies species("Na+", i, 0.1*mol/l);
|
inlineoverridevirtual |
Phase of the chemical species.
Implements chemmisol::ChemicalSpecies.
|
inlineoverridevirtual |
Increments the concentration of the current component, considering that its absolute quantity is incremented by extent.
For components in solution, this is typically C = C + extent/V.
| extent | Quantity of the current component added to the system |
Implements chemmisol::ChemicalSpecies.
|
inlineoverridevirtual |
Returns the current concentration of the component.
The theoretical definition of the concentration might vary depending on the nature of the component (aqueous, gaz, mineral...).
Implements chemmisol::ChemicalSpecies.
|
inlineoverridevirtual |
Computes the concentration of the current component corresponding to the specified quantity.
Notice that quantity might be different from quantity(), and that this call does not modify the concentration of the current component.
| quantity | Quantity of the component |
Implements chemmisol::ChemicalSpecies.
|
inlineoverridevirtual |
Computes the quantity of the current component corresponding to the specified concentration.
Notice that activity might be different from activity(), and that this call does not modify the quantity of the current component.
| activity | Activity of the component |
Implements chemmisol::ChemicalSpecies.
|
inlineoverridevirtual |
Implements chemmisol::ChemicalSpecies.
|
inlineoverridevirtual |
Computes the activity of the current component corresponding to the specified concentration.
Notice that concentration might be different from concentration(), and that this call does not modify the activity of the current component.
| concentration | Concentration of the component |
Implements chemmisol::ChemicalSpecies.
|
inlineoverridevirtual |
Sets the activity of the chemical species. The quantity() and concentration() values are updated accordingly.
Implements chemmisol::ChemicalSpecies.
|
static |
Solution volume. Currently fixed to 1 liter.
Notice that the concentration() and activity() of aqueous species do not depend on the volume.
If quantities for a different volume are required, it is currently recommend to use concentration() as output and to manually convert the result to a quantity with the formula n=C*V.
Notice that chemmisol currently does not handle reactions with a variable volume.