| 
    chemmisol 0.1
    
   | 
 
#include <species.h>

Public Member Functions | |
| const std::string & | getName () const | 
| std::size_t | getIndex () const | 
| virtual Phase | getPhase () const =0 | 
| virtual void | incrementConcentration (double extent)=0 | 
| virtual double | concentration () const =0 | 
| virtual double | concentration (double quantity) const =0 | 
| double | activity () const | 
| virtual double | activity (double concentration) const =0 | 
| double | quantity () const | 
| virtual double | quantity (double activity) const =0 | 
| virtual std::complex< double > | quantity (std::complex< double > activity) const =0 | 
| virtual void | setActivity (double activity)=0 | 
Protected Member Functions | |
| ChemicalSpecies (const std::string &name, std::size_t index) | |
Describes a chemical species contained in a chemical system. A quantity() is assigned to each chemical species in a system, typically in mole, and a concentration() and an activity() corresponding to this quantity is also defined, depending on the phase and type of the chemical species.
The methods activity(concentration) -> quantity(activity) -> concentration(quantity) form a triangle that allows to convert between concentrations, activities and quantities of species of any phase.
      
  | 
  inlineprotected | 
Defines a simple chemical species.
| name | Name of the species. | 
| index | Index used to retrieve the species in data structures used internally by the ChemicalSystem. The index can also be used to uniquely identify each species of a system. | 
      
  | 
  inline | 
Name of the component.
      
  | 
  inline | 
Index used to retrieve the species in data structures used internally by the ChemicalSystem. The index can also be used to uniquely identify each chemical species of a system.
      
  | 
  pure virtual | 
Phase of the chemical species.
Implemented in chemmisol::AqueousSpecies, chemmisol::FixedAqueousSpecies, chemmisol::Solvent, chemmisol::MineralSpecies, and chemmisol::FixedMineralSpecies.
      
  | 
  pure virtual | 
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 | 
Implemented in chemmisol::AqueousSpecies, chemmisol::MineralSpecies, and chemmisol::FixedChemicalSpecies.
      
  | 
  pure virtual | 
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...).
Implemented in chemmisol::FixedChemicalSpecies, chemmisol::AqueousSpecies, and chemmisol::MineralSpecies.
      
  | 
  pure virtual | 
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 | 
Implemented in chemmisol::AqueousSpecies, chemmisol::MineralSpecies, and chemmisol::FixedChemicalSpecies.
      
  | 
  inline | 
Returns the current activity of the component.
The theoretical definition of the activity might vary depending on the nature of the component (aqueous, gaz, mineral...).
The implementation is equivalent to a call to activity(concentration()), so that the implementation of the activity(double concentration) method defines the value returned by the activity() method.
      
  | 
  pure virtual | 
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 | 
Implemented in chemmisol::AqueousSpecies, chemmisol::MineralSpecies, and chemmisol::FixedChemicalSpecies.
      
  | 
  inline | 
Returns the current quantity of the chemical species.
The quantity must be understood as a count of items, for example the count of molecules corresponding to the chemical species in the system, typically expressed in mole.
The implementation is equivalent to a call to quantity(concentration()), so that the implementation of the quantity(double concentration) method defines the value returned by the quantity() method.
      
  | 
  pure virtual | 
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 | 
Implemented in chemmisol::AqueousSpecies, chemmisol::MineralSpecies, and chemmisol::FixedChemicalSpecies.
      
  | 
  pure virtual | 
Sets the activity of the chemical species. The quantity() and concentration() values are updated accordingly.
Implemented in chemmisol::AqueousSpecies, chemmisol::MineralSpecies, and chemmisol::FixedChemicalSpecies.