Reaktoro  v2.11.0
A unified framework for modeling chemically reactive systems
Reaktoro Namespace Reference

The namespace containing all components of the Reaktoro library. More...

Classes

struct  ArraySerialization
 The class implementing methods to serialize/deserialize data into/from arrays. More...
 
class  ArrayStream
 The class used to serialize/deserialize data using array. More...
 
struct  Exception
 Provides a convenient way to initialized an exception with helpful error messages. More...
 
struct  MemoizationTraits
 Used to enable function arguments of a type T to be cached in a memoized version of the function. More...
 
struct  MemoizationTraits< Eigen::Array< Scalar, Rows, Cols, Options, MaxRows, MaxCols > >
 Specialize MemoizationTraits for Eigen array types. More...
 
struct  MemoizationTraits< Eigen::Ref< EigenType > >
 Specialize MemoizationTraits for Eigen ref types. More...
 
class  Memoization
 The class used to control memoization in the application. More...
 
class  StringList
 A class for representing a list of strings with special constructors. More...
 
class  TableColumn
 Used to represent the data stored in a table column. More...
 
class  Table
 Used to store computed data in columns. More...
 
class  Stopwatch
 Used for measuring elapsed time since object creation. More...
 
class  Warnings
 Used to control warnings in the execution of Reaktoro. More...
 
struct  ActivityModelArgs
 The arguments in an function for calculation of activity properties of a phase. More...
 
struct  MemoizationTraits< ActivityModelArgs >
 Specialize MemoizationTraits for ActivityModelArgs. More...
 
struct  ActivityPropsBase
 The base type for the primary activity and corrective thermodynamic properties of a phase. More...
 
class  ChemicalFormula
 A type used to represent the chemical formula of a chemical species. More...
 
class  ChemicalProps
 The class that computes chemical properties of a chemical system. More...
 
struct  ChemicalPropsPhaseBaseData
 The base type for primary chemical property data of a phase from which others are computed. More...
 
class  ChemicalPropsPhaseBase
 The base type for chemical properties of a phase and its species. More...
 
class  ChemicalState
 The chemical state of a chemical system. More...
 
struct  MemoizationTraits< ChemicalState >
 Specialize MemoizationTraits for ChemicalState. More...
 
class  ChemicalSystem
 The class used to represent a chemical system and its attributes and properties. More...
 
class  Data
 The class used to store and retrieve data for assemblying chemical systems. More...
 
class  Database
 The class used to store and retrieve data of chemical species. More...
 
class  Element
 A type used to define a element and its attributes. More...
 
class  ElementalComposition
 A type used to describe the elemental composition of chemical species. More...
 
class  ElementList
 A type used as a collection of elements. More...
 
class  Embedded
 Used to retrieve embedded resources (e.g., database files, parameter files) in Reaktoro. More...
 
class  FormationReaction
 A class to represent a formation reaction of a chemical species. More...
 
class  Model
 
class  Model< Result(Args...)>
 The class used to represent a model function and its parameters. More...
 
class  Params
 Used to store and retrieve model parameters. More...
 
class  Phase
 A type used to define a phase and its attributes. More...
 
class  PhaseList
 A type used as a collection of phases. More...
 
struct  Speciate
 The auxiliary type used to specify phase species to be determined from element symbols. More...
 
struct  Exclude
 The auxiliary type used to specify species that should be filtered out when contructing a phase. More...
 
class  GeneralPhase
 The base type for all other classes defining more specific phases. More...
 
class  GeneralPhasesGenerator
 The base type for a generator of general phases with a single species. More...
 
class  Phases
 The class used to define the phases that will constitute the chemical system of interest. More...
 
class  AqueousPhase
 The class used to configure an aqueous solution phase. More...
 
class  GaseousPhase
 The class used to configure a gaseous solution phase. More...
 
class  LiquidPhase
 The class used to configure a liquid solution phase. More...
 
class  SolidPhase
 The class used to configure a solid solution phase. More...
 
class  MineralPhase
 The class used to configure a pure mineral phase. More...
 
class  MineralPhases
 The class used to configure automatic selection of pure mineral phases. More...
 
class  CondensedPhase
 The class used to configure a pure condensed phase. More...
 
class  CondensedPhases
 The class used to configure automatic selection of pure condensed phases. More...
 
class  IonExchangePhase
 The class used to configure an ion exchange phase. More...
 
class  Prop
 Used to retrieve a specified property from the chemical properties of a system. More...
 
class  Reaction
 A class to represent a reaction and its attributes. More...
 
class  ReactionEquation
 A type used to represent the equation of a reaction. More...
 
class  ReactionList
 A type used as a collection of reactions. More...
 
class  ReactionRate
 The result of a reaction rate model evaluation. More...
 
struct  ReactionRateModelGeneratorArgs
 The data provided to a ReactionRateModelGenerator to construct the ReactionRateModel of a reaction. More...
 
struct  ReactionGeneratorArgs
 The data provided to a ReactionGenerator to construct a Reaction object. More...
 
class  GeneralReaction
 Used to define a general reaction. More...
 
class  Reactions
 Used to represent a collection of reactions controlled kinetically. More...
 
struct  ReactionStandardThermoModelArgs
 The arguments in a ReactionStandardThermoModel function object. More...
 
struct  ReactionStandardThermoProps
 The primary standard thermodynamic properties of a chemical reaction. More...
 
struct  ReactionThermoProps
 The complete set of standard thermodynamic properties of a chemical reaction. More...
 
class  Species
 A type used to represent a chemical species and its attributes. More...
 
class  SpeciesList
 A type used as a collection of species. More...
 
struct  SpeciesThermoProps
 The complete set of standard thermodynamic properties of a chemical species. More...
 
struct  StandardThermoProps
 The primary standard thermodynamic properties of a chemical species. More...
 
class  DatabaseParser
 Used to handle the parsing of YAML or JSON files to construct a Database object. More...
 
class  Surface
 Used to represent a surface across which chemical reactions take place. More...
 
class  SurfaceList
 A type used as a collection of surfaces. More...
 
class  GeneralSurface
 Used to define a general surface. More...
 
class  Surfaces
 Used to represent a collection of surfaces across which chemical reactions take place. More...
 
class  ThermoProps
 The standard thermodynamic properties of the species in a chemical system. More...
 
struct  ThermoPropsPhaseBaseData
 The base type for primary standard thermodynamic property data of a phase from which others are computed. More...
 
class  ThermoPropsPhaseBase
 The base type for standard thermodynamic properties of a phase and its species. More...
 
class  EquilibriumConditions
 The class used to define conditions to be satisfied at chemical equilibrium. More...
 
struct  EquilibriumDims
 The dimensions of the variables in a chemical equilibrium problem. More...
 
class  EquilibriumHessian
 Used to compute the Hessian matrix of the Gibbs energy function. More...
 
struct  EquilibriumOptions
 The options for the equilibrium calculations. More...
 
class  EquilibriumPredictor
 Used to predict a chemical equilibrium state at given conditions using first-order Taylor approximation. More...
 
class  EquilibriumProps
 The class that computes chemical properties of a system during equilibrium calculations. More...
 
class  EquilibriumRestrictions
 The class used to define reactivity restrictions in a chemical equilibrium calculation. More...
 
struct  EquilibriumResult
 A type used to describe the result of an equilibrium calculation. More...
 
class  EquilibriumSensitivity
 The sensitivity derivatives of a chemical equilibrium state. More...
 
class  EquilibriumSetup
 Used to construct the optimization problem for a chemical equilibrium calculation. More...
 
class  EquilibriumSolver
 Used for calculating chemical equilibrium states. More...
 
struct  ControlVariableQ
 Used to define a q control variable in a chemical equilibrium problem. More...
 
struct  ControlVariableP
 Used to define a p control variable in a chemical equilibrium problem. More...
 
struct  EquationConstraintFn
 Used to define the function that evaluates the residual of an equation constraint in a chemical equilibrium problem. More...
 
struct  EquationConstraint
 Used to define equation constraints in a chemical equilibrium problem. More...
 
struct  ConstraintEquation
 Used to define equation constraints in a chemical equilibrium problem. More...
 
struct  EquationConstraints
 Used to define a system of equation constraints in a chemical equilibrium problem. More...
 
struct  ReactivityConstraint
 Used to define reactivity restrictions among species in the chemical equilibrium calculation. More...
 
struct  ReactivityConstraints
 Used to define a system of reactivity restrictions among species in the chemical equilibrium calculation. More...
 
class  EquilibriumSpecs
 The class used to define conditions to be satisfied at chemical equilibrium. More...
 
struct  SmartEquilibriumOptions
 The options for the smart equilibrium calculations. More...
 
struct  SmartEquilibriumTiming
 Used to provide timing information of the operations during a smart chemical equilibrium calculation. More...
 
struct  SmartEquilibriumResultDuringPrediction
 Used to represent the result of a prediction operation in a smart chemical equilibrium calculation. More...
 
struct  SmartEquilibriumResultDuringLearning
 Used to represent the result of a learning operation in a smart chemical equilibrium calculation. More...
 
struct  SmartEquilibriumResult
 Used to describe the result of a smart chemical equilibrium calculation. More...
 
class  SmartEquilibriumSolver
 Used for calculating chemical equilibrium states using an on-demand machine learning (ODML) strategy. More...
 
class  NasaDatabase
 Used to support thermodynamic databases in NASA CEA format. More...
 
class  Phreeqc
 
class  PhreeqcDatabase
 The class used to store and retrieve data of chemical species from PHREEQC databases. More...
 
class  SupcrtDatabase
 The class used to store and retrieve data of chemical species from SUPCRT databases. More...
 
class  ThermoFunDatabase
 The class used to store and retrieve data of chemical species from ThermoFun databases. More...
 
class  ThermoFunEngine
 The class used for standard thermodynamic property calculations based on ThermoFun. More...
 
struct  KineticsOptions
 The options for chemical kinetics calculation. More...
 
struct  KineticsResult
 Used to describe the result of a chemical kinetics calculation. More...
 
class  KineticsSensitivity
 The sensitivity derivatives of a chemical equilibrium state. More...
 
class  KineticsSolver
 Used for chemical kinetics calculations. More...
 
struct  SmartKineticsOptions
 The options for smart chemical kinetics calculation. More...
 
struct  SmartKineticsResult
 Used to describe the result of a smart chemical kinetics calculation. More...
 
class  SmartKineticsSolver
 Used for chemical kinetics calculations. More...
 
class  BilinearInterpolator
 A class used to calculate bilinear interpolation of data in two dimensions. More...
 
class  LagrangeInterpolator
 A class used to calculate interpolation of data in one dimension in any order. More...
 
struct  LU
 The class that computes the full pivoting Auxiliary struct for storing the LU decomposition of a matrix A. More...
 
struct  ActivityModelDaviesParams
 The parameters in the Davies activity model for aqueous electrolyte solutions. More...
 
struct  ActivityModelDebyeHuckelParams
 The parameters in the Debye–Hückel activity model for aqueous electrolyte solutions. More...
 
struct  ActivityModelDrummondParams
 The parameters in the Drummond (1981) activity model. More...
 
struct  ActivityModelParamsExtendedUNIQUAC
 The parameters in the Extended UNIQUAC activity model for aqueous electrolyte solutions. More...
 
struct  ActivityModelParamsPitzer
 The parameters in the Pitzer activity model for aqueous electrolyte solutions. More...
 
struct  AqueousMixtureState
 A type used to describe the state of an aqueous mixture. More...
 
class  AqueousMixture
 A type used to describe an aqueous mixture. More...
 
struct  IonExchangeSurfaceState
 A type used to describe the state of an ion exchange surface. More...
 
class  IonExchangeSurface
 A type used to describe an ion exchange surface. More...
 
struct  ReactionRateModelParamsPalandriKharaka
 The parameters in the reaction rate model of [for] dissolution/precipitation kinetics of minerals. More...
 
struct  ReactionStandardThermoModelParamsConstLgK
 The parameters in a thermodynamic model for a formation reaction based on constant \(\lg K(T)\). More...
 
struct  ReactionStandardThermoModelParamsGemsLgK
 The parameters in the thermodynamic model for a formation reaction based on GEM-Selektor's expression for \(\lg K(T)\). More...
 
struct  ReactionStandardThermoModelParamsPhreeqcLgK
 The parameters in the thermodynamic model for a formation reaction based on PHREEQC's expression for \(\lg K(T)\). More...
 
struct  ReactionStandardThermoModelParamsVantHoff
 The parameters in a van't Hoff thermodynamic model for a formation reaction. More...
 
struct  StandardThermoModelParamsConstant
 The parameters in the constant model for calculating standard thermodynamic properties of species. More...
 
struct  StandardThermoModelParamsExtendedUNIQUAC
 The parameters in the extended UNIQUAC model for calculating standard thermodynamic properties of substances. More...
 
struct  StandardThermoModelParamsHKF
 The parameters in the HKF model for calculating standard thermodynamic properties of aqueous solutes. More...
 
struct  StandardThermoModelParamsHollandPowell
 The parameters in the Holland-Powell model for calculating standard thermodynamic properties of fluid and mineral species. More...
 
struct  StandardThermoModelParamsInterpolation
 The parameters in the Maier-Kelley model for calculating standard thermodynamic properties of fluid and solid species. More...
 
struct  StandardThermoModelParamsMaierKelley
 The parameters in the Maier-Kelley model for calculating standard thermodynamic properties of fluid and solid species. More...
 
struct  StandardThermoModelParamsMineralHKF
 The parameters in the Maier-Kelley-HKF model for calculating standard thermodynamic properties of mineral species. More...
 
struct  StandardThermoModelParamsNasa
 The parameters in the NASA polynomial model for calculating standard thermodynamic properties of gases and condensed species. More...
 
struct  StandardThermoModelParamsWaterHKF
 The parameters in the HKF model for calculating standard thermodynamic properties of the aqueous solvent (water). More...
 
struct  StandardVolumeModelParamsConstant
 The parameters in the constant model for calculating standard volume of a product species in a formation reaction. More...
 
struct  SpeciesElectroProps
 The electrostatic properties of an aqueous solute species. More...
 
struct  gHKF
 The g function state of in HKF model for computation of electrostatic properties of aqueous solutes. More...
 
class  ClusterConnectivity
 
class  PriorityQueue
 
struct  SubstanceCriticalPropsData
 A type used to represent the critical properties of a substance. More...
 
class  SubstanceCriticalProps
 A type used to represent a substance and its critical properties. More...
 
class  CriticalProps
 A type used store a collection of substances and their critical properties. More...
 
struct  DissociationReaction
 A type used to represent a dissociation reaction of a neutral substance into ions. More...
 
class  DissociationReactions
 A type used store a collection of dissociation reactions. More...
 
class  Elements
 A type used store a collection of elements. More...
 
class  AqueousProps
 The chemical properties of an aqueous phase. More...
 
class  IonExchangeProps
 The chemical properties of an aqueous phase. More...
 
class  Material
 A type used to represent a material composed of one or more substances. More...
 
class  MineralReaction
 The class used to configure mineral dissolution/precipitation reactions. More...
 
struct  MineralReactionRateModelArgs
 The data provided to a MineralReactionRateModel to evaluate the rate of a mineral reaction. More...
 
class  MineralSurface
 Used to define mineral surfaces that react with aqueous phases. More...
 
struct  WaterElectroProps
 
struct  WaterHelmholtzProps
 
struct  WaterThermoProps
 Used to store thermodynamic properties of water. More...
 

Typedefs

using Index = std::size_t
 Define a type that represents an index. More...
 
using Indices = std::vector< Index >
 Define a type that represents a collection of indices. More...
 
template<typename T >
using VectorX = Eigen::Matrix< T, -1, 1, 0, -1, 1 >
 Convenient alias to Eigen type.
 
template<typename T >
using MatrixX = Eigen::Matrix< T, -1, -1, 0, -1, -1 >
 Convenient alias to Eigen type.
 
template<typename T >
using ArrayX = Eigen::Array< T, -1, 1, 0, -1, 1 >
 Convenient alias to Eigen type.
 
template<typename T >
using ArrayXX = Eigen::Array< T, -1, -1, 0, -1, -1 >
 Convenient alias to Eigen type.
 
template<typename T >
using RowVectorX = Eigen::Matrix< T, 1, -1, 0, 1, -1 >
 
using VectorXr = autodiff::VectorXreal
 Convenient alias to Eigen type.
 
using VectorXrRef = Eigen::Ref< VectorXr >
 Convenient alias to Eigen type.
 
using VectorXrConstRef = Eigen::Ref< const VectorXr >
 Convenient alias to Eigen type.
 
using VectorXrMap = Eigen::Map< VectorXr >
 Convenient alias to Eigen type.
 
using VectorXrConstMap = Eigen::Map< const VectorXr >
 Convenient alias to Eigen type.
 
using VectorXrStridedRef = Eigen::Ref< VectorXr, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using VectorXrStridedConstRef = Eigen::Ref< const VectorXr, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using VectorXl = VectorX< Eigen::Index >
 Convenient alias to Eigen type.
 
using VectorXlRef = Eigen::Ref< VectorXl >
 Convenient alias to Eigen type.
 
using VectorXlConstRef = Eigen::Ref< const VectorXl >
 Convenient alias to Eigen type.
 
using VectorXlMap = Eigen::Map< VectorXl >
 Convenient alias to Eigen type.
 
using VectorXlConstMap = Eigen::Map< const VectorXl >
 Convenient alias to Eigen type.
 
using VectorXlStridedRef = Eigen::Ref< VectorXl, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using VectorXlStridedConstRef = Eigen::Ref< const VectorXl, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using VectorXd = Eigen::VectorXd
 Convenient alias to Eigen type.
 
using VectorXdRef = Eigen::Ref< VectorXd >
 Convenient alias to Eigen type.
 
using VectorXdConstRef = Eigen::Ref< const VectorXd >
 Convenient alias to Eigen type.
 
using VectorXdMap = Eigen::Map< VectorXd >
 Convenient alias to Eigen type.
 
using VectorXdConstMap = Eigen::Map< const VectorXd >
 Convenient alias to Eigen type.
 
using VectorXdStridedRef = Eigen::Ref< VectorXd, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using VectorXdStridedConstRef = Eigen::Ref< const VectorXd, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using ArrayXr = autodiff::ArrayXreal
 Convenient alias to Eigen type.
 
using ArrayXrRef = Eigen::Ref< ArrayXr >
 Convenient alias to Eigen type.
 
using ArrayXrConstRef = Eigen::Ref< const ArrayXr >
 Convenient alias to Eigen type.
 
using ArrayXrMap = Eigen::Map< ArrayXr >
 Convenient alias to Eigen type.
 
using ArrayXrConstMap = Eigen::Map< const ArrayXr >
 Convenient alias to Eigen type.
 
using ArrayXrStridedRef = Eigen::Ref< ArrayXr, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using ArrayXrStridedConstRef = Eigen::Ref< const ArrayXr, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using ArrayXl = ArrayX< Eigen::Index >
 Convenient alias to Eigen type.
 
using ArrayXlRef = Eigen::Ref< ArrayXl >
 Convenient alias to Eigen type.
 
using ArrayXlConstRef = Eigen::Ref< const ArrayXl >
 Convenient alias to Eigen type.
 
using ArrayXlMap = Eigen::Map< ArrayXl >
 Convenient alias to Eigen type.
 
using ArrayXlConstMap = Eigen::Map< const ArrayXl >
 Convenient alias to Eigen type.
 
using ArrayXlStridedRef = Eigen::Ref< ArrayXl, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using ArrayXlStridedConstRef = Eigen::Ref< const ArrayXl, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using ArrayXd = Eigen::ArrayXd
 Convenient alias to Eigen type.
 
using ArrayXdRef = Eigen::Ref< ArrayXd >
 Convenient alias to Eigen type.
 
using ArrayXdConstRef = Eigen::Ref< const ArrayXd >
 Convenient alias to Eigen type.
 
using ArrayXdMap = Eigen::Map< ArrayXd >
 Convenient alias to Eigen type.
 
using ArrayXdConstMap = Eigen::Map< const ArrayXd >
 Convenient alias to Eigen type.
 
using ArrayXdStridedRef = Eigen::Ref< ArrayXd, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using ArrayXdStridedConstRef = Eigen::Ref< const ArrayXd, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using ArrayXXr = autodiff::ArrayXXreal
 Convenient alias to Eigen type.
 
using ArrayXXrRef = Eigen::Ref< ArrayXXr >
 Convenient alias to Eigen type.
 
using ArrayXXrConstRef = Eigen::Ref< const ArrayXXr >
 Convenient alias to Eigen type.
 
using ArrayXXrMap = Eigen::Map< ArrayXXr >
 Convenient alias to Eigen type.
 
using ArrayXXrConstMap = Eigen::Map< const ArrayXXr >
 Convenient alias to Eigen type.
 
using ArrayXXrStridedRef = Eigen::Ref< ArrayXXr, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using ArrayXXrStridedConstRef = Eigen::Ref< const ArrayXXr, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using ArrayXXd = Eigen::ArrayXXd
 Convenient alias to Eigen type.
 
using ArrayXXdRef = Eigen::Ref< ArrayXXd >
 Convenient alias to Eigen type.
 
using ArrayXXdConstRef = Eigen::Ref< const ArrayXXd >
 Convenient alias to Eigen type.
 
using ArrayXXdMap = Eigen::Map< ArrayXXd >
 Convenient alias to Eigen type.
 
using ArrayXXdConstMap = Eigen::Map< const ArrayXXd >
 Convenient alias to Eigen type.
 
using ArrayXXdStridedRef = Eigen::Ref< ArrayXXd, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using ArrayXXdStridedConstRef = Eigen::Ref< const ArrayXXd, 0, Eigen::InnerStride<> >
 Convenient alias to Eigen type.
 
using MatrixXr = autodiff::MatrixXreal
 Convenient alias to Eigen type.
 
using MatrixXrRef = Eigen::Ref< MatrixXr >
 Convenient alias to Eigen type.
 
using MatrixXrConstRef = Eigen::Ref< const MatrixXr >
 Convenient alias to Eigen type.
 
using MatrixXrMap = Eigen::Map< MatrixXr >
 Convenient alias to Eigen type.
 
using MatrixXrConstMap = Eigen::Map< const MatrixXr >
 Convenient alias to Eigen type.
 
using MatrixXd = Eigen::MatrixXd
 Convenient alias to Eigen type.
 
using MatrixXdRef = Eigen::Ref< MatrixXd >
 Convenient alias to Eigen type.
 
using MatrixXdConstRef = Eigen::Ref< const MatrixXd >
 Convenient alias to Eigen type.
 
using MatrixXdMap = Eigen::Map< MatrixXd >
 Convenient alias to Eigen type.
 
using MatrixXdConstMap = Eigen::Map< const MatrixXd >
 Convenient alias to Eigen type.
 
using RowVectorXr = autodiff::RowVectorXreal
 Convenient alias to Eigen type.
 
using RowVectorXrRef = Eigen::Ref< RowVectorXr >
 Convenient alias to Eigen type.
 
using RowVectorXrConstRef = Eigen::Ref< const RowVectorXr >
 Convenient alias to Eigen type.
 
using RowVectorXrMap = Eigen::Map< RowVectorXr >
 Convenient alias to Eigen type.
 
using RowVectorXrConstMap = Eigen::Map< const RowVectorXr >
 Convenient alias to Eigen type.
 
using RowVectorXl = RowVectorX< Eigen::Index >
 Convenient alias to Eigen type.
 
using RowVectorXlRef = Eigen::Ref< RowVectorXl >
 Convenient alias to Eigen type.
 
using RowVectorXlConstRef = Eigen::Ref< const RowVectorXl >
 Convenient alias to Eigen type.
 
using RowVectorXlMap = Eigen::Map< RowVectorXl >
 Convenient alias to Eigen type.
 
using RowVectorXlConstMap = Eigen::Map< const RowVectorXl >
 Convenient alias to Eigen type.
 
using RowVectorXd = Eigen::RowVectorXd
 Convenient alias to Eigen type.
 
using RowVectorXdRef = Eigen::Ref< RowVectorXd >
 Convenient alias to Eigen type.
 
using RowVectorXdConstRef = Eigen::Ref< const RowVectorXd >
 Convenient alias to Eigen type.
 
using RowVectorXdMap = Eigen::Map< RowVectorXd >
 Convenient alias to Eigen type.
 
using RowVectorXdConstMap = Eigen::Map< const RowVectorXd >
 Convenient alias to Eigen type.
 
using PermutationMatrix = Eigen::PermutationMatrix< Eigen::Dynamic, Eigen::Dynamic >
 Define an alias to a permutation matrix type of the Eigen library.
 
using real = autodiff::real
 The number type used throughout the library.
 
template<typename T >
using Table1D = std::vector< T >
 
template<typename T >
using Table2D = std::vector< std::vector< T > >
 
template<typename T >
using Table3D = std::vector< std::vector< std::vector< T > >>
 
using Time = std::chrono::time_point< std::chrono::high_resolution_clock >
 
using Duration = std::chrono::duration< double >
 
template<bool value>
using EnableIf = std::enable_if_t< value >
 
template<bool value>
using Requires = std::enable_if_t< value, bool >
 
template<typename T >
using Decay = std::decay_t< T >
 
template<typename T >
using Ref = typename detail::Ref< T >::type
 
template<typename T >
using TypeOpRef = typename detail::TypeOpRef< std::decay_t< T > >::type
 
template<typename T >
using TypeOpConstRef = typename detail::TypeOpConstRef< std::decay_t< T > >::type
 
template<typename T >
using TypeOpIdentity = typename detail::TypeOpIdentity< std::decay_t< T > >::type
 
using Chars = const char *
 Convenient alias for const char*.
 
using String = std::string
 Convenient alias for std::string.
 
using Strings = std::vector< std::string >
 Convenient alias for std::vector<String>.
 
using StringOrIndex = std::variant< Index, int, std::string >
 The type used to accept either a name or an index.
 
template<typename T , std::size_t N>
using Array = std::array< T, N >
 Convenient alias for std::array<T, N>.
 
template<typename T >
using Vec = std::vector< T >
 Convenient alias for std::vector<T>.
 
template<typename T >
using Deque = std::deque< T >
 Convenient alias for std::deque<T>.
 
template<typename Key , typename T >
using Map = std::unordered_map< Key, T >
 Convenient alias for std::unordered_map<Key, T>.
 
template<typename T >
using Set = std::unordered_set< T >
 
template<class Key , class T >
using Dict = tsl::ordered_map< Key, T >
 
template<typename T , typename U >
using Pair = std::pair< T, U >
 Convenient alias for std::pair<T, U>.
 
template<typename T , typename U >
using Pairs = Vec< Pair< T, U > >
 Convenient alias for std::vector<std::pair<T, U>>.
 
template<typename... Args>
using Tuple = std::tuple< Args... >
 Convenient alias for std::tuple<Args...>.
 
template<typename... Args>
using Tuples = Vec< Tuple< Args... > >
 Convenient alias for std::vector<std::tuple<Args...>>.
 
template<typename T >
using Ptr = std::unique_ptr< T >
 Convenient alias for std::unique_ptr<T>.
 
template<typename T >
using SharedPtr = std::shared_ptr< T >
 Convenient alias for std::shared_ptr<T>.
 
template<typename F >
using Fn = std::function< F >
 Convenient alias for std::function<R(Args...)>.
 
template<typename T >
using Optional = std::optional< T >
 Convenient alias for std::optional<T>.
 
template<typename T >
using OptionalRef = std::optional< std::reference_wrapper< T > >
 Convenient alias for std::optional<std::reference_wrapper<T>>.
 
template<typename T >
using OptionalConstRef = std::optional< std::reference_wrapper< const T > >
 Convenient alias for std::optional<std::reference_wrapper<const T>>.
 
using Any = std::any
 Convenient alias for std::any.
 
using Nullptr = std::nullptr_t
 Convenient alias for std::nullptr_t.
 
using ActivityModel = Model< ActivityProps(ActivityModelArgs)>
 The function type for the calculation of activity and corrective thermodynamic properties of a phase.
 
using ActivityModelGenerator = Fn< ActivityModel(SpeciesList const &species)>
 The type for functions that construct an ActivityModel for a phase. More...
 
using ActivityProps = ActivityPropsBase< TypeOpIdentity >
 The activity and corrective thermodynamic properties of a phase.
 
using ActivityPropsRef = ActivityPropsBase< TypeOpRef >
 The non-const view to the activity and corrective thermodynamic properties of a phase.
 
using ActivityPropsConstRef = ActivityPropsBase< TypeOpConstRef >
 The const view to the activity and corrective thermodynamic properties of a phase.
 
using ChemicalPropsPhaseData = ChemicalPropsPhaseBaseData< TypeOpIdentity >
 The primary chemical property data of a phase from which others are computed.
 
using ChemicalPropsPhaseDataRef = ChemicalPropsPhaseBaseData< TypeOpRef >
 The primary chemical property data of a phase from which others are computed.
 
using ChemicalPropsPhaseDataConstRef = ChemicalPropsPhaseBaseData< TypeOpConstRef >
 The primary chemical property data of a phase from which others are computed.
 
using ChemicalPropsPhaseFn = Fn< void(ChemicalPropsPhaseDataRef, const real &, const real &, ArrayXrConstRef)>
 The type of functions that computes the primary chemical property data of a phase.
 
using ChemicalPropsPhase = ChemicalPropsPhaseBase< TypeOpIdentity >
 The chemical properties of a phase and its species.
 
using ChemicalPropsPhaseRef = ChemicalPropsPhaseBase< TypeOpRef >
 The non-const view to the chemical properties of a phase and its species.
 
using ChemicalPropsPhaseConstRef = ChemicalPropsPhaseBase< TypeOpConstRef >
 The const view to the chemical properties of a phase and its species.
 
template<typename ResultRef , typename... Args>
using ModelEvaluator = Fn< void(ResultRef res, Args... args)>
 The functional signature of functions that evaluates properties.
 
template<typename Result , typename... Args>
using ModelCalculator = Fn< Result(Args... args)>
 The functional signature of functions that calculates properties.
 
using PropFn = Fn< real(const ChemicalProps &props)>
 The function type for evaluation of a property of a chemical system. More...
 
using ReactionRateModel = Model< ReactionRate(ChemicalProps const &props)>
 The type of functions for calculation of reaction rates (in mol/s). More...
 
using ReactionRateModelGenerator = Fn< ReactionRateModel(ReactionRateModelGeneratorArgs args)>
 The function signature for functions that generates a ReactionRateModel for a reaction. More...
 
using ReactionGenerator = Fn< Vec< Reaction >(ReactionGeneratorArgs args)>
 The function type for the generation of reactions with given species in the chemical system. More...
 
using ReactionStandardThermoModel = Model< ReactionStandardThermoProps(ReactionStandardThermoModelArgs)>
 The function type for calculation of standard thermodynamic properties of a reaction.
 
using StandardThermoModel = Model< StandardThermoProps(real T, real P)>
 The function type for calculation of standard thermodynamic properties of a species. More...
 
using StandardVolumeModel = Model< real(real T, real P)>
 The function type for calculation of standard volume of a product species in a formation reaction. More...
 
using SurfaceAreaModel = Model< real(ChemicalProps const &props)>
 The type of functions for calculation of surface areas (in m2). More...
 
using SurfaceGenerator = Fn< Vec< Surface >(PhaseList const &phases)>
 The function type for the generation of surfaces with given phases in the chemical system. More...
 
using ThermoPropsPhaseData = ThermoPropsPhaseBaseData< TypeOpIdentity >
 The primary standard thermodynamic property data of a phase from which others are computed.
 
using ThermoPropsPhaseDataRef = ThermoPropsPhaseBaseData< TypeOpRef >
 The primary standard thermodynamic property data of a phase from which others are computed.
 
using ThermoPropsPhaseDataConstRef = ThermoPropsPhaseBaseData< TypeOpConstRef >
 The primary standard thermodynamic property data of a phase from which others are computed.
 
using ThermoPropsPhaseFn = Fn< void(ThermoPropsPhaseDataRef, const real &, const real &, ArrayXrConstRef)>
 The type of functions that computes the primary standard thermodynamic property data of a phase.
 
using ThermoPropsPhase = ThermoPropsPhaseBase< TypeOpIdentity >
 The standard thermodynamic properties of a phase and its species.
 
using ThermoPropsPhaseRef = ThermoPropsPhaseBase< TypeOpRef >
 The non-const view to the standard thermodynamic properties of a phase and its species.
 
using ThermoPropsPhaseConstRef = ThermoPropsPhaseBase< TypeOpConstRef >
 The const view to the standard thermodynamic properties of a phase and its species.
 
using ScalarFunction = std::function< double(VectorXdConstRef)>
 Define a scalar function type.
 
using VectorFunction = std::function< VectorXd(VectorXdConstRef)>
 Define a vector function type.
 
template<typename T >
using CubicRoots = std::array< std::complex< T >, 3 >
 Define a type that describes the roots of a cubic equation.
 
using CubicBipModelGenerator = Fn< CubicEOS::BipModel(SpeciesList const &specieslist)>
 The type for functions that construct a CubicEOS::BipModel for a fluid phase once its species are known. More...
 
using MineralReactionRateModel = Model< ReactionRate(MineralReactionRateModelArgs args)>
 The type of functions that calculate rates for mineral dissolution/precipitation reactions. More...
 
using MineralReactionRateModelGenerator = Fn< MineralReactionRateModel(ReactionRateModelGeneratorArgs args)>
 The type of functions that construct a MineralReactionRateModel for a mineral reaction. More...
 

Enumerations

enum class  AggregateState {
  Gas , Liquid , Solid , Plasma ,
  CondensedPhase , Fluid , LiquidCrystal , CrystallineSolid ,
  AmorphousSolid , Vitreous , Adsorbed , Monomeric ,
  Polymeric , SolidSolution , IonExchange , Aqueous ,
  Undefined
}
 The aggregate states of substances according to IUPAC. More...
 
enum class  StateOfMatter {
  Unspecified , Solid , Liquid , Gas ,
  Supercritical , Plasma , Fluid , Condensed
}
 The list of states of matter for phases. More...
 
enum class  GibbsHessian { Exact , PartiallyExact , Approx , ApproxDiagonal }
 The options for the description of the Hessian of the Gibbs energy function. More...
 

Functions

template<typename Container , typename T >
auto index (const Container &c, const T &x) -> std::size_t
 Return the index of item x in container c or the number of items if not found.
 
template<typename Container , typename Predicate >
auto indexfn (const Container &c, const Predicate &pred) -> std::size_t
 Return the index of item x in container c for which pred(x) evaluates to true or the number of items if not found.
 
template<typename Container , typename Predicate >
auto filter (const Container &c, const Predicate &pred)
 Return a container with items x for which pred(x) evaluates to true.
 
template<typename Container , typename T >
auto remove (const Container &c, const T &x)
 Return a container without items x.
 
template<typename Container , typename Predicate >
auto removefn (const Container &c, const Predicate &pred)
 Return a container without items x for which pred(x) evaluates to true.
 
template<typename Container >
auto sort (Container &c)
 Sort a container in-place.
 
template<typename Container , typename Predicate >
auto sortfn (Container &c, const Predicate &pred)
 Sort a container in-place with predicate controlling order.
 
template<typename Container >
auto sorted (const Container &c)
 Return a sorted container.
 
template<typename Container , typename Predicate >
auto sortedfn (const Container &c, const Predicate &pred)
 Return a sorted container with predicate controlling order.
 
template<typename Container >
auto unique (const Container &c)
 Return a container without duplicates.
 
template<typename Container , typename Result , typename Function >
auto transform (const Container &c, Result &res, const Function &f)
 Apply a function f on every item in container c and store in res.
 
template<typename Container , typename Indices >
auto extract (const Container &a, const Indices &indices)
 Return the items in a container at given indices.
 
template<typename Container , typename Function >
auto vectorize (const Container &c, const Function &f)
 Return a vector by applying function f on every item in container c.
 
template<typename Container , typename T >
auto contains (const Container &c, const T &x)
 Return true if container a contains item x.
 
template<typename Container , typename Predicate >
auto containsfn (const Container &c, const Predicate &pred)
 Return true if container a contains item x for which pred(x) evaluates to true.
 
template<typename ContainerA , typename ContainerB >
auto contained (const ContainerA &a, const ContainerB &b)
 Return true if items in container a are also in container b.
 
template<typename Container >
auto concatenate (const Container &a, const Container &b)
 Return a container with items from both a and b.
 
template<typename Container >
auto merge (const Container &a, const Container &b)
 Return a container with items from both a and b without duplicates.
 
template<typename Container >
auto intersect (const Container &a, const Container &b)
 Return the intersection of two containers.
 
template<typename Container >
auto difference (const Container &a, const Container &b)
 Return the difference of two containers.
 
template<typename ContainerA , typename ContainerB >
auto disjoint (const ContainerA &a, const ContainerB &b)
 Return true if containers a and b have distinct items.
 
template<typename ContainerA , typename ContainerB >
auto identical (const ContainerA &a, const ContainerB &b)
 Return true if containers a and b have identical items.
 
template<typename T >
auto range (T first, T last, T step)
 Return a vector with given range of values and step between them.
 
template<typename T >
auto range (T first, T last)
 Return a vector with given range of values with unit step.
 
template<typename T >
auto range (T last)
 Return a vector with given range of values with unit step and starting from 0.
 
template<typename X , typename X0 , typename... XS>
auto oneof (const X x, const X0 &x0, const XS &... xs)
 Return true if x is equal to at least one of the other arguments.
 
template<typename Function >
auto sum (std::size_t ibegin, std::size_t iend, const Function &f)
 Return the sum f(ibegin) + ... + f(iend-1) for a given function f.
 
template<typename Function >
auto sum (std::size_t iend, const Function &f)
 Return the sum f(0) + ... + f(iend-1) for a given function f.
 
template<typename Indices , typename Function , Requires<!isArithmetic< Indices >> = true>
auto sum (const Indices &inds, const Function &f)
 Return the sum f(inds[0]) + ... + f(inds[inds.size() - 1]) for a given function f.
 
template<typename Scalar >
auto convertCelsiusToKelvin (Scalar T) -> decltype(T+273.15)
 Converts temperature from celsius to kelvin.
 
template<typename Scalar >
auto convertKelvinToCelsius (Scalar T) -> decltype(T - 273.15)
 Converts temperature from kelvin to celsius.
 
template<typename Scalar >
auto convertPascalToKiloPascal (Scalar P) -> decltype(P *1.0e-3)
 Converts pressure from pascal to kilo pascal.
 
template<typename Scalar >
auto convertPascalToMegaPascal (Scalar P) -> decltype(P *1.0e-6)
 Converts pressure from pascal to mega pascal.
 
template<typename Scalar >
auto convertPascalToBar (Scalar P) -> decltype(P *1.0e-5)
 Converts pressure from pascal to bar.
 
template<typename Scalar >
auto convertKiloPascalToPascal (Scalar P) -> decltype(P *1.0e+3)
 Converts pressure from kilo pascal to pascal.
 
template<typename Scalar >
auto convertKiloPascalToMegaPascal (Scalar P) -> decltype(P *1.0e-3)
 Converts pressure from kilo pascal to mega pascal.
 
template<typename Scalar >
auto convertKiloPascalToBar (Scalar P) -> decltype(P *1.0e-2)
 Converts pressure from kilo pascal to bar.
 
template<typename Scalar >
auto convertMegaPascalToPascal (Scalar P) -> decltype(P *1.0e+6)
 Converts pressure from mega pascal to pascal.
 
template<typename Scalar >
auto convertMegaPascalToKiloPascal (Scalar P) -> decltype(P *1.0e+3)
 Converts pressure from mega pascal to kilo pascal.
 
template<typename Scalar >
auto convertMegaPascalToBar (Scalar P) -> decltype(P *1.0e+1)
 Converts pressure from mega pascal to bar.
 
template<typename Scalar >
auto convertBarToPascal (Scalar P) -> decltype(P *1.0e+5)
 Converts pressure from bar to pascal.
 
template<typename Scalar >
auto convertBarToKiloPascal (Scalar P) -> decltype(P *1.0e+2)
 Converts pressure from bar to kilo pascal.
 
template<typename Scalar >
auto convertBarToMegaPascal (Scalar P) -> decltype(P *1.0e-1)
 Converts pressure from bar to mega pascal.
 
template<typename Scalar >
auto convertBarToAtm (Scalar P) -> decltype(P *0.986923267)
 Convert pressure from bar to atm.
 
template<typename Scalar >
auto convertCubicCentimeterToCubicMeter (Scalar V) -> decltype(V *1.0e-6)
 Converts volume from cm3 to m3.
 
template<typename Scalar >
auto convertCubicMeterToCubicCentimeter (Scalar V) -> decltype(V *1.0e+6)
 Converts volume from m3 to cm3.
 
template<typename Scalar >
auto convertCubicMeterToLiter (Scalar V) -> decltype(V *1.0e+3)
 Converts volume from m3 to liter.
 
template<typename Scalar >
auto convertLiterToCubicMeter (Scalar V) -> decltype(V *1.0e-3)
 Converts volume from liter to m3.
 
template<typename... Args>
auto warning (bool condition, Args... items) -> void
 Issue a warning message if condition is true.
 
template<typename... Args>
auto error (bool condition, Args... items) -> void
 Raise a runtime error if condition is true.
 
void __hashCombine (std::size_t &seed)
 
template<typename T , typename... Rest>
void __hashCombine (std::size_t &seed, T const &v, Rest... rest)
 
template<typename T , typename... Rest>
auto hashCombine (std::size_t seed, T const &v, Rest... rest) -> std::size_t
 Return the hash combine of the hash number of given values. More...
 
template<typename Vec >
auto hashVector (Vec const &vec) -> std::size_t
 Return the hash of a vector of values. More...
 
auto interpolate (const Vec< double > &temperatures, const Vec< double > &pressures, const Vec< double > &scalars) -> Fn< real(real, real)>
 
auto interpolate (const Vec< double > &temperatures, const Vec< double > &pressures, const Fn< double(double, double)> &func) -> Fn< real(real, real)>
 
auto interpolate (const Vec< double > &temperatures, const Vec< double > &pressures, const Vec< Fn< double(double, double)>> &fs) -> Fn< ArrayXr(real, real)>
 
template<typename T , typename X , typename Y >
auto interpolateLinear (T const &x, X const &x0, X const &x1, Y const &y0, Y const &y1)
 Calculate a linear interpolation of y at x with given pairs *(x0, y0)* and *(x1, y1)*.
 
template<typename T , typename X , typename Y >
auto interpolateQuadratic (T const &x, X const &x0, X const &x1, X const &x2, Y const &y0, Y const &y1, Y const &y2)
 Calculate a quadratic interpolation of y at x with given pairs *(x0, y0)* *(x1, y1)* and *(x2, y2)*.
 
auto zeros (Index rows) -> decltype(VectorXd::Zero(rows))
 Return an expression of a zero vector. More...
 
auto ones (Index rows) -> decltype(VectorXd::Ones(rows))
 Return an expression of a vector with entries equal to one. More...
 
auto random (Index rows) -> decltype(VectorXd::Random(rows))
 Return an expression of a vector with random entries. More...
 
auto linspace (double start, double stop, Index rows) -> decltype(VectorXd::LinSpaced(rows, start, stop))
 Return a linearly spaced vector. More...
 
auto unit (Index rows, Index i) -> decltype(VectorXd::Unit(rows, i))
 Return an expression of a unit vector. More...
 
auto zeros (Index rows, Index cols) -> decltype(MatrixXd::Zero(rows, cols))
 Return an expression of a zero matrix. More...
 
auto ones (Index rows, Index cols) -> decltype(MatrixXd::Ones(rows, cols))
 Return an expression of a matrix with entries equal to one. More...
 
auto random (Index rows, Index cols) -> decltype(MatrixXd::Random(rows, cols))
 Return an expression of a matrix with random entries. More...
 
auto identity (Index rows, Index cols) -> decltype(MatrixXd::Identity(rows, cols))
 Return an expression of an identity matrix. More...
 
template<typename Derived >
auto rows (Eigen::MatrixBase< Derived > &mat, Index start, Index num) -> decltype(mat.middleRows(start, num))
 Return a view of a sequence of rows of a matrix. More...
 
template<typename Derived >
auto rows (const Eigen::MatrixBase< Derived > &mat, Index start, Index num) -> decltype(mat.middleRows(start, num))
 Return a view of a sequence of rows of a matrix. More...
 
template<typename Derived , typename Indices >
auto rows (Eigen::MatrixBase< Derived > &mat, const Indices &irows) -> decltype(mat(irows, Eigen::all))
 Return a view of some rows of a matrix. More...
 
template<typename Derived , typename Indices >
auto rows (const Eigen::MatrixBase< Derived > &mat, const Indices &irows) -> decltype(mat(irows, Eigen::all))
 Return a const view of some rows of a matrix. More...
 
template<typename Derived >
auto cols (Eigen::MatrixBase< Derived > &mat, Index start, Index num) -> decltype(mat.middleCols(start, num))
 Return a view of a sequence of columns of a matrix. More...
 
template<typename Derived >
auto cols (const Eigen::MatrixBase< Derived > &mat, Index start, Index num) -> decltype(mat.middleCols(start, num))
 Return a view of a sequence of columns of a matrix. More...
 
template<typename Derived , typename Indices >
auto cols (Eigen::MatrixBase< Derived > &mat, const Indices &icols) -> decltype(mat(Eigen::all, icols))
 Return a view of some columns of a matrix. More...
 
template<typename Derived , typename Indices >
auto cols (const Eigen::MatrixBase< Derived > &mat, const Indices &icols) -> decltype(mat(Eigen::all, icols))
 Return a const view of some columns of a matrix. More...
 
template<typename Derived >
auto segment (Eigen::MatrixBase< Derived > &vec, Index irow, Index nrows) -> decltype(vec.segment(irow, nrows))
 Return a view of some rows and columns of a matrix. More...
 
template<typename Derived >
auto segment (const Eigen::MatrixBase< Derived > &vec, Index irow, Index nrows) -> decltype(vec.segment(irow, nrows))
 Return a view of some rows and columns of a matrix. More...
 
template<typename Derived >
auto block (Eigen::MatrixBase< Derived > &mat, Index irow, Index icol, Index nrows, Index ncols) -> decltype(mat.block(irow, icol, nrows, ncols))
 Return a view of some rows and columns of a matrix. More...
 
template<typename Derived >
auto block (const Eigen::MatrixBase< Derived > &mat, Index irow, Index icol, Index nrows, Index ncols) -> decltype(mat.block(irow, icol, nrows, ncols))
 Return a view of some rows and columns of a matrix. More...
 
template<typename Derived , typename Indices >
auto submatrix (Eigen::MatrixBase< Derived > &mat, const Indices &irows, const Indices &icols) -> decltype(mat(irows, icols))
 Return a view of some rows and columns of a matrix. More...
 
template<typename Derived , typename Indices >
auto submatrix (const Eigen::MatrixBase< Derived > &mat, const Indices &irows, const Indices &icols) -> decltype(mat(irows, icols))
 Return a const view of some rows and columns of a matrix. More...
 
template<typename Derived >
auto tr (Eigen::MatrixBase< Derived > &mat) -> decltype(mat.transpose())
 Return the transpose of the matrix.
 
template<typename Derived >
auto tr (const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.transpose())
 Return the transpose of the matrix.
 
template<typename Derived >
auto inv (const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.cwiseInverse())
 Return the component-wise inverse of the matrix.
 
template<typename Derived >
auto diag (const Eigen::MatrixBase< Derived > &vec) -> decltype(vec.asDiagonal())
 Return a diagonal matrix representation of a vector.
 
template<typename Derived >
auto diagonal (Eigen::MatrixBase< Derived > &mat) -> decltype(mat.diagonal())
 Return a vector representation of the diagonal of a matrix.
 
template<typename Derived >
auto diagonal (const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.diagonal())
 Return a vector representation of the diagonal of a matrix.
 
template<int p, typename Derived >
auto norm (const Eigen::MatrixBase< Derived > &mat) -> double
 Return the Lp norm of a matrix.
 
template<typename Derived >
auto norm (const Eigen::MatrixBase< Derived > &mat) -> double
 Return the L2 norm of a matrix.
 
template<typename Derived >
auto norminf (const Eigen::MatrixBase< Derived > &mat) -> double
 Return the L-inf norm of a matrix.
 
template<typename Derived >
auto sum (const Eigen::DenseBase< Derived > &mat) -> typename Derived::Scalar
 Return the sum of the components of a matrix.
 
template<typename DerivedLHS , typename DerivedRHS >
auto dot (const Eigen::MatrixBase< DerivedLHS > &lhs, const Eigen::MatrixBase< DerivedRHS > &rhs) -> decltype(lhs.dot(rhs))
 Return the dot product of two matrices.
 
template<typename Derived >
auto min (const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.minCoeff())
 Return the minimum component of a matrix.
 
template<typename DerivedLHS , typename DerivedRHS >
auto min (const Eigen::MatrixBase< DerivedLHS > &lhs, const Eigen::MatrixBase< DerivedRHS > &rhs) -> decltype(lhs.cwiseMin(rhs))
 Return the component-wise minimum of two matrices.
 
template<typename Derived >
auto max (const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.maxCoeff())
 Return the maximum component of a matrix.
 
template<typename DerivedLHS , typename DerivedRHS >
auto max (const Eigen::MatrixBase< DerivedLHS > &lhs, const Eigen::MatrixBase< DerivedRHS > &rhs) -> decltype(lhs.cwiseMax(rhs))
 Return the component-wise maximum of two matrices.
 
template<typename DerivedLHS , typename DerivedRHS >
auto operator% (const Eigen::MatrixBase< DerivedLHS > &lhs, const Eigen::MatrixBase< DerivedRHS > &rhs) -> decltype(lhs.cwiseProduct(rhs))
 Return the component-wise multiplication of two matrices.
 
template<typename DerivedLHS , typename DerivedRHS >
auto operator/ (const Eigen::MatrixBase< DerivedLHS > &lhs, const Eigen::MatrixBase< DerivedRHS > &rhs) -> decltype(lhs.cwiseQuotient(rhs))
 Return the component-wise division of two matrices.
 
template<typename Derived >
auto operator/ (const typename Derived::Scalar &scalar, const Eigen::MatrixBase< Derived > &mat) -> decltype(scalar *mat.cwiseInverse())
 Return the component-wise division of two matrices.
 
template<typename Derived >
auto operator+ (const typename Derived::Scalar &scalar, const Eigen::MatrixBase< Derived > &mat) -> decltype((scalar+mat.array()).matrix())
 Return the component-wise division of two matrices.
 
template<typename Derived >
auto operator+ (const Eigen::MatrixBase< Derived > &mat, const typename Derived::Scalar &scalar) -> decltype((scalar+mat.array()).matrix())
 Return the component-wise division of two matrices.
 
template<typename Derived >
auto operator- (const typename Derived::Scalar &scalar, const Eigen::MatrixBase< Derived > &mat) -> decltype((scalar - mat.array()).matrix())
 Return the component-wise division of two matrices.
 
template<typename Derived >
auto operator- (const Eigen::MatrixBase< Derived > &mat, const typename Derived::Scalar &scalar) -> decltype((mat.array() - scalar).matrix())
 Return the component-wise division of two matrices.
 
template<typename Derived >
auto abs (const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.cwiseAbs())
 Return the component-wise absolute entries of a matrix.
 
template<typename Derived >
auto sqrt (const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.cwiseSqrt())
 Return the component-wise square root of a matrix.
 
template<typename Derived >
auto pow (const Eigen::MatrixBase< Derived > &mat, double power) -> decltype(mat.array().pow(power))
 Return the component-wise exponential of a matrix.
 
template<typename Derived >
auto exp (const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.array().exp().matrix())
 Return the component-wise natural exponential of a matrix.
 
template<typename Derived >
auto log (const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.array().log().matrix())
 Return the component-wise natural log of a matrix.
 
template<typename Derived >
auto log10 (const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.array().log10().matrix())
 Return the component-wise log10 of a matrix.
 
auto constants (Index rows, double val) -> decltype(VectorXd::Constant(rows, val))
 
auto unitcol (Index rows, Index i) -> decltype(unit(rows, i))
 
auto unitrow (Index cols, Index i) -> decltype(RowVectorXd::Unit(cols, i))
 
template<typename Ret , typename... Args>
auto memoize (Fn< Ret(Args...)> f) -> Fn< Ret(Args...)>
 Return a memoized version of given function f.
 
template<typename Fun , Requires<!isFunction< Fun >> = true>
auto memoize (Fun f)
 Return a memoized version of given function f.
 
template<typename Ret , typename... Args>
auto memoizeLast (Fn< Ret(Args...)> f) -> Fn< Ret(Args...)>
 Return a memoized version of given function f that caches only the arguments used in the last call.
 
template<typename Fun , Requires<!isFunction< Fun >> = true>
auto memoizeLast (Fun f)
 Return a memoized version of given function f that caches only the arguments used in the last call.
 
template<typename Ret , typename RetRef , typename... Args>
auto memoizeLastUsingRef (Fn< void(RetRef, Args...)> f) -> Fn< void(RetRef, Args...)>
 Return a memoized version of given function f that caches only the arguments used in the last call.
 
template<typename Ret , typename Fun , Requires<!isFunction< Fun >> = true>
auto memoizeLastUsingRef (Fun f)
 Return a memoized version of given function f that caches only the arguments used in the last call. More...
 
template<typename Ret , typename... Args>
auto memoizeLastUsingRef (Fn< void(Ret &, Args...)> f) -> Fn< void(Ret &, Args...)>
 Return a memoized version of given function f that caches only the arguments used in the last call. More...
 
template<typename Fun , Requires<!isFunction< Fun >> = true>
auto memoizeLastUsingRef (Fun f)
 Return a memoized version of given function f that caches only the arguments used in the last call. More...
 
template<size_t ibegin, size_t iend, typename Function >
constexpr auto For (Function &&f)
 Generate evaluation statements f(ibegin); f(ibegin + 1); ...; f(iend-1); at compile time.
 
template<size_t iend, typename Function >
constexpr auto For (Function &&f)
 Generate evaluation statements f(0); f(1); ...; f(iend-1); at compile time.
 
template<typename Function >
constexpr auto ForEach (Function const &f) -> void
 Generate evaluation statements f(arg0); f(arg1); ...; f(argn); at compile time.
 
template<typename Function , typename Arg , typename... Args>
constexpr auto ForEach (Function const &f, Arg const &arg, Args const &... args) -> void
 Generate evaluation statements f(arg0); f(arg1); ...; f(argn); at compile time.
 
template<typename ArrayConstRef , typename ArrayRef >
auto molalities (ArrayConstRef &&n, Index iH2O, ArrayRef &&m)
 Compute the molalities of the species with given species amounts. More...
 
template<typename ArrayConstRef >
auto molalities (ArrayConstRef &&n, Index iH2O)
 Compute the molalities of the species with given species amounts. More...
 
template<typename ArrayConstRef , typename MatrixRef >
auto molalitiesJacobian (ArrayConstRef &&n, Index iH2O, MatrixRef &&J)
 Compute the Jacobian matrix of the species molalities ( \(J=\frac{\partial m}{\partial n}\)). More...
 
template<typename ArrayConstRef >
auto molalitiesJacobian (ArrayConstRef &&n, Index iH2O)
 Compute the Jacobian matrix of the species molalities ( \(J=\frac{\partial m}{\partial n}\)). More...
 
template<typename ArrayConstRef , typename MatrixRef >
auto lnMolalitiesJacobian (ArrayConstRef &&n, Index iH2O, MatrixRef &&J) -> void
 Compute the Jacobian matrix of the species molalities in natural log ( \(J=\frac{\partial\ln m}{\partial n}\)). More...
 
template<typename ArrayConstRef >
auto lnMolalitiesJacobian (ArrayConstRef &&n, Index iH2O)
 Compute the Jacobian matrix of the species molalities in natural log ( \(J=\frac{\partial\ln m}{\partial n}\)). More...
 
template<typename ArrayConstRef , typename VectorRef >
auto lnMolalitiesJacobianDiagonal (ArrayConstRef &&n, Index iH2O, VectorRef &&D) -> void
 Compute the diagonal only of the Jacobian matrix of the species molalities in natural log ( \(J=\frac{\partial\ln m}{\partial n}\)). More...
 
template<typename ArrayConstRef >
auto lnMolalitiesJacobianDiagonal (ArrayConstRef &&n, Index iH2O)
 Compute the diagonal only of the Jacobian matrix of the species molalities in natural log ( \(J=\frac{\partial\ln m}{\partial n}\)). More...
 
template<typename ArrayConstRef , typename ArrayRef >
auto moleFractions (ArrayConstRef &&n, ArrayRef &&x)
 Compute the mole fractions of the species with given species amounts. More...
 
template<typename ArrayConstRef >
auto moleFractions (ArrayConstRef &&n)
 Compute the mole fractions of the species with given species amounts. More...
 
template<typename ArrayConstRef , typename MatrixRef >
auto moleFractionsJacobian (ArrayConstRef &&n, MatrixRef &&J)
 Compute the Jacobian matrix of the species mole fractions ( \(J=\frac{\partial x}{\partial n}\)). More...
 
template<typename ArrayConstRef >
auto moleFractionsJacobian (ArrayConstRef &&n)
 Compute the Jacobian matrix of the species mole fractions ( \(J=\frac{\partial x}{\partial n}\)). More...
 
template<typename ArrayConstRef , typename MatrixRef >
auto lnMoleFractionsJacobian (ArrayConstRef &&n, MatrixRef &&J) -> void
 Compute the Jacobian matrix of the species mole fractions in natural log ( \(J=\frac{\partial\ln x}{\partial n}\)). More...
 
template<typename ArrayConstRef >
auto lnMoleFractionsJacobian (ArrayConstRef &&n)
 Compute the Jacobian matrix of the species mole fractions in natural log ( \(J=\frac{\partial\ln x}{\partial n}\)). More...
 
template<typename ArrayConstRef , typename MatrixRef >
auto lnMoleFractionsJacobianDiagonal (ArrayConstRef &&n, MatrixRef &&D) -> void
 Compute the diagonal only of the Jacobian matrix of the species mole fractions in natural log ( \(J=\frac{\partial\ln x}{\partial n}\)). More...
 
template<typename ArrayConstRef >
auto lnMoleFractionsJacobianDiagonal (ArrayConstRef &&n)
 Compute the diagonal only of the Jacobian matrix of the species mole fractions in natural log ( \(J=\frac{\partial\ln x}{\partial n}\)). More...
 
auto alternativeWaterNames () -> std::vector< std::string >
 Return a collection of alternative names to the given species name. More...
 
auto alternativeChargedSpeciesNames (std::string name) -> std::vector< std::string > &
 Return a collection of alternative names to the given charged species name. More...
 
auto alternativeNeutralSpeciesNames (std::string name) -> std::vector< std::string > &
 Return a collection of alternative names to the given neutral species name. More...
 
auto conventionalWaterName () -> std::string
 Return the conventional water name, which is H2O(l).
 
auto conventionalChargedSpeciesName (std::string name) -> std::string
 Return the conventional charged species name adopted in Reaktoro. More...
 
auto conventionalNeutralSpeciesName (std::string name) -> std::string
 Return the conventional neutral species name adopted in Reaktoro. More...
 
auto isAlternativeWaterName (std::string trial) -> bool
 Return true if a trial name is an alternative to a water species name. More...
 
auto isAlternativeChargedSpeciesName (std::string trial, std::string name) -> bool
 Return true if a trial name is an alternative to a given charged species name. More...
 
auto isAlternativeNeutralSpeciesName (std::string trial, std::string name) -> bool
 Return true if a trial name is an alternative to a given neutral species name. More...
 
auto splitChargedSpeciesName (std::string name) -> std::pair< std::string, double >
 Return a pair with the base name of a charged species and its electrical charge. More...
 
auto baseNameChargedSpecies (std::string name) -> std::string
 Return the name of a charged species without charge suffix. More...
 
auto baseNameNeutralSpecies (std::string name) -> std::string
 Return the name of a neutral species without suffix (aq). More...
 
auto chargeInSpeciesName (std::string name) -> double
 Return the electrical charge in a species name. More...
 
auto splitSpeciesNameSuffix (std::string name) -> std::pair< std::string, std::string >
 Split name and suffix from a substance name or chemical formula. More...
 
auto parseReaction (const String &equation) -> Pairs< String, double >
 Parse a reaction equation.
 
auto parseNumberStringPairs (const String &str) -> Pairs< String, double >
 Parse a formatted string containing pairs of numbers and strings. More...
 
auto parseChemicalFormula (const String &formula) -> Pairs< String, double >
 Return the element symbols and their coefficients in a chemical formula. More...
 
auto parseElectricCharge (const String &formula) -> double
 Return the electric charge in a chemical formula. More...
 
auto parseReactionEquation (const String &equation) -> Pairs< String, double >
 Parse a formatted string representing a reaction equation. More...
 
template<typename... Args>
auto stringfy (std::string const &sep, Args... items) -> std::string
 Concatenate the arguments into a string using a given separator string.
 
template<typename... Args>
auto stringfy (std::variant< Args... > const &var) -> std::string
 Stringfy a std::variant object.
 
template<typename... Args>
auto str (Args... items) -> std::string
 Concatenate the arguments into a string without any separator string.
 
auto precision (int precision) -> void
 Set the global precision used when converting floating-point numbers to string.
 
auto precision () -> int
 Return the precision used when converting floating-point numbers to string.
 
auto strfix (double num, int precision=-1) -> std::string
 Return a string representation for a number in fixed format. More...
 
auto strsci (double num, int precision=-1) -> std::string
 Return a string representation for a number in scientific format. More...
 
auto replace (std::string original, std::string substr, std::string newsubstr) -> std::string
 Return a new string where substr occurrences are replaced by newsubstr.
 
auto lowercase (std::string str) -> std::string
 Return a string with lower case characters.
 
auto uppercase (std::string str) -> std::string
 Return a string with upper case characters.
 
auto trimleft (std::string str) -> std::string
 Trim the string from start (taken from http://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring)
 
auto trimright (std::string str) -> std::string
 Trim the string from end (taken from http://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring)
 
auto trim (std::string str) -> std::string
 Trim the string from both ends (taken from http://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring)
 
auto split (std::string const &str, std::string const &delims, std::function< std::string(std::string)> transform) -> std::vector< std::string >
 Split the string on every occurrence of the specified delimiters and apply a transform function.
 
auto split (std::string const &str, std::string const &delims=" ") -> std::vector< std::string >
 Split the string on every occurrence of the specified delimiters.
 
auto join (std::vector< std::string > const &strs, std::string sep=" ") -> std::string
 Join several strings into one.
 
auto tofloat (std::string const &str) -> double
 Convert the string into a floating point number.
 
auto makeunique (std::vector< std::string > words, std::string suffix) -> std::vector< std::string >
 Return a list of words with duplicate names converted to unique ones.
 
auto strlength (std::string const &str) -> std::size_t
 Return the length of the string.
 
auto strlength (const char *str) -> std::size_t
 Return the length of the string.
 
template<typename SubStr , typename... SubStrs>
auto startswith (std::string const &str, SubStr substr, SubStrs... substrs)
 Returns true if string str starts with substr, or any other given sub string in substrs.
 
template<typename SubStr , typename... SubStrs>
auto endswith (std::string const &str, SubStr substr, SubStrs... substrs)
 Returns true if string str ends with substr, or any other given sub string in substrs.
 
template<typename T >
auto table1D (unsigned dim1) -> Table1D< T >
 
template<typename T >
auto table2D (unsigned dim1, unsigned dim2) -> Table2D< T >
 
template<typename T >
auto table3D (unsigned dim1, unsigned dim2, unsigned dim3) -> Table3D< T >
 
auto time () -> Time
 Return the time point now. More...
 
auto elapsed (Time const &end, Time const &begin) -> double
 Return the elapsed time between two time points (in units of s) More...
 
auto elapsed (Time const &begin) -> double
 Return the elapsed time between a time point and now (in units of s) More...
 
template<typename Fun >
constexpr auto asFunction (const Fun &f)
 Convert lambda/function pointers/member functions to std::function. More...
 
 REAKTORO_DEFINE_REFERENCE_TYPE_OF (ActivityProps, ActivityPropsRef)
 
auto chain (const Vec< ActivityModelGenerator > &models) -> ActivityModelGenerator
 Return an activity model resulting from chaining other activity models.
 
auto chain (ActivityModelGenerator const &model) -> ActivityModelGenerator
 Return an activity model resulting from chaining other activity models.
 
template<typename... Models>
auto chain (ActivityModelGenerator const &model, Models const &... models) -> ActivityModelGenerator
 Return an activity model resulting from chaining other activity models.
 
auto operator<< (std::ostream &out, AggregateState option) -> std::ostream &
 Output an AggregateState value.
 
auto parseAggregateState (const std::string &symbol) -> AggregateState
 Return the AggregateState value from given aggregate state symbol. More...
 
auto identifyAggregateState (const std::string &name) -> AggregateState
 Identify the aggregate state in the name of a substance or chemical species. More...
 
auto supportedAggregateStateValues () -> std::string
 Return a string containing the supported string values for AggregateState.
 
auto operator<< (std::ostream &out, const ChemicalFormula &formula) -> std::ostream &
 Output a ChemicalFormula object.
 
auto operator< (const ChemicalFormula &lhs, const ChemicalFormula &rhs) -> bool
 Compare two ChemicalFormula objects for less than.
 
auto operator== (const ChemicalFormula &lhs, const ChemicalFormula &rhs) -> bool
 Compare two ChemicalFormula objects for equality.
 
auto operator<< (std::ostream &out, ChemicalProps const &props) -> std::ostream &
 Output a ChemicalProps object to an output stream.
 
auto operator<< (std::ostream &out, ChemicalState const &state) -> std::ostream &
 Output a ChemicalState object to an output stream.
 
template<typename T , typename... Ts>
constexpr auto _arePhaseReactionOrSurfaceConvertible ()
 
template<typename... Args>
auto createChemicalSystem (Database const &db, Args const &... args) -> ChemicalSystem
 Create a ChemicalSystem object with given database and a list of phase and reaction convertible objects.
 
auto operator<< (std::ostream &out, ChemicalSystem const &system) -> std::ostream &
 Output a ChemicalSystem object.
 
 REAKTORO_DATA_ENCODE_DECLARE (Vec< T >, typename T)
 
 REAKTORO_DATA_DECODE_DECLARE (Vec< T >, typename T)
 
 REAKTORO_DATA_ENCODE_DECLARE (Array< T REAKTORO_COMMA N >, typename T, std::size_t N)
 
 REAKTORO_DATA_DECODE_DECLARE (Array< T REAKTORO_COMMA N >, typename T, std::size_t N)
 
 REAKTORO_DATA_ENCODE_DECLARE (Pair< A REAKTORO_COMMA B >, typename A, typename B)
 
 REAKTORO_DATA_DECODE_DECLARE (Pair< A REAKTORO_COMMA B >, typename A, typename B)
 
 REAKTORO_DATA_ENCODE_DECLARE (Map< K REAKTORO_COMMA T >, typename K, typename T)
 
 REAKTORO_DATA_DECODE_DECLARE (Map< K REAKTORO_COMMA T >, typename K, typename T)
 
 REAKTORO_DATA_ENCODE_DECLARE (Dict< K REAKTORO_COMMA T >, typename K, typename T)
 
 REAKTORO_DATA_DECODE_DECLARE (Dict< K REAKTORO_COMMA T >, typename K, typename T)
 
template<typename T >
 REAKTORO_DATA_ENCODE_DEFINE (Vec< T >, typename T)
 
template<typename T >
 REAKTORO_DATA_DECODE_DEFINE (Vec< T >, typename T)
 
template<typename T , std::size_t N>
 REAKTORO_DATA_ENCODE_DEFINE (Array< T REAKTORO_COMMA N >, typename T, std::size_t N)
 
template<typename T , std::size_t N>
 REAKTORO_DATA_DECODE_DEFINE (Array< T REAKTORO_COMMA N >, typename T, std::size_t N)
 
template<typename A , typename B >
 REAKTORO_DATA_ENCODE_DEFINE (Pair< A REAKTORO_COMMA B >, typename A, typename B)
 
template<typename A , typename B >
 REAKTORO_DATA_DECODE_DEFINE (Pair< A REAKTORO_COMMA B >, typename A, typename B)
 
template<typename K , typename T >
 REAKTORO_DATA_ENCODE_DEFINE (Map< K REAKTORO_COMMA T >, typename K, typename T)
 
template<typename K , typename T >
 REAKTORO_DATA_DECODE_DEFINE (Map< K REAKTORO_COMMA T >, typename K, typename T)
 
template<typename K , typename T >
 REAKTORO_DATA_ENCODE_DEFINE (Dict< K REAKTORO_COMMA T >, typename K, typename T)
 
template<typename K , typename T >
 REAKTORO_DATA_DECODE_DEFINE (Dict< K REAKTORO_COMMA T >, typename K, typename T)
 
auto operator< (const Element &lhs, const Element &rhs) -> bool
 Compare two Element objects for less than.
 
auto operator== (const Element &lhs, const Element &rhs) -> bool
 Compare two Element objects for equality.
 
auto operator!= (const ElementalComposition &l, const ElementalComposition &r) -> bool
 Return true if two ElementalComposition objects are different.
 
auto operator== (const ElementalComposition &l, const ElementalComposition &r) -> bool
 Return true if two ElementalComposition objects are equal.
 
auto operator+ (const ElementList &a, const ElementList &b) -> ElementList
 Return the concatenation of two ElementList objects.
 
template<typename Result , typename... Args>
auto chain (const Vec< Model< Result(Args...)>> &models) -> Model< Result(Args...)>
 Return a reaction thermodynamic model resulting from chaining other models.
 
template<typename Signature >
auto chain (const Model< Signature > &model) -> Model< Signature >
 Return a reaction thermodynamic model resulting from chaining other models.
 
template<typename Result , typename... Args, typename... Models>
auto chain (const Model< Result(Args...)> &model, const Models &... models) -> Model< Result(Args...)>
 Return a reaction thermodynamic model resulting from chaining other models.
 
auto operator< (const Phase &lhs, const Phase &rhs) -> bool
 Compare two Phase instances for less than.
 
auto operator== (const Phase &lhs, const Phase &rhs) -> bool
 Compare two Phase instances for equality.
 
auto operator+ (const PhaseList &a, const PhaseList &b) -> PhaseList
 Return the concatenation of two PhaseList objects.
 
auto speciate (StringList const &substances) -> Speciate
 The function used to specify phase species to be determined from element symbols in a list of substance formulas.
 
auto exclude (StringList const &tags) -> Exclude
 The function used to specify species that should be filtered out when contructing a phase.
 
template<typename T , typename... Ts>
constexpr auto _areGeneralPhasesImpl ()
 
auto operator< (Reaction const &lhs, Reaction const &rhs) -> bool
 Compare two Reaction instances for less than.
 
auto operator== (Reaction const &lhs, Reaction const &rhs) -> bool
 Compare two Reaction instances for equality.
 
auto operator< (const ReactionEquation &lhs, const ReactionEquation &rhs) -> bool
 Return true if a Species object is less than another for sorting reasons.
 
auto operator== (const ReactionEquation &lhs, const ReactionEquation &rhs) -> bool
 Return true if two ReactionEquation objects are equal.
 
auto operator<< (std::ostream &out, const ReactionEquation &equation) -> std::ostream &
 Output a ReactionEquation object.
 
auto operator+ (const ReactionList &a, const ReactionList &b) -> ReactionList
 Return the concatenation of two ReactionList objects.
 
auto operator+ (ReactionRate const &rate)
 
auto operator- (ReactionRate rate)
 
template<typename T , Requires< isNumeric< T >> = true>
auto operator+ (ReactionRate rate, T const &scalar)
 
template<typename T , Requires< isNumeric< T >> = true>
auto operator- (ReactionRate rate, T const &scalar)
 
template<typename T , Requires< isNumeric< T >> = true>
auto operator* (ReactionRate rate, T const &scalar)
 
template<typename T , Requires< isNumeric< T >> = true>
auto operator/ (ReactionRate rate, T const &scalar)
 
template<typename T , Requires< isNumeric< T >> = true>
auto operator+ (T const &scalar, ReactionRate rate)
 
template<typename T , Requires< isNumeric< T >> = true>
auto operator- (T const &scalar, ReactionRate rate)
 
template<typename T , Requires< isNumeric< T >> = true>
auto operator* (T const &scalar, ReactionRate rate)
 
template<typename T , Requires< isNumeric< T >> = true>
auto operator/ (T const &scalar, ReactionRate rate)
 
auto operator<< (std::ostream &out, const ReactionThermoProps &props) -> std::ostream &
 Output a ReactionThermoProps object to an output stream.
 
auto operator< (const Species &lhs, const Species &rhs) -> bool
 Return true if a Species object is less than another for sorting reasons.
 
auto operator== (const Species &lhs, const Species &rhs) -> bool
 Return true if two Species objects have the same name.
 
auto operator+ (const SpeciesList &a, const SpeciesList &b) -> SpeciesList
 Return the concatenation of two SpeciesList objects.
 
auto operator<< (std::ostream &out, const SpeciesThermoProps &props) -> std::ostream &
 Output a SpeciesThermoProps object to an output stream.
 
auto operator<< (std::ostream &out, StateOfMatter option) -> std::ostream &
 Output a StateOfMatter value.
 
auto operator< (Surface const &lhs, Surface const &rhs) -> bool
 Compare two Surface objects for less than.
 
auto operator== (Surface const &lhs, Surface const &rhs) -> bool
 Compare two Surface objects for equality.
 
auto operator+ (SurfaceList const &a, SurfaceList const &b) -> SurfaceList
 Return the concatenation of two SurfaceList objects.
 
auto operator<< (std::ostream &out, const BilinearInterpolator &interpolator) -> std::ostream &
 Output a BilinearInterpolator instance.
 
auto derivativeForward (const ScalarFunction &f, VectorXdConstRef x) -> VectorXd
 Calculate the partial derivatives of a scalar function using a 1st-order forward finite difference scheme. More...
 
auto derivativeBackward (const ScalarFunction &f, VectorXdConstRef x) -> VectorXd
 Calculate the partial derivatives of a scalar function using a 1st-order backward finite difference scheme. More...
 
auto derivativeCentral (const ScalarFunction &f, VectorXdConstRef x) -> VectorXd
 Calculate the partial derivatives of a scalar function using a 2nd-order central finite difference scheme. More...
 
auto derivativeForward (const VectorFunction &f, VectorXdConstRef x) -> MatrixXd
 Calculate the partial derivatives of a vector function using a 1st-order forward finite difference scheme. More...
 
auto derivativeBackward (const VectorFunction &f, VectorXdConstRef x) -> MatrixXd
 Calculate the partial derivatives of a vector function using a 1st-order backward finite difference scheme. More...
 
auto derivativeCentral (const VectorFunction &f, VectorXdConstRef x) -> MatrixXd
 Calculate the partial derivatives of a vector function using a 2nd-order central finite difference scheme. More...
 
auto linearlyIndependentCols (MatrixXdConstRef A) -> Indices
 Determine the set of linearly independent columns in a matrix using a column pivoting QR algorithm. More...
 
auto linearlyIndependentRows (MatrixXdConstRef A) -> Indices
 Determine the set of linearly independent rows in a matrix. More...
 
auto linearlyIndependentCols (MatrixXdConstRef A, MatrixXdRef B) -> Indices
 Determine the set of linearly independent columns in a matrix. More...
 
auto linearlyIndependentRows (MatrixXdConstRef A, MatrixXdRef B) -> Indices
 Determine the set of linearly independent rows in a matrix. More...
 
auto inverseShermanMorrison (MatrixXdConstRef invA, VectorXdConstRef D) -> MatrixXd
 Calculate the inverse of A + D where inv(A) is already known and D is a diagonal matrix. More...
 
auto rationalize (double x, unsigned maxden) -> std::tuple< long, long >
 Calculates the rational number that approximates a given real number. More...
 
auto cleanRationalNumbers (double *vals, long size, long maxden=6) -> void
 Clean an array that is known to have rational numbers from round-off errors. More...
 
auto cleanRationalNumbers (MatrixXdRef A, long maxden=6) -> void
 Clean a matrix that is known to have rational numbers from round-off errors. More...
 
auto dot3p (VectorXdConstRef x, VectorXdConstRef y, double s) -> double
 Return the dot product s + dot(x, y) of two vectors with triple-precision.
 
auto residual3p (MatrixXdConstRef A, VectorXdConstRef x, VectorXdConstRef b) -> VectorXd
 Return the residual of the equation A*x - b with triple-precision.
 
template<typename T , typename U >
auto largestRelativeDifference (Eigen::ArrayBase< T > const &actual, Eigen::ArrayBase< U > const &expected) -> double
 Return the largest relative difference between two arrays actual and expected.
 
template<typename T , typename U >
auto largestRelativeDifferenceLogScale (Eigen::ArrayBase< T > const &actual, Eigen::ArrayBase< U > const &expected) -> double
 Return the largest relative difference between two arrays actual and expected in log scale.
 
template<typename T >
auto cardano (const T &b, const T &c, const T &d) -> CubicRoots< T >
 Calculate the roots of a cubic equation using Cardano's method. More...
 
template<typename T >
auto newton (const std::function< std::tuple< T, T >(const T &)> &f, const T &x0, const T &epsilon, std::size_t maxiter) -> std::tuple< T, std::size_t, bool >
 Calculate the root of a non-linear function using Newton's method. More...
 
template<typename T >
auto realRoots (const CubicRoots< T > &roots) -> std::vector< T >
 Return all real roots of a group of roots. More...
 
auto ActivityModelVanDerWaals (CubicBipModelGenerator cbipmodel={}) -> ActivityModelGenerator
 Return the activity model for fluid phases based on the Van der Waals cubic equation of state.
 
auto ActivityModelRedlichKwong (CubicBipModelGenerator cbipmodel={}) -> ActivityModelGenerator
 Return the activity model for fluid phases based on the Redlich-Kwong cubic equation of state.
 
auto ActivityModelSoaveRedlichKwong (CubicBipModelGenerator cbipmodel={}) -> ActivityModelGenerator
 Return the activity model for fluid phases based on the Soave-Redlich-Kwong cubic equation of state.
 
auto ActivityModelPengRobinson (CubicBipModelGenerator cbipmodel={}) -> ActivityModelGenerator
 Return the activity model for fluid phases based on the Peng-Robinson (1978) cubic equation of state.
 
auto ActivityModelPengRobinson76 (CubicBipModelGenerator cbipmodel={}) -> ActivityModelGenerator
 Return the activity model for fluid phases based on the Peng-Robinson (1976) cubic equation of state.
 
auto ActivityModelPengRobinson78 (CubicBipModelGenerator cbipmodel={}) -> ActivityModelGenerator
 Return the activity model for fluid phases based on the Peng-Robinson (1978) cubic equation of state.
 
auto ActivityModelPengRobinsonPhreeqc () -> ActivityModelGenerator
 Return the activity model for fluid phases based on the Peng-Robinson (1976) with the binary interaction parameter model used in PHREEQC.
 
auto ActivityModelPengRobinsonSoreideWhitson () -> ActivityModelGenerator
 Return the activity model for fluid phases based on the Peng-Robinson (1978) with the binary interaction parameter model of Søreide and Whitson (1992).
 
auto CubicBipModelPhreeqc () -> CubicBipModelGenerator
 Return the binary interaction parameter model for Peng-Robinson EOS (1976) equivalent to that used in PHREEQC.
 
auto CubicBipModelSoreideWhitson () -> CubicBipModelGenerator
 Return the binary interaction parameter model for Peng-Robinson EOS (1978) equivalent to that reported in Søreide and Whitson (1992).
 
auto ActivityModelPengRobinsonPHREEQC () -> ActivityModelGenerator
 Return the activity model for fluid phases based on the Peng-Robinson (1976) with the binary interaction parameter model used in PHREEQC.
 
auto CubicBipModelPHREEQC () -> CubicBipModelGenerator
 Return the binary interaction parameter model for Peng-Robinson EOS (1976) equivalent to that used in PHREEQC.
 
auto ActivityModelDavies () -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on the Davies model. More...
 
auto ActivityModelDavies (ActivityModelDaviesParams params) -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on the Davies model with given custom parameters. More...
 
auto ActivityModelDebyeHuckel () -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on the Debye–Hückel model. More...
 
auto ActivityModelDebyeHuckel (ActivityModelDebyeHuckelParams params) -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on the Debye–Hückel model with given custom parameters. More...
 
auto ActivityModelDebyeHuckelLimitingLaw () -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on the Debye–Hückel limiting law model. More...
 
auto ActivityModelDebyeHuckelKielland () -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on the Debye–Hückel model with Kielland (1937) parameters. More...
 
auto ActivityModelDebyeHuckelPHREEQC () -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on the Debye–Hückel model using PHREEQC parameters. More...
 
auto ActivityModelDebyeHuckelWATEQ4F () -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on the Debye–Hückel model using WATEQ4F parameters. More...
 
auto ActivityModelDrummond (String gas) -> ActivityModelGenerator
 Return the activity model for a dissolved gas species in an aqueous phase based on Drummond (1981). More...
 
auto ActivityModelDrummond (String gas, ActivityModelDrummondParams params) -> ActivityModelGenerator
 Return the activity model for a dissolved gas species in an aqueous phase based on Drummond (1981). More...
 
auto ActivityModelDuanSun (String gas) -> ActivityModelGenerator
 Return the activity model for a dissolved gas species in an aqueous phase based on Duan and Sun (2003). More...
 
auto ActivityModelExtendedUNIQUAC () -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on PHREEQC's implementation.
 
auto ActivityModelExtendedUNIQUAC (ActivityModelParamsExtendedUNIQUAC const &params) -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on PHREEQC's implementation.
 
auto ActivityModelExtendedUNIQUAC (Params const &params) -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on PHREEQC's implementation.
 
auto ActivityModelHKF () -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on the HKF model. More...
 
auto ActivityModelIdealAqueous () -> ActivityModelGenerator
 Return the activity model for an ideal aqueous solution.
 
auto ActivityModelIdealGas () -> ActivityModelGenerator
 Return the activity model for an ideal gaseous solution.
 
auto ActivityModelIdealIonExchange () -> ActivityModelGenerator
 Return the activity model for the ideal ion exchange.
 
auto ActivityModelIdealSolution (StateOfMatter stateofmatter) -> ActivityModelGenerator
 Return the activity model for an ideal solution. More...
 
auto ActivityModelIonExchange () -> ActivityModelGenerator
 Return the activity model for the ion exchange. More...
 
auto ActivityModelIonExchangeGainesThomas () -> ActivityModelGenerator
 Return the Gaines-Thomas activity model for ion exchange. More...
 
auto ActivityModelIonExchangeVanselow () -> ActivityModelGenerator
 Return the Vanselov activity model for ion exchange. More...
 
auto ActivityModelPengRobinsonPhreeqcOriginal () -> ActivityModelGenerator
 Return the activity model for gaseous phases based on PHREEQC's implementation of Peng-Robinson equation of state.
 
auto ActivityModelPhreeqc (PhreeqcDatabase const &db) -> ActivityModelGenerator
 Return an activity model generator for aqueous phases based on the model used in PHREEQC. More...
 
auto ActivityModelPhreeqcIonicStrengthPressureCorrection () -> ActivityModelGenerator
 Return an activity model that applies an ionic strengh and pressure correction on the activity coefficients of aqueous solutes to produce consistent results with PHREEQC. More...
 
auto ActivityModelPitzer () -> ActivityModelGenerator
 Return the Pitzer activity model for aqueous electrolyte phases based on PHREEQC's implementation.
 
auto ActivityModelPitzer (ActivityModelParamsPitzer const &params) -> ActivityModelGenerator
 Return the Pitzer activity model for aqueous electrolyte phases based on PHREEQC's implementation.
 
auto ActivityModelPitzer (Params const &params) -> ActivityModelGenerator
 Return the Pitzer activity model for aqueous electrolyte phases based on PHREEQC's implementation.
 
auto ActivityModelPitzerHMW () -> ActivityModelGenerator
 Return the activity model for aqueous electrolyte phases based on Harvie-Møller-Weare Pitzer's formulation. More...
 
auto ActivityModelRedlichKister (real a0, real a1, real a2) -> ActivityModelGenerator
 Return the activity model for a binary solid solution phase based on Redlich-Kister model. More...
 
auto ActivityModelRumpf (String gas) -> ActivityModelGenerator
 Return the activity model for a dissolved gas species in an aqueous phase based on Rumpf (1994). More...
 
auto ActivityModelSetschenow (String neutral, real b) -> ActivityModelGenerator
 Return the Setschenow activity model for a neutral aqueous species. More...
 
auto ActivityModelSpycherPruessEnnis () -> ActivityModelGenerator
 Return the activity model for gaseous phases formulated in Spycher et al. More...
 
auto ActivityModelSpycherReed () -> ActivityModelGenerator
 Return the activity model for gaseous phases formulated in Spycher and Reed (1988). More...
 
auto ReactionRateModelPalandriKharaka () -> ReactionRateModelGenerator
 Return the reaction rate model of [for] dissolution/precipitation kinetics of minerals. More...
 
auto ReactionRateModelPalandriKharaka (Params const &params) -> ReactionRateModelGenerator
 Return the reaction rate model of [for] dissolution/precipitation kinetics of minerals. More...
 
auto ReactionRateModelPalandriKharaka (ReactionRateModelParamsPalandriKharaka const &params) -> ReactionRateModelGenerator
 Return the reaction rate model of [for] dissolution/precipitation kinetics of minerals.
 
auto ReactionRateModelPalandriKharaka (Vec< ReactionRateModelParamsPalandriKharaka > const &paramsvec) -> ReactionRateModelGenerator
 Return the reaction rate model of [for] dissolution/precipitation kinetics of minerals.
 
auto ReactionStandardThermoModelConstLgK (const ReactionStandardThermoModelParamsConstLgK &params) -> ReactionStandardThermoModel
 Return a function that calculates thermodynamic properties of a reaction using a constant model for \(\lg K(T)\). More...
 
auto ReactionStandardThermoModelFromData (Data const &data) -> ReactionStandardThermoModel
 Return a reaction thermodynamic model with given Data object.
 
auto ReactionStandardThermoModelGemsLgK (const ReactionStandardThermoModelParamsGemsLgK &params) -> ReactionStandardThermoModel
 Return a function that calculates thermodynamic properties of a reaction using GEM-Selektor's expression for \(\lg K(T)\). More...
 
auto ReactionStandardThermoModelPhreeqcLgK (const ReactionStandardThermoModelParamsPhreeqcLgK &params) -> ReactionStandardThermoModel
 Return a function that calculates thermodynamic properties of a reaction using PHREEQC's analytical expression. More...
 
auto ReactionStandardThermoModelPressureCorrection (real const &Pr) -> ReactionStandardThermoModel
 Return a function that calculates pressure correction for standard Gibbs energy and enthalpy a reaction. More...
 
auto ReactionStandardThermoModelVantHoff (const ReactionStandardThermoModelParamsVantHoff &params) -> ReactionStandardThermoModel
 Return a function that calculates thermodynamic properties of a reaction using van't Hoff's model. More...
 
auto StandardThermoModelConstant (const StandardThermoModelParamsConstant &params) -> StandardThermoModel
 Return a function that calculates thermodynamic properties of a species using a constant model for its standard properties.
 
auto StandardThermoModelExtendedUNIQUAC (StandardThermoModelParamsExtendedUNIQUAC const &params) -> StandardThermoModel
 Return a function that calculates the thermodynamic properties of a substance using the extended UNIQUAC model.
 
auto StandardThermoModelFromData (Data const &data) -> StandardThermoModel
 Return a reaction thermodynamic model with given Data object.
 
auto StandardThermoModelHKF (const StandardThermoModelParamsHKF &params) -> StandardThermoModel
 Return a function that calculates thermodynamic properties of an aqueous solute using the HKF model.
 
auto StandardThermoModelHollandPowell (const StandardThermoModelParamsHollandPowell &params) -> StandardThermoModel
 Return a function that calculates thermodynamic properties of a fluid or mineral species using the Holland-Powell model.
 
auto StandardThermoModelInterpolation (const StandardThermoModelParamsInterpolation &params) -> StandardThermoModel
 Return a function that calculates thermodynamic properties of a species using the Maier-Kelley model.
 
auto StandardThermoModelMaierKelley (const StandardThermoModelParamsMaierKelley &params) -> StandardThermoModel
 Return a function that calculates thermodynamic properties of a species using the Maier-Kelley model.
 
auto StandardThermoModelMineralHKF (const StandardThermoModelParamsMineralHKF &params) -> StandardThermoModel
 Return a function that calculates thermodynamic properties of a species using the Maier-Kelley-HKF model.
 
auto StandardThermoModelNasa (const StandardThermoModelParamsNasa &params) -> StandardThermoModel
 Return a function that calculates thermodynamic properties of a species using the Maier-Kelley model.
 
auto StandardThermoModelWaterHKF (const StandardThermoModelParamsWaterHKF &params) -> StandardThermoModel
 Return a function that calculates thermodynamic properties of the aqueous solvent (water) using the HKF model.
 
auto StandardVolumeModelConstant (const StandardVolumeModelParamsConstant &params) -> StandardVolumeModel
 Return a function that calculates the standard volume of a product species using a constant model.
 
auto speciesElectroPropsHKF (const gHKF &gstate, const StandardThermoModelParamsHKF &params) -> SpeciesElectroProps
 Compute the electrostatic properties of an aqueous solute with given HKF g function state.
 
auto SurfaceAreaModelConstant (real const &A0) -> SurfaceAreaModel
 Return a constant surface area model. More...
 
auto SurfaceAreaModelConstant (real const &A0, Chars unitA0) -> SurfaceAreaModel
 Return a constant surface area model. More...
 
auto SurfaceAreaModelLinearMolar (String const &phase, real const &Abar) -> SurfaceAreaModel
 Return a surface area model based on linear variation from a given molar surface area. More...
 
auto SurfaceAreaModelLinearSpecific (String const &phase, real const &Abar) -> SurfaceAreaModel
 Return a surface area model based on linear variation from a given specific surface area. More...
 
auto SurfaceAreaModelLinearVolumetric (String const &phase, real const &Abar) -> SurfaceAreaModel
 Return a surface area model based on linear variation from a given volumetric surface area. More...
 
auto SurfaceAreaModelLinear (String const &phase, real Abar, Chars unitAbar) -> SurfaceAreaModel
 Return a surface area model based on linear variation from a given normalized surface area. More...
 
auto SurfaceAreaModelPowerMolar (String const &phase, real const &A0, real const &q0, real const &p) -> SurfaceAreaModel
 Return a surface area model for a phase based on power law that depends on a given initial surface area and phase amount. More...
 
auto SurfaceAreaModelPowerSpecific (String const &phase, real const &A0, real const &q0, real const &p) -> SurfaceAreaModel
 Return a surface area model for a phase based on power law that depends on a given initial surface area and phase mass. More...
 
auto SurfaceAreaModelPowerVolumetric (String const &phase, real const &A0, real const &q0, real const &p) -> SurfaceAreaModel
 Return a surface area model for a phase based on power law that depends on a given initial surface area and phase volume. More...
 
auto SurfaceAreaModelPower (String const &mineral, real A0, Chars unitA0, real m0, Chars unitm0, real const &q) -> SurfaceAreaModel
 Return a surface area model for a phase based on power law that depends on a given initial surface area and phase amount, mass or volume. More...
 
 REAKTORO_DATA_ENCODE_DECLARE (real)
 
 REAKTORO_DATA_DECODE_DECLARE (real)
 
 REAKTORO_DATA_ENCODE_DECLARE (AggregateState)
 
 REAKTORO_DATA_DECODE_DECLARE (AggregateState)
 
 REAKTORO_DATA_ENCODE_DECLARE (ChemicalFormula)
 
 REAKTORO_DATA_DECODE_DECLARE (ChemicalFormula)
 
 REAKTORO_DATA_ENCODE_DECLARE (ChemicalSystem)
 
 REAKTORO_DATA_DECODE_DECLARE (ChemicalSystem)
 
 REAKTORO_DATA_ENCODE_DECLARE (Database)
 
 REAKTORO_DATA_DECODE_DECLARE (Database)
 
 REAKTORO_DATA_ENCODE_DECLARE (Element)
 
 REAKTORO_DATA_DECODE_DECLARE (Element)
 
 REAKTORO_DATA_ENCODE_DECLARE (ElementList)
 
 REAKTORO_DATA_DECODE_DECLARE (ElementList)
 
 REAKTORO_DATA_ENCODE_DECLARE (ElementalComposition)
 
 REAKTORO_DATA_DECODE_DECLARE (ElementalComposition)
 
 REAKTORO_DATA_ENCODE_DECLARE (FormationReaction)
 
 REAKTORO_DATA_DECODE_DECLARE (FormationReaction)
 
 REAKTORO_DATA_ENCODE_DECLARE (Phase)
 
 REAKTORO_DATA_DECODE_DECLARE (Phase)
 
 REAKTORO_DATA_ENCODE_DECLARE (ReactionStandardThermoModel)
 
 REAKTORO_DATA_DECODE_DECLARE (ReactionStandardThermoModel)
 
 REAKTORO_DATA_ENCODE_DECLARE (Species)
 
 REAKTORO_DATA_DECODE_DECLARE (Species)
 
 REAKTORO_DATA_ENCODE_DECLARE (SpeciesList)
 
 REAKTORO_DATA_DECODE_DECLARE (SpeciesList)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardThermoModel)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardThermoModel)
 
 REAKTORO_DATA_ENCODE_DEFINE (AggregateState)
 
 REAKTORO_DATA_DECODE_DEFINE (AggregateState)
 
 REAKTORO_DATA_ENCODE_DECLARE (ActivityModelParamsPitzer)
 
 REAKTORO_DATA_DECODE_DECLARE (ActivityModelParamsPitzer)
 
 REAKTORO_DATA_ENCODE_DECLARE (ActivityModelParamsExtendedUNIQUAC)
 
 REAKTORO_DATA_DECODE_DECLARE (ActivityModelParamsExtendedUNIQUAC)
 
 REAKTORO_DATA_ENCODE_DECLARE (ReactionRateModelParamsPalandriKharaka)
 
 REAKTORO_DATA_DECODE_DECLARE (ReactionRateModelParamsPalandriKharaka)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardThermoModelParamsConstant)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardThermoModelParamsConstant)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardThermoModelParamsExtendedUNIQUAC)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardThermoModelParamsExtendedUNIQUAC)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardThermoModelParamsHKF)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardThermoModelParamsHKF)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardThermoModelParamsHollandPowell)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardThermoModelParamsHollandPowell)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardThermoModelParamsInterpolation)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardThermoModelParamsInterpolation)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardThermoModelParamsMaierKelley)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardThermoModelParamsMaierKelley)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardThermoModelParamsMineralHKF)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardThermoModelParamsMineralHKF)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardThermoModelParamsNasa)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardThermoModelParamsNasa)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardThermoModelParamsWaterHKF)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardThermoModelParamsWaterHKF)
 
 REAKTORO_DATA_ENCODE_DECLARE (ReactionStandardThermoModelParamsConstLgK)
 
 REAKTORO_DATA_DECODE_DECLARE (ReactionStandardThermoModelParamsConstLgK)
 
 REAKTORO_DATA_ENCODE_DECLARE (ReactionStandardThermoModelParamsGemsLgK)
 
 REAKTORO_DATA_DECODE_DECLARE (ReactionStandardThermoModelParamsGemsLgK)
 
 REAKTORO_DATA_ENCODE_DECLARE (ReactionStandardThermoModelParamsPhreeqcLgK)
 
 REAKTORO_DATA_DECODE_DECLARE (ReactionStandardThermoModelParamsPhreeqcLgK)
 
 REAKTORO_DATA_ENCODE_DECLARE (ReactionStandardThermoModelParamsVantHoff)
 
 REAKTORO_DATA_DECODE_DECLARE (ReactionStandardThermoModelParamsVantHoff)
 
 REAKTORO_DATA_ENCODE_DECLARE (StandardVolumeModelParamsConstant)
 
 REAKTORO_DATA_DECODE_DECLARE (StandardVolumeModelParamsConstant)
 
auto operator<< (std::ostream &out, AqueousProps const &state) -> std::ostream &
 Output an AqueousProps object to an output stream.
 
auto operator<< (std::ostream &out, const IonExchangeProps &state) -> std::ostream &
 Output an IonExchangeProps object to an output stream.
 
auto operator+ (const Material &l, const Material &r) -> Material
 Return a material that is the result of the combination of two others.
 
auto operator<< (std::ostream &out, const Material &material) -> std::ostream &
 Output a Material object to an output stream.
 
auto waterElectroPropsJohnsonNorton (real T, real P, const WaterThermoProps &wtp) -> WaterElectroProps
 Calculate the electrostatic state of water using the model of Johnson and Norton (1991). More...
 
auto waterHelmholtzPropsHGK (real T, real D) -> WaterHelmholtzProps
 Calculate the Helmholtz free energy state of water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterHelmholtzPropsWagnerPruss (real T, real D) -> WaterHelmholtzProps
 Calculate the Helmholtz free energy state of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterDensityWagnerPrussInterp (real const &T, real const &P, StateOfMatter som) -> real
 Compute the density of water (in kg/m3) at given a temperature and pressure using quadratic interpolation. More...
 
auto waterThermoPropsWagnerPrussInterp (real const &T, real const &P, StateOfMatter som) -> WaterThermoProps
 Compute the thermodynamic properties of water at given a temperature and pressure using quadratic interpolation. More...
 
auto waterThermoPropsWagnerPrussInterpData (StateOfMatter som) -> Vec< Vec< WaterThermoProps >> const &
 Return the pre-computed thermodynamic properties of water using Wagner and Pruss (2002) equation of state used for interpolation. More...
 
auto operator+ (WaterThermoProps const &r) -> WaterThermoProps
 
auto operator+ (WaterThermoProps &&r) -> WaterThermoProps &&
 
auto operator- (WaterThermoProps const &r) -> WaterThermoProps
 
auto operator- (WaterThermoProps &&r) -> WaterThermoProps &&
 
auto operator+ (WaterThermoProps const &l, WaterThermoProps const &r) -> WaterThermoProps
 
auto operator+ (WaterThermoProps &&l, WaterThermoProps const &r) -> WaterThermoProps &&
 
auto operator+ (WaterThermoProps const &l, WaterThermoProps &&r) -> WaterThermoProps &&
 
auto operator+ (WaterThermoProps &&l, WaterThermoProps &&r) -> WaterThermoProps &&
 
auto operator- (WaterThermoProps const &l, WaterThermoProps const &r) -> WaterThermoProps
 
auto operator- (WaterThermoProps &&l, WaterThermoProps const &r) -> WaterThermoProps &&
 
auto operator- (WaterThermoProps const &l, WaterThermoProps &&r) -> WaterThermoProps &&
 
auto operator- (WaterThermoProps &&l, WaterThermoProps &&r) -> WaterThermoProps &&
 
auto operator* (double const &l, WaterThermoProps const &r) -> WaterThermoProps
 
auto operator* (double const &l, WaterThermoProps &&r) -> WaterThermoProps &&
 
auto operator* (WaterThermoProps const &l, double const &r) -> WaterThermoProps
 
auto operator* (WaterThermoProps &&l, double const &r) -> WaterThermoProps &&
 
auto operator* (real const &l, WaterThermoProps const &r) -> WaterThermoProps
 
auto operator* (real const &l, WaterThermoProps &&r) -> WaterThermoProps &&
 
auto operator* (WaterThermoProps const &l, real const &r) -> WaterThermoProps
 
auto operator* (WaterThermoProps &&l, real const &r) -> WaterThermoProps &&
 
auto operator/ (WaterThermoProps const &l, double const &r) -> WaterThermoProps
 
auto operator/ (WaterThermoProps &&l, double const &r) -> WaterThermoProps &&
 
auto operator/ (WaterThermoProps const &l, real const &r) -> WaterThermoProps
 
auto operator/ (WaterThermoProps &&l, real const &r) -> WaterThermoProps &&
 
auto waterThermoPropsHGK (real const &T, real const &P, StateOfMatter som) -> WaterThermoProps
 Calculate the thermodynamic properties of water using the Haar-Gallagher-Kell (1984) equation of state. More...
 
auto waterThermoPropsHGKMemoized (real const &T, real const &P, StateOfMatter som) -> WaterThermoProps
 Calculate the thermodynamic properties of water using the Haar-Gallagher-Kell (1984) equation of state. More...
 
auto waterThermoPropsWagnerPruss (real const &T, real const &P, StateOfMatter som) -> WaterThermoProps
 Calculate the thermodynamic properties of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterThermoPropsWagnerPrussMemoized (real const &T, real const &P, StateOfMatter som) -> WaterThermoProps
 Calculate the thermodynamic properties of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterThermoPropsWagnerPrussInterpMemoized (real const &T, real const &P, StateOfMatter som) -> WaterThermoProps
 Calculate the thermodynamic properties of water using interpolation of pre-computed properties using the Wagner and Pruss (1995) equation of state. More...
 
auto waterThermoProps (real const &T, real const &P, WaterHelmholtzProps const &whp) -> WaterThermoProps
 Calculate the thermodynamic properties of water. More...
 
auto waterDensityHGK (real const &T, real const &P, StateOfMatter stateofmatter) -> real
 Calculate the density of water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterDensityWagnerPruss (real const &T, real const &P, StateOfMatter stateofmatter) -> real
 Calculate the density of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterLiquidDensityHGK (real const &T, real const &P) -> real
 Calculate the density of liquid water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterLiquidDensityWagnerPruss (real const &T, real const &P) -> real
 Calculate the density of liquid water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterVaporDensityHGK (real const &T, real const &P) -> real
 Calculate the density of vapor water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterVaporDensityWagnerPruss (real const &T, real const &P) -> real
 Calculate the density of vapor water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterPressureHGK (real const &T, real const &D) -> real
 Calculate the pressure of water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterPressureWagnerPruss (real const &T, real const &D) -> real
 Calculate the pressure of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterSaturationPressureWagnerPruss (real const &T) -> real
 Calculate the saturation pressure of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterSaturationLiquidDensityWagnerPruss (real const &T) -> real
 Calculate the saturation liquid-density of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterSaturationVapourDensityWagnerPruss (real const &T) -> real
 Calculate the saturation vapour-density of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterSaturatedPressureWagnerPruss (real const &T) -> real
 DEPRECATED (use waterSaturationPressureWagnerPruss)
 
auto waterSaturatedLiquidDensityWagnerPruss (real const &T) -> real
 DEPRECATED (use waterSaturationLiquidDensityWagnerPruss)
 
auto waterSaturatedVapourDensityWagnerPruss (real const &T) -> real
 DEPRECATED (use waterSaturationVapourDensityWagnerPruss)
 
auto equilibrate (ChemicalState &state) -> EquilibriumResult
 Perform a chemical equilibrium calculation on a given chemical state. More...
 
auto equilibrate (ChemicalState &state, const EquilibriumOptions &options) -> EquilibriumResult
 
auto equilibrate (ChemicalState &state, const EquilibriumRestrictions &restrictions) -> EquilibriumResult
 
auto equilibrate (ChemicalState &state, const EquilibriumRestrictions &restrictions, const EquilibriumOptions &options) -> EquilibriumResult
 
auto equilibrate (ChemicalState &state, ArrayXdConstRef b0) -> EquilibriumResult
 
auto equilibrate (ChemicalState &state, const EquilibriumOptions &options, ArrayXdConstRef b0) -> EquilibriumResult
 
auto equilibrate (ChemicalState &state, const EquilibriumRestrictions &restrictions, ArrayXdConstRef b0) -> EquilibriumResult
 
auto equilibrate (ChemicalState &state, const EquilibriumRestrictions &restrictions, const EquilibriumOptions &options, ArrayXdConstRef b0) -> EquilibriumResult
 

Variables

constexpr auto universalGasConstant = 8.3144621
 The universal gas constant (in J/(mol*K))
 
constexpr auto faradayConstant = 96485.3329
 The Faraday constant (in C/mol)
 
constexpr auto avogadroNumber = 6.02214076e+23
 The Avogadro's number (in 1/mol)
 
constexpr auto vacuumPermittivity = 8.8541878128e-12
 The vacuum permittivity (in C²/(J*m))
 
constexpr auto molarMassElectron = 5.4857990888e-07
 The molar mass of an electron (in kg/mol)
 
constexpr auto jouleToCalorie = 0.239005736
 The constant factor that converts joule to calorie.
 
constexpr auto calorieToJoule = 4.184
 The constant factor that converts calorie to joule.
 
constexpr auto barToPascal = 1.0e+05
 The conversion factor from bar to pascal.
 
constexpr auto atmToPascal = 101325
 The conversion factor from atm to pascal.
 
constexpr auto cubicCentimeterToCubicMeter = 1.0e-06
 The conversion factor from cubic centimeters to cubic meters.
 
constexpr auto cubicMeterToCubicCentimeter = 1.0e+06
 The conversion factor from cubic meters to cubic centimeters.
 
constexpr auto ln10 = 2.30258509299404590109361379290930926799774169921875
 The value of ln(10)
 
constexpr auto inf = std::numeric_limits<double>::infinity()
 The value of infinity.
 
constexpr auto NaN = std::numeric_limits<double>::quiet_NaN()
 The value of NaN.
 
constexpr auto epsilon = std::numeric_limits<double>::epsilon()
 The value of machine precision epsilon.
 
template<typename T >
constexpr auto isNumeric = (isArithmetic<T> || isSame<T, real>) && !isSame<T, bool>
 
template<typename T >
constexpr auto isArithmetic = std::is_arithmetic_v<T>
 
template<typename T >
constexpr auto isInteger = std::numeric_limits<Decay<T>>::is_integer
 
template<typename T >
constexpr auto isFloatingPoint = std::is_floating_point_v<T>
 
template<typename From , typename To >
constexpr auto isConvertible = std::is_convertible_v<From, To>
 
template<typename T , typename U >
constexpr auto isSame = std::is_same_v<Decay<T>, Decay<U>>
 
template<typename T , typename U >
constexpr auto isBaseOf = std::is_base_of_v<Decay<T>, Decay<U>>
 
template<typename T >
constexpr auto isFunction = detail::isFunction<Decay<T>>::value
 
template<typename T , typename U , typename... Us>
constexpr auto isOneOf = detail::isOneOf<T, U, Us...>()
 
template<typename T , typename... Ts>
constexpr auto arePhaseReactionOrSurfaceConvertible = _arePhaseReactionOrSurfaceConvertible<T, Ts...>()
 Used to determine if T and all types in Ts are either GeneralPhase or GeneralPhaseGenerator.
 
template<typename T , typename... Ts>
constexpr auto areGeneralPhases = _areGeneralPhasesImpl<T, Ts...>()
 Used to determine if T and all types in Ts are either GeneralPhase or GeneralPhaseGenerator.
 
const double waterMolarMass = 0.018015268
 The molar mass of water in units of kg/mol.
 
const double waterCriticalTemperature = 647.096
 The critical temperature of water in units of K.
 
const double waterCriticalPressure = 22.064e+06
 The critical pressure of water in units of Pa.
 
const double waterCriticalDensity = 322.0
 The critical density of water in units of kg/m3.
 
const double waterTriplePointTemperature = 273.16
 The triple point temperature of water in units of K.
 
const double waterTriplePointPressure = 611.655
 The triple point pressure of water in units of Pa.
 
const double waterTriplePointDensityLiquid = 999.793
 The triple point liquid-density of water in units of kg/m3.
 
const double waterTriplePointDensityVapour = 0.00485458
 The triple point vapour-density of water in units of kg/m3.
 

Detailed Description

The namespace containing all components of the Reaktoro library.

Typedef Documentation

◆ Index

typedef std::size_t Index

Define a type that represents an index.

The type used to represent indices and unsigned integers in the library.

◆ Indices

typedef std::vector< Index > Indices

Define a type that represents a collection of indices.

The type that represents a collection of indices.

◆ ActivityModelGenerator

The type for functions that construct an ActivityModel for a phase.

Parameters
speciesThe species in the phase.

◆ PropFn

using PropFn = Fn<real(const ChemicalProps& props)>

The function type for evaluation of a property of a chemical system.

Parameters
propsThe already evaluated chemical properties of the system.
Returns
The property of interest retrieved from the given chemical properties of the system.

◆ ReactionRateModelGenerator

The function signature for functions that generates a ReactionRateModel for a reaction.

Parameters
argsThe data provided to construct a ReactionRateModel object.

◆ ReactionGenerator

The function type for the generation of reactions with given species in the chemical system.

Parameters
argsThe data provided to a ReactionGenerator to construct a Reaction object.

◆ StandardThermoModel

The function type for calculation of standard thermodynamic properties of a species.

Parameters
TThe temperature for the calculation (in K)
PThe pressure for the calculation (in Pa)
Returns
The standard thermodynamic properties of the species

◆ StandardVolumeModel

The function type for calculation of standard volume of a product species in a formation reaction.

Parameters
TThe temperature for the calculation (in K)
PThe pressure for the calculation (in Pa)
Returns
The standard molar volume of the product species

◆ SurfaceGenerator

using SurfaceGenerator = Fn<Vec<Surface>(PhaseList const& phases)>

The function type for the generation of surfaces with given phases in the chemical system.

Parameters
phasesThe phases composing the chemical system.

◆ CubicBipModelGenerator

The type for functions that construct a CubicEOS::BipModel for a fluid phase once its species are known.

Parameters
specieslistThe species in the fluid phase.

◆ MineralReactionRateModel

The type of functions that calculate rates for mineral dissolution/precipitation reactions.

The sign convention for a mineral reaction rate is negative if dissolving, positive if precipitating.

Parameters
argsThe data provided to evaluate the mineral reaction rate.

◆ MineralReactionRateModelGenerator

The type of functions that construct a MineralReactionRateModel for a mineral reaction.

Parameters
argsThe data provided to construct a MineralReactionRateModel object.
See also
MineralReaction

Enumeration Type Documentation

◆ AggregateState

enum AggregateState
strong

The aggregate states of substances according to IUPAC.

Cox, J. D. (1982). Notation for states and processes, significance of the word standard in chemical thermodynamics, and remarks on commonly tabulated forms of thermodynamic functions, Pure and Applied Chemistry, 54(6), 1239-1250. doi: https://doi.org/10.1351/pac198254061239

Enumerator
Gas 

for a gas or a vapour (symbol g)

Liquid 

for a liquid (symbol l)

Solid 

for a solid (symbol s)

Plasma 

for a plasma (symbol pl)

CondensedPhase 

for either the solid or the liquid state (symbol cd)

Fluid 

for either the gaseous or the liquid state) (symbol fl)

LiquidCrystal 

for a liquid crystal (crystalline liquid) (symbol lc)

CrystallineSolid 

for a crystalline solid (symbol cr)

AmorphousSolid 

for an amorphous solid (symbol am)

Vitreous 

for a vitreous substance (a glass) (symbol vit)

Adsorbed 

for a species adsorbed on a substrate (an adsorbate) (symbol ads)

Monomeric 

for a monomeric form (symbol mon)

Polymeric 

for a polymeric form (symbol pol)

SolidSolution 

for a solid solution (symbol ss)

IonExchange 

for an ion exchange species (symbol ex)

Aqueous 

for a species in a solution in which water is the solvent (symbol aq)

Undefined 

when aggregate state is not explicitly provided (default)

◆ StateOfMatter

enum StateOfMatter
strong

The list of states of matter for phases.

Enumerator
Unspecified 

when the state of matter of a phase is unspecified

Solid 

when the state of matter of a phase is solid

Liquid 

when the state of matter of a phase is liquid

Gas 

when the state of matter of a phase is gas

Supercritical 

when the state of matter of a phase is supercritical

Plasma 

when the state of matter of a phase is plama

Fluid 

when the state of matter of a phase can be either liquid, gas, or plasma // TODO: StateOfMatter::Fluid needs to go once StateOfMatter is a result of a activity model evaluation, and not a constant phase attribute.

Condensed 

when the state of matter of a phase can be either liquid or solid // TODO: StateOfMatter::Condensed needs to go once StateOfMatter is a result of a activity model evaluation, and not a constant phase attribute.

◆ GibbsHessian

enum GibbsHessian
strong

The options for the description of the Hessian of the Gibbs energy function.

Enumerator
Exact 

The Hessian of the Gibbs energy function is fully exact.

PartiallyExact 

The Hessian of the Gibbs energy function is partially exact, partially approximated.

Approx 

The Hessian of the Gibbs energy function is approximated using ideal thermodynamic models.

ApproxDiagonal 

The Hessian of the Gibbs energy function is a diagonal matrix approximation using ideal thermodynamic models.

Function Documentation

◆ hashCombine()

auto Reaktoro::hashCombine ( std::size_t  seed,
T const &  v,
Rest...  rest 
) -> std::size_t

Return the hash combine of the hash number of given values.

https://stackoverflow.com/a/38140932/418875

◆ hashVector()

auto Reaktoro::hashVector ( Vec const &  vec) -> std::size_t

◆ zeros() [1/2]

auto zeros ( Index  rows) -> decltype(VectorXd::Zero(rows))
inline

Return an expression of a zero vector.

Parameters
rowsThe number of rows
Returns
The expression of a zero vector

◆ ones() [1/2]

auto ones ( Index  rows) -> decltype(VectorXd::Ones(rows))
inline

Return an expression of a vector with entries equal to one.

Parameters
rowsThe number of rows
Returns
The expression of a vector with entries equal to one

◆ random() [1/2]

auto random ( Index  rows) -> decltype(VectorXd::Random(rows))
inline

Return an expression of a vector with random entries.

Parameters
rowsThe number of rows
Returns
The expression of a vector with random entries equal to one

◆ linspace()

auto linspace ( double  start,
double  stop,
Index  rows 
) -> decltype(VectorXd::LinSpaced(rows, start, stop))
inline

Return a linearly spaced vector.

Parameters
startThe start of the sequence
stopThe stop of the sequence
rowsThe number of rows
Returns
The expression of a vector with linearly spaced entries

◆ unit()

auto unit ( Index  rows,
Index  i 
) -> decltype(VectorXd::Unit(rows, i))
inline

Return an expression of a unit vector.

Parameters
rowsThe number of rows
iThe index at which the component is one
Returns
The expression of a unit vector

◆ zeros() [2/2]

auto zeros ( Index  rows,
Index  cols 
) -> decltype(MatrixXd::Zero(rows, cols))
inline

Return an expression of a zero matrix.

Parameters
rowsThe number of rows
colsThe number of columns
Returns
The expression of a zero matrix

◆ ones() [2/2]

auto ones ( Index  rows,
Index  cols 
) -> decltype(MatrixXd::Ones(rows, cols))
inline

Return an expression of a matrix with entries equal to one.

Parameters
rowsThe number of rows
colsThe number of columns
Returns
The expression of a matrix with entries equal to one

◆ random() [2/2]

auto random ( Index  rows,
Index  cols 
) -> decltype(MatrixXd::Random(rows, cols))
inline

Return an expression of a matrix with random entries.

Parameters
rowsThe number of rows
colsThe number of columns
Returns
The expression of a matrix with random entries

◆ identity()

auto identity ( Index  rows,
Index  cols 
) -> decltype(MatrixXd::Identity(rows, cols))
inline

Return an expression of an identity matrix.

Parameters
rowsThe number of rows
colsThe number of columns
Returns
The expression of an identity matrix

◆ rows() [1/4]

auto rows ( Eigen::MatrixBase< Derived > &  mat,
Index  start,
Index  num 
) -> decltype(mat.middleRows(start, num))

Return a view of a sequence of rows of a matrix.

Parameters
matThe matrix from which a row view is created
startThe row index of the start of the sequence
numThe number of rows in the sequence

◆ rows() [2/4]

auto rows ( const Eigen::MatrixBase< Derived > &  mat,
Index  start,
Index  num 
) -> decltype(mat.middleRows(start, num))

Return a view of a sequence of rows of a matrix.

Parameters
matThe matrix from which a row view is created
startThe row index of the start of the sequence
numThe number of rows in the sequence

◆ rows() [3/4]

auto rows ( Eigen::MatrixBase< Derived > &  mat,
const Indices irows 
) -> decltype(mat(irows, Eigen::all))

Return a view of some rows of a matrix.

Parameters
matThe matrix for which the view is created
irowsThe indices of the rows of the matrix

◆ rows() [4/4]

auto rows ( const Eigen::MatrixBase< Derived > &  mat,
const Indices irows 
) -> decltype(mat(irows, Eigen::all))

Return a const view of some rows of a matrix.

Parameters
matThe matrix for which the view is created
irowsThe indices of the rows of the matrix

◆ cols() [1/4]

auto cols ( Eigen::MatrixBase< Derived > &  mat,
Index  start,
Index  num 
) -> decltype(mat.middleCols(start, num))

Return a view of a sequence of columns of a matrix.

Parameters
matThe matrix from which a column view is created
startThe column index of the start of the sequence
numThe number of columns in the sequence

◆ cols() [2/4]

auto cols ( const Eigen::MatrixBase< Derived > &  mat,
Index  start,
Index  num 
) -> decltype(mat.middleCols(start, num))

Return a view of a sequence of columns of a matrix.

Parameters
matThe matrix from which a column view is created
startThe column index of the start of the sequence
numThe number of columns in the sequence

◆ cols() [3/4]

auto cols ( Eigen::MatrixBase< Derived > &  mat,
const Indices icols 
) -> decltype(mat(Eigen::all, icols))

Return a view of some columns of a matrix.

Parameters
matThe matrix for which the view is created
icolsThe indices of the columns of the matrix

◆ cols() [4/4]

auto cols ( const Eigen::MatrixBase< Derived > &  mat,
const Indices icols 
) -> decltype(mat(Eigen::all, icols))

Return a const view of some columns of a matrix.

Parameters
matThe matrix for which the view is created
icolsThe indices of the columns of the matrix

◆ segment() [1/2]

auto segment ( Eigen::MatrixBase< Derived > &  vec,
Index  irow,
Index  nrows 
) -> decltype(vec.segment(irow, nrows))

Return a view of some rows and columns of a matrix.

Parameters
vecThe vector for which the view is created
irowThe index of the starting row
nrowsThe number of rows in the view

◆ segment() [2/2]

auto segment ( const Eigen::MatrixBase< Derived > &  vec,
Index  irow,
Index  nrows 
) -> decltype(vec.segment(irow, nrows))

Return a view of some rows and columns of a matrix.

Parameters
vecThe vector for which the view is created
irowThe index of the starting row
nrowsThe number of rows in the view

◆ block() [1/2]

auto block ( Eigen::MatrixBase< Derived > &  mat,
Index  irow,
Index  icol,
Index  nrows,
Index  ncols 
) -> decltype(mat.block(irow, icol, nrows, ncols))

Return a view of some rows and columns of a matrix.

Parameters
matThe matrix for which the view is created
irowThe index of the starting row
icolThe index of the starting column
nrowsThe number of rows in the block view
ncolsThe number of columns in the block view

◆ block() [2/2]

auto block ( const Eigen::MatrixBase< Derived > &  mat,
Index  irow,
Index  icol,
Index  nrows,
Index  ncols 
) -> decltype(mat.block(irow, icol, nrows, ncols))

Return a view of some rows and columns of a matrix.

Parameters
matThe matrix for which the view is created
irowThe index of the starting row
icolThe index of the starting column
nrowsThe number of rows in the block view
ncolsThe number of columns in the block view

◆ submatrix() [1/2]

auto submatrix ( Eigen::MatrixBase< Derived > &  mat,
const Indices irows,
const Indices icols 
) -> decltype(mat(irows, icols))

Return a view of some rows and columns of a matrix.

Parameters
matThe matrix for which the view is created
irowsThe indices of the rows of the matrix
icolsThe indices of the columns of the matrix

◆ submatrix() [2/2]

auto submatrix ( const Eigen::MatrixBase< Derived > &  mat,
const Indices irows,
const Indices icols 
) -> decltype(mat(irows, icols))

Return a const view of some rows and columns of a matrix.

Parameters
matThe matrix for which the view is created
irowsThe indices of the rows of the matrix
icolsThe indices of the columns of the matrix

◆ memoizeLastUsingRef() [1/3]

auto Reaktoro::memoizeLastUsingRef ( Fun  f)

Return a memoized version of given function f that caches only the arguments used in the last call.

/// Return a memoized version of given function f that caches only the arguments used in the last call. This overload is used when f is a lambda function or free function. Use memoizeLastUsingRef<Ret>(f) to explicitly specify the Ret type.

◆ memoizeLastUsingRef() [2/3]

auto Reaktoro::memoizeLastUsingRef ( Fn< void(Ret &, Args...)>  f) -> Fn<void(Ret&, Args...)>

Return a memoized version of given function f that caches only the arguments used in the last call.

This overload assumes that RetRef = Ret&.

◆ memoizeLastUsingRef() [3/3]

auto Reaktoro::memoizeLastUsingRef ( Fun  f)

Return a memoized version of given function f that caches only the arguments used in the last call.

This overload is used when f is a lambda function or free function. Use memoizeLastUsingRef(f) to implicitly specify that RetRef is Ret&.

◆ molalities() [1/2]

auto Reaktoro::molalities ( ArrayConstRef &&  n,
Index  iH2O,
ArrayRef &&  m 
)

Compute the molalities of the species with given species amounts.

Parameters
nThe vector with the species amounts.
iH2OThe index of the water solvent species.
[out]mThe vector of species molalities.

◆ molalities() [2/2]

auto Reaktoro::molalities ( ArrayConstRef &&  n,
Index  iH2O 
)

Compute the molalities of the species with given species amounts.

Parameters
nThe vector with the species amounts.
iH2OThe index of the water solvent species.

◆ molalitiesJacobian() [1/2]

auto Reaktoro::molalitiesJacobian ( ArrayConstRef &&  n,
Index  iH2O,
MatrixRef &&  J 
)

Compute the Jacobian matrix of the species molalities ( \(J=\frac{\partial m}{\partial n}\)).

Parameters
nThe vector with the species amounts.
iH2OThe index of the water solvent species.
[out]JThe output Jacobian matrix.

◆ molalitiesJacobian() [2/2]

auto Reaktoro::molalitiesJacobian ( ArrayConstRef &&  n,
Index  iH2O 
)

Compute the Jacobian matrix of the species molalities ( \(J=\frac{\partial m}{\partial n}\)).

Parameters
nThe vector with the species amounts.
iH2OThe index of the water solvent species.

◆ lnMolalitiesJacobian() [1/2]

auto Reaktoro::lnMolalitiesJacobian ( ArrayConstRef &&  n,
Index  iH2O,
MatrixRef &&  J 
) -> void

Compute the Jacobian matrix of the species molalities in natural log ( \(J=\frac{\partial\ln m}{\partial n}\)).

Parameters
nThe vector with the species amounts.
iH2OThe index of the water solvent species.
[out]JThe output Jacobian matrix.

◆ lnMolalitiesJacobian() [2/2]

auto Reaktoro::lnMolalitiesJacobian ( ArrayConstRef &&  n,
Index  iH2O 
)

Compute the Jacobian matrix of the species molalities in natural log ( \(J=\frac{\partial\ln m}{\partial n}\)).

Parameters
nThe vector with the species amounts.
iH2OThe index of the water solvent species.

◆ lnMolalitiesJacobianDiagonal() [1/2]

auto Reaktoro::lnMolalitiesJacobianDiagonal ( ArrayConstRef &&  n,
Index  iH2O,
VectorRef &&  D 
) -> void

Compute the diagonal only of the Jacobian matrix of the species molalities in natural log ( \(J=\frac{\partial\ln m}{\partial n}\)).

Parameters
nThe vector with the species amounts.
iH2OThe index of the water solvent species.
[out]DThe output diagonal of the Jacobian matrix.

◆ lnMolalitiesJacobianDiagonal() [2/2]

auto Reaktoro::lnMolalitiesJacobianDiagonal ( ArrayConstRef &&  n,
Index  iH2O 
)

Compute the diagonal only of the Jacobian matrix of the species molalities in natural log ( \(J=\frac{\partial\ln m}{\partial n}\)).

Parameters
nThe vector with the species amounts.
iH2OThe index of the water solvent species.

◆ moleFractions() [1/2]

auto Reaktoro::moleFractions ( ArrayConstRef &&  n,
ArrayRef &&  x 
)

Compute the mole fractions of the species with given species amounts.

Parameters
nThe vector with the species amounts.
[out]xThe vector of species mole fractions.

◆ moleFractions() [2/2]

auto Reaktoro::moleFractions ( ArrayConstRef &&  n)

Compute the mole fractions of the species with given species amounts.

Parameters
nThe vector with the species amounts.

◆ moleFractionsJacobian() [1/2]

auto Reaktoro::moleFractionsJacobian ( ArrayConstRef &&  n,
MatrixRef &&  J 
)

Compute the Jacobian matrix of the species mole fractions ( \(J=\frac{\partial x}{\partial n}\)).

Parameters
nThe vector with the species amounts.
[out]JThe output Jacobian matrix.

◆ moleFractionsJacobian() [2/2]

auto Reaktoro::moleFractionsJacobian ( ArrayConstRef &&  n)

Compute the Jacobian matrix of the species mole fractions ( \(J=\frac{\partial x}{\partial n}\)).

Parameters
nThe vector with the species amounts.

◆ lnMoleFractionsJacobian() [1/2]

auto Reaktoro::lnMoleFractionsJacobian ( ArrayConstRef &&  n,
MatrixRef &&  J 
) -> void

Compute the Jacobian matrix of the species mole fractions in natural log ( \(J=\frac{\partial\ln x}{\partial n}\)).

Parameters
nThe vector with the species amounts.
[out]JThe output Jacobian matrix.

◆ lnMoleFractionsJacobian() [2/2]

auto Reaktoro::lnMoleFractionsJacobian ( ArrayConstRef &&  n)

Compute the Jacobian matrix of the species mole fractions in natural log ( \(J=\frac{\partial\ln x}{\partial n}\)).

Parameters
nThe vector with the species amounts.

◆ lnMoleFractionsJacobianDiagonal() [1/2]

auto Reaktoro::lnMoleFractionsJacobianDiagonal ( ArrayConstRef &&  n,
MatrixRef &&  D 
) -> void

Compute the diagonal only of the Jacobian matrix of the species mole fractions in natural log ( \(J=\frac{\partial\ln x}{\partial n}\)).

Parameters
nThe vector with the species amounts.
[out]DThe output diagonal of the Jacobian matrix.

◆ lnMoleFractionsJacobianDiagonal() [2/2]

auto Reaktoro::lnMoleFractionsJacobianDiagonal ( ArrayConstRef &&  n)

Compute the diagonal only of the Jacobian matrix of the species mole fractions in natural log ( \(J=\frac{\partial\ln x}{\partial n}\)).

Parameters
nThe vector with the species amounts.

◆ alternativeWaterNames()

auto Reaktoro::alternativeWaterNames ( ) -> std::vector< std::string >

Return a collection of alternative names to the given species name.

Parameters
nameThe name of the species.

◆ alternativeChargedSpeciesNames()

auto Reaktoro::alternativeChargedSpeciesNames ( std::string  name) -> std::vector< std::string > &

Return a collection of alternative names to the given charged species name.

The argument name must follow the naming convention H+, Ca++, Cl-, HCO3-, CO3--, and so forth. That is it, the charge is given as a suffix with as much - or + as the number of charges.

Parameters
nameThe name of the charged species.

◆ alternativeNeutralSpeciesNames()

auto Reaktoro::alternativeNeutralSpeciesNames ( std::string  name) -> std::vector< std::string > &

Return a collection of alternative names to the given neutral species name.

The argument name must follow the naming convention CO2(aq), CaCO3(aq), NaCl(aq), and so forth. That is, the neutral species name has the suffix (aq).

Parameters
nameThe name of the neutral species.

◆ conventionalChargedSpeciesName()

auto Reaktoro::conventionalChargedSpeciesName ( std::string  name) -> std::string

Return the conventional charged species name adopted in Reaktoro.

This method will return the conventional charged species name adopted in Reaktoro. For example, Ca+2 results in Ca++, CO3-2 results in CO3--, Mg[+2] results in Mg++, and so forth.

Parameters
nameThe name of a charged species.

◆ conventionalNeutralSpeciesName()

auto Reaktoro::conventionalNeutralSpeciesName ( std::string  name) -> std::string

Return the conventional neutral species name adopted in Reaktoro.

This method will return the conventional neutral species name adopted in Reaktoro. For example, CO2 results in CO2(aq), CaCO3@ results in CaCO3(aq), NaCl,aq results in NaCl(aq), and so forth.

Parameters
nameThe name of a charged species.

◆ isAlternativeWaterName()

auto Reaktoro::isAlternativeWaterName ( std::string  trial) -> bool

Return true if a trial name is an alternative to a water species name.

Parameters
trialThe trial name that is being checked as an alternative to H2O(l)

◆ isAlternativeChargedSpeciesName()

auto Reaktoro::isAlternativeChargedSpeciesName ( std::string  trial,
std::string  name 
) -> bool

Return true if a trial name is an alternative to a given charged species name.

Parameters
trialThe trial name that is being checked as an alternative to name
nameThe name of the charged species with convention H+, Ca++, CO3--, etc.

◆ isAlternativeNeutralSpeciesName()

auto Reaktoro::isAlternativeNeutralSpeciesName ( std::string  trial,
std::string  name 
) -> bool

Return true if a trial name is an alternative to a given neutral species name.

Parameters
trialThe trial name that is being checked as an alternative to name
nameThe name of the neutral species with convention CO2(aq), CaCO3(aq).

◆ splitChargedSpeciesName()

auto Reaktoro::splitChargedSpeciesName ( std::string  name) -> std::pair< std::string, double >

Return a pair with the base name of a charged species and its electrical charge.

The name of the charge species has to have the following naming conventions: Ca++, Ca+2, and Ca[2+], or Na+, Na[+], or CO3–, CO3-2, and CO3[2-].

Parameters
nameThe name of the charged species.

◆ baseNameChargedSpecies()

auto Reaktoro::baseNameChargedSpecies ( std::string  name) -> std::string

Return the name of a charged species without charge suffix.

The name of the charge species has to have the following naming conventions: Ca++, Ca+2, and Ca[2+], or Na+, Na[+], or CO3–, CO3-2, and CO3[2-].

Parameters
nameThe name of the charged species.

◆ baseNameNeutralSpecies()

auto Reaktoro::baseNameNeutralSpecies ( std::string  name) -> std::string

Return the name of a neutral species without suffix (aq).

Parameters
nameThe name of the charged species.

◆ chargeInSpeciesName()

auto Reaktoro::chargeInSpeciesName ( std::string  name) -> double

Return the electrical charge in a species name.

The charge in the species name must be represended as H+, Ca++, HCO3-, CO3--, SO4--, and so forth.

Parameters
nameThe name of the species

◆ splitSpeciesNameSuffix()

auto Reaktoro::splitSpeciesNameSuffix ( std::string  name) -> std::pair< std::string, std::string >

Split name and suffix from a substance name or chemical formula.

The suffix must start with (, end with ) and cannot contain upper case characters.

Example:

using namespace Reaktoro;
const auto [name, suffix] = splitSpeciesNameSuffix("H2O(aq)"); // name: "H2O", suffix: "aq"
const auto [name, suffix] = splitSpeciesNameSuffix("CaCO3(s, calcite)"); // name: "CaCO3", suffix: "s, calcite"
const auto [name, suffix] = splitSpeciesNameSuffix("MgCO3"); // name: "MgCO3", suffix: ""
const auto [name, suffix] = splitSpeciesNameSuffix("Methane(aq)"); // name: "Methane", suffix: "aq"
const auto [name, suffix] = splitSpeciesNameSuffix("Ca++"); // name: "Ca++", suffix: ""
const auto [name, suffix] = splitSpeciesNameSuffix("Fe[3+](aq)"); // name: "Fe[3+]", suffix: "aq"
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
auto splitSpeciesNameSuffix(std::string name) -> std::pair< std::string, std::string >
Split name and suffix from a substance name or chemical formula.

◆ parseNumberStringPairs()

auto Reaktoro::parseNumberStringPairs ( const String str) -> Pairs< String, double >

Parse a formatted string containing pairs of numbers and strings.

See below several examples of parsing different formatted strings:

using namespace Reaktoro;
auto pairs0 = parseNumberStringPairs("2:H 1:O");
auto pairs1 = parseNumberStringPairs("1:Ca 2:Cl");
auto pairs2 = parseNumberStringPairs("1:Mg 1:C 3:O");
auto pairs3 = parseNumberStringPairs("1:Ca 1:Mg 2:C 6:O");
auto pairs4 = parseNumberStringPairs("3:Fe 2:Al 3:Si 12:O");
auto pairs5 = parseNumberStringPairs("1:Na+ 1:Cl-");
auto pairs6 = parseNumberStringPairs("1:Ca++ 1:CO3--");
auto parseNumberStringPairs(const String &str) -> Pairs< String, double >
Parse a formatted string containing pairs of numbers and strings.

◆ parseChemicalFormula()

auto Reaktoro::parseChemicalFormula ( const String formula) -> Pairs< String, double >

Return the element symbols and their coefficients in a chemical formula.

Successfully parsing a chemical formula requires that the first letter in the formula is uppercase and all others in lowercase. Thus, even chemical formulas such as AaBbb or (Aa2Bbb4)Cc6 are supported. There are two ways for specifying electric charge in a chemical formula:

  1. as a suffix containing as many symbols + and - as there are charges (e.g., Fe+++, Ca++, CO3--); or
  2. as a suffix containing the symbol + or - followed by the number of charges (e.g., Fe+3, Ca+2, Na+) Note that number 1 is optional for the second format (e.g., Na+ and Na+1 are equivalent). In both formats, (1) and (2), the symbol + is used for positively charged substances, and - for negatively charged ones. See below several examples of parsing different chemical formulas:
    using namespace Reaktoro;
    auto formula01 = parseChemicalFormula("H2O");
    auto formula02 = parseChemicalFormula("CaCl2");
    auto formula03 = parseChemicalFormula("MgCO3");
    auto formula04 = parseChemicalFormula("(CaMg)(CO3)2");
    auto formula05 = parseChemicalFormula("Fe3Al2Si3O12");
    auto formula06 = parseChemicalFormula("Na+");
    auto formula07 = parseChemicalFormula("Ca++");
    auto formula08 = parseChemicalFormula("Fe+++");
    auto formula09 = parseChemicalFormula("Fe+3");
    auto formula10 = parseChemicalFormula("CO3--");
    auto formula11 = parseChemicalFormula("CO3-2");
    auto formula12 = parseChemicalFormula("CaCl2*6H2O");
    auto formula13 = parseChemicalFormula("SrCl2*2H2O");
    auto formula14 = parseChemicalFormula("(NH4)2SO4*3NH4NO3");
    auto formula15 = parseChemicalFormula("Na2SO4*(NH4)2SO4*4H2O");
    auto formula16 = parseChemicalFormula("CaCl2:6H2O");
    auto formula17 = parseChemicalFormula("SrCl2:2H2O");
    auto formula18 = parseChemicalFormula("(NH4)2SO4:3NH4NO3");
    auto formula19 = parseChemicalFormula("Na2SO4:(NH4)2SO4*4H2O");
    auto formula20 = parseChemicalFormula("Na2SO4:(NH4)2SO4:4H2O");
    auto parseChemicalFormula(const String &formula) -> Pairs< String, double >
    Return the element symbols and their coefficients in a chemical formula.

◆ parseElectricCharge()

auto Reaktoro::parseElectricCharge ( const String formula) -> double

Return the electric charge in a chemical formula.

using namespace Reaktoro;
auto charge01 = parseElectricCharge("H2O"); \\ charge01 === 0
auto charge02 = parseElectricCharge("CaCl2"); \\ charge02 === 0
auto charge03 = parseElectricCharge("MgCO3"); \\ charge03 === 0
auto charge04 = parseElectricCharge("(CaMg)(CO3)2"); \\ charge04 === 0
auto charge05 = parseElectricCharge("Fe3Al2Si3O12"); \\ charge05 === 0
auto charge06 = parseElectricCharge("Na+"); \\ charge06 === 1
auto charge07 = parseElectricCharge("Ca++"); \\ charge07 === 2
auto charge08 = parseElectricCharge("Fe+++"); \\ charge08 === 3
auto charge09 = parseElectricCharge("Fe+3"); \\ charge09 === 3
auto charge10 = parseElectricCharge("CO3--"); \\ charge10 === -2
auto charge11 = parseElectricCharge("CO3-2"); \\ charge11 === -2
auto parseElectricCharge(const String &formula) -> double
Return the electric charge in a chemical formula.
See also
parseChemicalFormula

◆ parseReactionEquation()

auto Reaktoro::parseReactionEquation ( const String equation) -> Pairs< String, double >

Parse a formatted string representing a reaction equation.

Below are examples of formatted strings representing reaction equations.

auto pairs1 = parseReactionEquation("Calcite + H+ = Ca++ + HCO3-");
auto pairs2 = parseReactionEquation("CO2(g) + H2O(l) = H+ + HCO3-");
auto pairs3 = parseReactionEquation("Dolomite + 2*H+ = Ca++ + Mg++ + 2*HCO3-");
auto parseReactionEquation(const String &equation) -> Pairs< String, double >
Parse a formatted string representing a reaction equation.

Note that unity stoichiometric coefficients can be ommited from the equation. The operator * must be used when this is not the case.

Returns
The species names and their stoichiometric coefficients

◆ strfix()

auto Reaktoro::strfix ( double  num,
int  precision = -1 
) -> std::string

Return a string representation for a number in fixed format.

Parameters
numThe number to be converted to a string
precisionThe precision in the conversion (negative value results in global precision using method precision)

◆ strsci()

auto Reaktoro::strsci ( double  num,
int  precision = -1 
) -> std::string

Return a string representation for a number in scientific format.

Parameters
numThe number to be converted to a string
precisionThe precision in the conversion (negative value results in global precision using method precision)

◆ time()

auto Reaktoro::time ( ) -> Time

Return the time point now.

See also
elapsed

◆ elapsed() [1/2]

auto Reaktoro::elapsed ( Time const &  end,
Time const &  begin 
) -> double

Return the elapsed time between two time points (in units of s)

Parameters
endThe end time point
endThe begin time point
Returns
The elapsed time between end and begin in seconds

◆ elapsed() [2/2]

auto Reaktoro::elapsed ( Time const &  begin) -> double

Return the elapsed time between a time point and now (in units of s)

Parameters
endThe begin time point
Returns
The elapsed time between now and begin in seconds

◆ asFunction()

constexpr auto Reaktoro::asFunction ( const Fun &  f)
constexpr

Convert lambda/function pointers/member functions to std::function.

This exists in Reaktoro because AppleClang 9.0/10.0/11.0 do not perform template type deduction for std::function. Instead of just writing std::function(f), we need to use instead asFunction(f).

◆ parseAggregateState()

auto Reaktoro::parseAggregateState ( const std::string &  symbol) -> AggregateState

Return the AggregateState value from given aggregate state symbol.

The following table maps a symbol to an aggregate state value.

Symbol AggregateState
g AggregateState::Gas
l AggregateState::Liquid
s AggregateState::Solid
pl AggregateState::Plasma
cd AggregateState::CondensedPhase
fl AggregateState::Fluid
lc AggregateState::LiquidCrystal
cr AggregateState::CrystallineSolid
am AggregateState::AmorphousSolid
vit AggregateState::Vitreous
ads AggregateState::Adsorbed
mon AggregateState::Monomeric
pol AggregateState::Polymeric
ss AggregateState::SolidSolution
ex AggregateState::IonExchange
aq AggregateState::Aqueous
Note
symbol can also be a string containing the aggregate state name. For example, symbol can be "Gas", "Aqueous", "Solid", etc.

AggregateState::Undefined is returned if symbol is none of above.

◆ identifyAggregateState()

auto Reaktoro::identifyAggregateState ( const std::string &  name) -> AggregateState

Identify the aggregate state in the name of a substance or chemical species.

This methods searches for aggregate state symbols in the suffix of a substance or chemical species name. The suffix must start with (, end with ) and cannot contain upper case characters. The words within the suffix must be separated by comma and/or space. Example:

using namespace Reaktoro;
const auto res = identifyAggregateState("H2O(aq)"); // res is AggregateState::Aqueous
const auto res = identifyAggregateState("CO2(g)"); // res is AggregateState::Gas
const auto res = identifyAggregateState("CaCO3(s, calcite)"); // res is AggregateState::Solid
const auto res = identifyAggregateState("MgCO3(magnesite, s)"); // res is AggregateState::Solid
const auto res = identifyAggregateState("Fe+++"); // res is AggregateState::Aqueous
const auto res = identifyAggregateState("Na+(pl)"); // res is AggregateState::Plasma
auto identifyAggregateState(const std::string &name) -> AggregateState
Identify the aggregate state in the name of a substance or chemical species.
Note
By default, charged species without explicit aggregate state identification is considered aqueous. Thus species names such as HCO3-, Ca++, H+ will produce AggregateState::Aqueous.
See also
AggregateState, parseAggregateState

◆ equilibrate()

auto Reaktoro::equilibrate ( ChemicalState state) -> EquilibriumResult

Perform a chemical equilibrium calculation on a given chemical state.

The calculation is performed with fixed temperature and pressure obtained from the chemical state, and the chemical system is closed, so chemical elements and electric charge are conserved.

◆ derivativeForward() [1/2]

auto Reaktoro::derivativeForward ( const ScalarFunction f,
VectorXdConstRef  x 
) -> VectorXd

Calculate the partial derivatives of a scalar function using a 1st-order forward finite difference scheme.

Parameters
fThe scalar function as an instance of ScalarFunction
xThe point where the derivative is calculated
Returns
The partial derivatives of the scalar function

◆ derivativeBackward() [1/2]

auto Reaktoro::derivativeBackward ( const ScalarFunction f,
VectorXdConstRef  x 
) -> VectorXd

Calculate the partial derivatives of a scalar function using a 1st-order backward finite difference scheme.

Parameters
fThe scalar function as an instance of ScalarFunction
xThe point where the derivative is calculated
Returns
The partial derivatives of the scalar function

◆ derivativeCentral() [1/2]

auto Reaktoro::derivativeCentral ( const ScalarFunction f,
VectorXdConstRef  x 
) -> VectorXd

Calculate the partial derivatives of a scalar function using a 2nd-order central finite difference scheme.

Parameters
fThe scalar function as an instance of ScalarFunction
xThe point where the derivative is calculated
Returns
The partial derivatives of the scalar function

◆ derivativeForward() [2/2]

auto Reaktoro::derivativeForward ( const VectorFunction f,
VectorXdConstRef  x 
) -> MatrixXd

Calculate the partial derivatives of a vector function using a 1st-order forward finite difference scheme.

Parameters
fThe scalar function as an instance of ScalarFunction
xThe point where the derivative is calculated
Returns
The partial derivatives of the scalar function

◆ derivativeBackward() [2/2]

auto Reaktoro::derivativeBackward ( const VectorFunction f,
VectorXdConstRef  x 
) -> MatrixXd

Calculate the partial derivatives of a vector function using a 1st-order backward finite difference scheme.

Parameters
fThe scalar function as an instance of ScalarFunction
xThe point where the derivative is calculated
Returns
The partial derivatives of the scalar function

◆ derivativeCentral() [2/2]

auto Reaktoro::derivativeCentral ( const VectorFunction f,
VectorXdConstRef  x 
) -> MatrixXd

Calculate the partial derivatives of a vector function using a 2nd-order central finite difference scheme.

Parameters
fThe scalar function as an instance of ScalarFunction
xThe point where the derivative is calculated
Returns
The partial derivatives of the scalar function

◆ linearlyIndependentCols() [1/2]

auto Reaktoro::linearlyIndependentCols ( MatrixXdConstRef  A) -> Indices

Determine the set of linearly independent columns in a matrix using a column pivoting QR algorithm.

Parameters
AThe matrix whose linearly independent columns must be found
Returns
The indices of the linearly independent columns

◆ linearlyIndependentRows() [1/2]

auto Reaktoro::linearlyIndependentRows ( MatrixXdConstRef  A) -> Indices

Determine the set of linearly independent rows in a matrix.

Parameters
AThe matrix whose linearly independent rows must be found
Returns
The indices of the linearly independent rows

◆ linearlyIndependentCols() [2/2]

auto Reaktoro::linearlyIndependentCols ( MatrixXdConstRef  A,
MatrixXdRef  B 
) -> Indices

Determine the set of linearly independent columns in a matrix.

Parameters
[in]AThe matrix whose linearly independent columns must be found
[out]BThe matrix composed by linearly independent columns only
Returns
The indices of the linearly independent columns

◆ linearlyIndependentRows() [2/2]

auto Reaktoro::linearlyIndependentRows ( MatrixXdConstRef  A,
MatrixXdRef  B 
) -> Indices

Determine the set of linearly independent rows in a matrix.

Parameters
[in]AThe matrix whose linearly independent rows must be found
[out]BThe matrix composed by linearly independent rows only
Returns
The indices of the linearly independent rows

◆ inverseShermanMorrison()

auto Reaktoro::inverseShermanMorrison ( MatrixXdConstRef  invA,
VectorXdConstRef  D 
) -> MatrixXd

Calculate the inverse of A + D where inv(A) is already known and D is a diagonal matrix.

Parameters
invAThe inverse of the matrix A and the final inverse of A + D
DThe diagonal matrix D

◆ rationalize()

auto Reaktoro::rationalize ( double  x,
unsigned  maxden 
) -> std::tuple< long, long >

Calculates the rational number that approximates a given real number.

The algorithm is based on Farey sequence as shown here.

Parameters
xThe real number.
maxdenThe maximum denominator.
Returns
A tuple containing the numerator and denominator.

◆ cleanRationalNumbers() [1/2]

auto Reaktoro::cleanRationalNumbers ( double *  vals,
long  size,
long  maxden = 6 
) -> void

Clean an array that is known to have rational numbers from round-off errors.

Parameters
[in,out]valsThe values to be cleaned
sizeThe size of the data in vals
maxdenThe maximum known denominator in the array with rational numbers

◆ cleanRationalNumbers() [2/2]

auto Reaktoro::cleanRationalNumbers ( MatrixXdRef  A,
long  maxden = 6 
) -> void

Clean a matrix that is known to have rational numbers from round-off errors.

Parameters
[in,out]AThe matrix to be cleaned
maxdenThe maximum known denominator in the matrix with rational numbers

◆ cardano()

auto Reaktoro::cardano ( const T &  b,
const T &  c,
const T &  d 
) -> CubicRoots<T>

Calculate the roots of a cubic equation using Cardano's method.

The calculation uses the approach presented in:

Nickalls, R. W. D. (2012). A New Approach to Solving the Cubic: Cardan’s Solution Revealed. The Mathematical Gazette, 77(480), 354–359* to solve the cubic equation: \( x^{3}+bx^{2}+cx+d=0 \).

Parameters
bThe coefficient b of the cubic equation
cThe coefficient c of the cubic equation
dThe coefficient d of the cubic equation
Returns
The three roots \( (r_1, r_2, r_3) \) that solve the cubic equation. No ordering is performed on the roots!

◆ newton()

auto Reaktoro::newton ( const std::function< std::tuple< T, T >(const T &)> &  f,
const T &  x0,
const T &  epsilon,
std::size_t  maxiter 
) -> std::tuple<T, std::size_t, bool>

Calculate the root of a non-linear function using Newton's method.

Parameters
fThe function that returns a pair of \( f(x) \) and \( f^{\prime}(x) \).
x0The initial guess for the iterative root calculation.
epsilonThe tolerance used in \( |f(x)| < \epsilon \) to check convergence.
maxiterThe maximum number of iterations.
Returns
A tuple containing the root, the number of iterations, and a boolean flag indicating success if true.

◆ realRoots()

auto Reaktoro::realRoots ( const CubicRoots< T > &  roots) -> std::vector<T>

Return all real roots of a group of roots.

Parameters
rootsCubicRoots with of complex and real roots
Returns
A vector with all real roots

◆ ActivityModelDavies() [1/2]

auto ActivityModelDavies ( ) -> ActivityModelGenerator

Return the activity model for aqueous electrolyte phases based on the Davies model.

The activity model for aqueous electrolyte phases based on the Davies model.

See also
Davies activity model
Note
This method is equivalent to ActivityModelDaviesPHREEQC().

◆ ActivityModelDavies() [2/2]

auto Reaktoro::ActivityModelDavies ( ActivityModelDaviesParams  params) -> ActivityModelGenerator

Return the activity model for aqueous electrolyte phases based on the Davies model with given custom parameters.

See also
Davies activity model

◆ ActivityModelDebyeHuckel() [1/2]

auto ActivityModelDebyeHuckel ( ) -> ActivityModelGenerator

Return the activity model for aqueous electrolyte phases based on the Debye–Hückel model.

The activity model for aqueous electrolyte phases based on the Debye–Hückel model.

See also
Debye–Hückel activity model
Note
This method is equivalent to ActivityModelDebyeHuckelPHREEQC().

◆ ActivityModelDebyeHuckel() [2/2]

auto Reaktoro::ActivityModelDebyeHuckel ( ActivityModelDebyeHuckelParams  params) -> ActivityModelGenerator

Return the activity model for aqueous electrolyte phases based on the Debye–Hückel model with given custom parameters.

See also
Debye–Hückel activity model

◆ ActivityModelDebyeHuckelLimitingLaw()

auto ActivityModelDebyeHuckelLimitingLaw ( ) -> ActivityModelGenerator

Return the activity model for aqueous electrolyte phases based on the Debye–Hückel limiting law model.

The activity model for aqueous electrolyte phases based on the Debye–Hückel limiting law model.

See also
Debye–Hückel activity model

Use this method to indicate that the activity coefficients of the ionic species are calculated using the Debye–Hückel limiting law equation. In this model, the Debye–Hückel parameters and b of the ionic species are zero.

◆ ActivityModelDebyeHuckelKielland()

auto ActivityModelDebyeHuckelKielland ( ) -> ActivityModelGenerator

Return the activity model for aqueous electrolyte phases based on the Debye–Hückel model with Kielland (1937) parameters.

The activity model for aqueous electrolyte phases based on the Debye–Hückel model with Kielland (1937) parameters.

See also
Debye–Hückel activity model

In this model, the ion-size parameters are taken from Kielland (1937)[5]:

Ion (Ångström)
H+ 9
Li+ 6
Rb+, Cs+, NH4+, Tl+, Ag+ 2.5
K+, Cl-, Br-, I-, CN-, NO2-, NO3- 3
OH-, F-, NCS-, NCO-, HS-, ClO3-, ClO4-, BrO3-, IO4-, MnO4- 3.5
Na+, CdCl+, ClO2-, IO3-, HCO3-, H2PO4-, HSO3-, H2AsO4-, Co(NH3)4(NO2)2+ 4-4.5
Hg2+2, SO4-2, S2O3-2, S2O6-2, S2O8-2, SeO4-2, CrO4-2, HPO4-2 4
Pb+2, CO3-2, SO3-2, MoO4-2, Co(NH3)5Cl+2, Fe(CN)5NO-2 4.5
Sr+2, Ba+2, Ra+2, Cd+2, Hg+2, S-2, S2O4-2, WO4-2 5
Ca+2, Cu+2, Zn+2, Sn+2, Mn+2, Fe+2, Ni+2, Co+2 6
Mg+2, Be+2 8
PO4-3, Fe(CN)6-3, Cr(NH3)6+3, Co(NH3)6+3, Co(NH3)5H2O+3 4
Al+3, Fe+3, Cr+3, Sc+3, Y+3, La+3, In+3, Ce+3, Pr+3, Nd+3, Sm+3 9
Fe(CN)6-4 5
Co(S2O3)(CN)5-4 6
Th+4, Zn+4, Ce+4, Sn+4 11
Co(SO3)2(CN)4-5 9

◆ ActivityModelDebyeHuckelPHREEQC()

auto ActivityModelDebyeHuckelPHREEQC ( ) -> ActivityModelGenerator

Return the activity model for aqueous electrolyte phases based on the Debye–Hückel model using PHREEQC parameters.

The activity model for aqueous electrolyte phases based on the Debye–Hückel model using PHREEQC parameters.

See also
Debye–Hückel activity model

This method sets the ion-size parameters and the parameter b of the ionic species according to those used in PHREEQC v3. Their values were taken from the database file phreeqc.dat and are listed below:

Ion (Å) b Ion (Å) b
Al(OH)2+ 5.4 0 Al(OH)4- 4.5 0
Al(SO4)2- 4.5 0 Al+++ 9 0
AlF++ 5.4 0 AlF2+ 5.4 0
AlF4- 4.5 0 AlOH++ 5.4 0
AlSO4+ 4.5 0 Ba++ 4 0.153
BaOH+ 5 0 Br- 3 0
CO3-- 5.4 0 Ca++ 5 0.165
CaH2PO4+ 5.4 0 CaHCO3+ 6 0
CaPO4- 5.4 0 Cl- 3.63 0.017
Cu+ 2.5 0 Cu++ 6 0
CuCl+ 4 0 CuCl2- 4 0
CuCl3- 4 0 CuCl3-- 5 0
CuCl4-- 5 0 CuOH+ 4 0
F- 3.5 0 Fe(OH)2+ 5.4 0
Fe(OH)3- 5 0 Fe(OH)4- 5.4 0
Fe++ 6 0 Fe+++ 9 0
FeCl++ 5 0 FeCl2+ 5 0
FeF++ 5 0 FeF2+ 5 0
FeH2PO4+ 5.4 0 FeH2PO4++ 5.4 0
FeHPO4+ 5 0 FeOH+ 5 0
FeOH++ 5 0 FeSO4+ 5 0
H+ 9 0 H2PO4- 5.4 0
H2SiO4-- 5.4 0 H3SiO4- 4 0
HCO3- 5.4 0 HPO4-- 5 0
HS- 3.5 0 K+ 3.5 0.015
KHPO4- 5.4 0 KSO4- 5.4 0
Li+ 6 0 LiSO4- 5 0
Mg++ 5.5 0.2 MgF+ 4.5 0
MgH2PO4+ 5.4 0 MgHCO3+ 4 0
MgOH+ 6.5 0 MgPO4- 5.4 0
Mn(OH)3- 5 0 Mn++ 6 0
Mn+++ 9 0 MnCl+ 5 0
MnCl3- 5 0 MnF+ 5 0
MnHCO3+ 5 0 MnOH+ 5 0
NH4+ 2.5 0 NO2- 3 0
NO3- 3 0 Na+ 4.08 0.082
NaHPO4- 5.4 0 NaSO4- 5.4 0
OH- 3.5 0 PO4--- 4 0
S-- 5 0 SO4-- 5 -0.04
SiF6-- 5 0 Sr++ 5.26 0.121
SrHCO3+ 5.4 0 SrOH+ 5 0
Zn++ 5 0 ZnCl+ 4 0
ZnCl3- 4 0 ZnCl4-- 5 0
Note
This method also sets the default value of b for neutral species to 0.1, which is the default value used in PHREEQC.

References:

  • Parkhurst, D. L., Appelo, C. A. J. (2013). Description of input and examples for PHREEQC version 3 — A computer program for speciation, batch-reaction, one-dimensional transport, and inverse geochemical calculations. In Groundwater Book 6, Modeling Techniques (p. 497). U.S. Geological Survey Techniques and Methods.

◆ ActivityModelDebyeHuckelWATEQ4F()

auto ActivityModelDebyeHuckelWATEQ4F ( ) -> ActivityModelGenerator

Return the activity model for aqueous electrolyte phases based on the Debye–Hückel model using WATEQ4F parameters.

The activity model for aqueous electrolyte phases based on the Debye–Hückel model using WATEQ4F parameters.

See also
Debye–Hückel activity model

This method sets both and b of ionic species according to the ones used in WATEQ4F (Ball and Nordstrom [2], Truesdell and Jones [11]), which are listed in the following table:

Ion (Å) b
Ca+2 5.00 0.165
Mg+2 5.50 0.200
Na+ 4.00 0.075
K+ 3.50 0.015
Cl- 3.50 0.015
SO4-2 5.00 -0.040
HCO3- 5.40 0.000
CO3-2 5.40 0.000
Sr+2 5.26 0.121
H+ 9.00 0.000
OH- 3.50 0.000
SrHCO3+ 5.40 0.000
SrOH+ 5.00 0.000
Cu(S4)2-3 23.00 0.000
CuS4S5-3 25.00 0.000
S2-2 6.50 0.000
S3-2 8.00 0.000
S4-2 10.00 0.000
S5-2 12.00 0.000
S6-2 14.00 0.000
Ag(S4)2-3 22.00 0.000
AgS4S5-3 24.00 0.000
Ag(HS)S4-2 15.00 0.000

These values for and b are empirical. They were determined by fitting the modified Debye–Hückel equation to experimental mean-salt activity coefficient data.

References:

  • Ball, J. W., Nordstrom, D. K. (1991). User’s Manual for WATEQ4F, with revised thermodynamic data base and test cases for calculating speciation of major, trace, and redox elements in natural waters. U.S. Geological Survey Water-Resources Investigations Report, 91–183, 1–188.
  • Truesdell, A. H., Jones, B. F. (1974). WATEQ–A computer program for calculating chemical equilibrium of natural waters. U.S. Geological Survey, Journal of Research, 2(2), 233–248.

◆ ActivityModelDrummond() [1/2]

auto Reaktoro::ActivityModelDrummond ( String  gas) -> ActivityModelGenerator

Return the activity model for a dissolved gas species in an aqueous phase based on Drummond (1981).

Parameters
gasThe chemical formula of the dissolved gas in the aqueous phase.
See also
Drummond (1981) activity model

◆ ActivityModelDrummond() [2/2]

auto Reaktoro::ActivityModelDrummond ( String  gas,
ActivityModelDrummondParams  params 
) -> ActivityModelGenerator

Return the activity model for a dissolved gas species in an aqueous phase based on Drummond (1981).

Parameters
gasThe chemical formula of the dissolved gas in the aqueous phase.
paramsThe custom parameters for the activity model.
See also
Drummond (1981) activity model

◆ ActivityModelDuanSun()

auto Reaktoro::ActivityModelDuanSun ( String  gas) -> ActivityModelGenerator

Return the activity model for a dissolved gas species in an aqueous phase based on Duan and Sun (2003).

References:

  • Duan, Z., Sun, R. (2003). An improved model calculating CO2 solubility in pure water and aqueous NaCl mixtures from 273 to 533 K and from 0 to 2000 bar. Chemical Geology, 193(3-4), 257–271 Construct a ActivityModelDuanSun object with given dissolved gas formula.
    Parameters
    gasThe chemical formula of the dissolved gas.

◆ ActivityModelHKF()

auto Reaktoro::ActivityModelHKF ( ) -> ActivityModelGenerator

Return the activity model for aqueous electrolyte phases based on the HKF model.

References:

  • Helgeson, H. C., Kirkham, D. H., Flowers, G. C. (1981). Theoretical prediction of the thermodynamic behavior of aqueous electrolytes at high pressures and temperatures: IV. Calculation of activity coefficients, osmotic coefficients, and apparent molal and standard and relative partial molal properties to 600°C. American Journal of Science, 281(10), 1249–1516.

◆ ActivityModelIdealSolution()

auto Reaktoro::ActivityModelIdealSolution ( StateOfMatter  stateofmatter) -> ActivityModelGenerator

Return the activity model for an ideal solution.

Parameters
stateofmatterThe state of matter of the solution

◆ ActivityModelPhreeqc()

auto Reaktoro::ActivityModelPhreeqc ( PhreeqcDatabase const &  db) -> ActivityModelGenerator

Return an activity model generator for aqueous phases based on the model used in PHREEQC.

The activity model is equivalent to that used in PHREEQC for aqueous solutions when thermodynamic databases such as llnl.dat, phreeqc.dat, and similar are used. The approach is described in Parkhurst and Appelo (2013)[7]. Below a summary is provided.

Activity coefficients of charged species

The activity coefficients of charged species are calculated using the WATEQ-Debye-Hückel model (Truesdell and Jones, 1974)[11]:

\[\log_{10}=-\dfrac{A_{\mathrm{DH}}z_{i}^{2}\sqrt{I}}{1+B_{\mathrm{DH}}\mathring{a}_{i}\sqrt{I}}+b_iI\]

Here, the WATEQ-Debye-Hückel parameters \(\mathring{a}_{i}\) and \(b_i\) are supplied through the -gamma a b command in the PHREEQC species definition. The values of \(A{\mathrm{DH}}\) and \(B_{\mathrm{DH}}\) are computed using water's density and dielectric constant.

In cases where the LLNL_AQUEOUS_MODEL_PARAMETERS data block is available in the PHREEQC database, the Daveler and Wolery (1992) model takes precedence:

\[\log_{10}=-\dfrac{A_{\mathrm{LNLL}}z_{i}^{2}\sqrt{I}}{1+B_{\mathrm{LNLL}}\mathring{a}_{i}\sqrt{I}}+\dot{B}I\]

Here, \(A_{\mathrm{LNLL}}\), \(B_{\mathrm{LNLL}}\), and \(\dot{B}\) are temperature-dependent parameters obtained through interpolation, with relevant data within the LLNL_AQUEOUS_MODEL_PARAMETERS block. Alternatively, in the absence of the above models, the Davies model is employed:

\[\log_{10}=-A_{\mathrm{DH}}z_{i}^{2}\left(\dfrac{\sqrt{I}}{1+\sqrt{I}}-0.3I\right)\]

Activity coefficients of neutral species

The activity coefficients of neutral species are determined by:

\[\log_{10}\gamma_{i}=b_iI\]

In this equation, \(b_i\) takes a value of 0.1. However, when a neutral species is defined using the -co2_llnl_gamma option, the Drummond model is utilized:

\[\ln\gamma_{i}=\left(a_{1}+a_{2}T+\dfrac{a_{3}}{T}\right)I-(a_{4}+a_{5}T)\left(\dfrac{I}{I+1}\right)\]

The necessary coefficients for the Drummond model are supplied via the -co2_coefs input within the LLNL_AQUEOUS_MODEL_PARAMETERS block in the PHREEQC database.

Activity of water

The activity of water in PHREEQC is computed as follows (refer to equation 18 in PHREEQC's v2 User Guide):

\[a_{w}=1-0.017\sum_{i,\mathrm{solutes}}\dfrac{n_{i}}{M_{w}n_{w}}\]

Here, \(M_{w}\) represents the molar mass of water (in kg/mol).

Parameters
dbThe PhreeqcDatabase object containing the parameters for the activity model.
Returns
An ActivityModelGenerator object that generates the activity model when constructing the phase.
See also
PhreeqcDatabase, ActivityModelGenerator

◆ ActivityModelPhreeqcIonicStrengthPressureCorrection()

auto Reaktoro::ActivityModelPhreeqcIonicStrengthPressureCorrection ( ) -> ActivityModelGenerator

Return an activity model that applies an ionic strengh and pressure correction on the activity coefficients of aqueous solutes to produce consistent results with PHREEQC.

This is needed because PHREEQC introduces a dependency on ionic strength for the equilibrium constants of reactions and this is incompatible with the design decision in Reaktoro to make these quantities a function of temperature and presssure, not composition. Thus, the ionic strenth correction used in PHREEQC needs to be transfer in Reaktoro to the activity coefficients of the aqueous solutes. Thus, the use of this activity model needs to be done via a chain of activity models. This corrective activity model should be the last one in the chainned model. Example:

{c++}
AqueousPhase solution(speciate("Na Cl C"));
solution.setActivityModel(chain(
));
auto chain(const Vec< ActivityModelGenerator > &models) -> ActivityModelGenerator
Return an activity model resulting from chaining other activity models.
auto ActivityModelPhreeqcIonicStrengthPressureCorrection() -> ActivityModelGenerator
Return an activity model that applies an ionic strengh and pressure correction on the activity coeffi...
auto speciate(StringList const &substances) -> Speciate
The function used to specify phase species to be determined from element symbols in a list of substan...
auto ActivityModelPitzer() -> ActivityModelGenerator
Return the Pitzer activity model for aqueous electrolyte phases based on PHREEQC's implementation.

◆ ActivityModelPitzerHMW()

auto Reaktoro::ActivityModelPitzerHMW ( ) -> ActivityModelGenerator

Return the activity model for aqueous electrolyte phases based on Harvie-Møller-Weare Pitzer's formulation.

References:

  • Harvie, C.E., Møller, N., Weare, J.H. (1984). The prediction of mineral solubilities in natural waters: The Na-K-Mg-Ca-H-Cl-SO4-OH-HCO3-CO3-CO2-H2O system to high ionic strengths at 25°C. Geochimica et Cosmochimica Acta, 48(4), 723–751.
  • Harvie, C.E., Weare, J.H. (1980). The prediction of mineral soluhilities in natural waters: the system from zero to high concentration at 25°C. Geochimica et Cosmochimica Acta, 44(7), 981–997.
  • Pitzer, K. S. (1975). Thermodynamics of electrolytes. V. effects of higher-order electrostatic terms. Journal of Solution Chemistry, 4(3), 249–265.
  • Helgeson, H. C., Kirkham, D. H., Flowers, G. C. (1981). Theoretical prediction of the thermodynamic behavior of aqueous electrolytes at high pressures and temperatures: IV. Calculation of activity coefficients, osmotic coefficients, and apparent molal and standard and relative partial molal properties to 600°C. American Journal of Science, 281(10), 1249–1516.

◆ ActivityModelRedlichKister()

auto Reaktoro::ActivityModelRedlichKister ( real  a0,
real  a1,
real  a2 
) -> ActivityModelGenerator

Return the activity model for a binary solid solution phase based on Redlich-Kister model.

The Redlich-Kister model calculates the activity coefficient of the end-members in a solid solution using the equations:

\[\ln\gamma_{1}=x_{2}^{2}[a_{0}+a_{1}(3x_{1}-x_{2})+a_{2}(x_{1}-x_{2})(5x_{1}-x_{2})]\]

and

\[\ln\gamma_{2}=x_{1}^{2}[a_{0}-a_{1}(3x_{2}-x_{1})+a_{2}(x_{2}-x_{1})(5x_{2}-x_{1})]\]

. The parameters \(a_0\), \(a_1\), and \(a_2\) must be provided. Set them to zero if not needed.

Parameters
a0The Redlich-Kister parameter a0
a1The Redlich-Kister parameter a1
a2The Redlich-Kister parameter a2
Returns
The equation of state function for the mineral phase
See also
ActivityModel

◆ ActivityModelRumpf()

auto Reaktoro::ActivityModelRumpf ( String  gas) -> ActivityModelGenerator

Return the activity model for a dissolved gas species in an aqueous phase based on Rumpf (1994).

References:

  • Rumpf, B., Nicolaisen, H., Ocal, C., & Maurer, G. (1994). Solubility of carbon dioxide in aqueous mixtures of sodium chloride: Experimental results and correlation. Journal of Solution Chemistry, 23(3), 431–448*.
    Parameters
    gasThe chemical formula of the dissolved gas.

◆ ActivityModelSetschenow()

auto Reaktoro::ActivityModelSetschenow ( String  neutral,
real  b 
) -> ActivityModelGenerator

Return the Setschenow activity model for a neutral aqueous species.

Parameters
neutralThe formula of the neutral aqueous species (e.g., NaCl).
bThe Setschenow b coefficient.

◆ ActivityModelSpycherPruessEnnis()

auto Reaktoro::ActivityModelSpycherPruessEnnis ( ) -> ActivityModelGenerator

Return the activity model for gaseous phases formulated in Spycher et al.

(2003). This is an activity model for a gaseous phase supporting only the gases H22O(g) and CO2(g).

References:

  • Spycher, N., Pruess, K., Ennis-King, J. (2003). CO2-H2O mixtures in the geological sequestration of CO2. I. Assessment and calculation of mutual solubilities from 12 to 100C and up to 600 bar. Geochimica et Cosmochimica Acta, 67(16), 3015-3031.

◆ ActivityModelSpycherReed()

auto Reaktoro::ActivityModelSpycherReed ( ) -> ActivityModelGenerator

Return the activity model for gaseous phases formulated in Spycher and Reed (1988).

This is an activity model for a gaseous phase supporting only the gases H22O(g), CO2(g), and CH4(g).

References:

  • Spycher, N., Reed, M. (1988). Fugacity coefficients of H2, CO2, CH4, H2O and of H2O–CO2–CH4 mixtures: A virial equation treatment for moderate pressures and temperatures applicable to calculations of hydrothermal boiling. Geochimica et Cosmochimica Acta, 52(3), 739-749.

◆ ReactionRateModelPalandriKharaka() [1/2]

auto Reaktoro::ReactionRateModelPalandriKharaka ( ) -> ReactionRateModelGenerator

Return the reaction rate model of [for] dissolution/precipitation kinetics of minerals.

The required model parameters will be fetched from the default parameters in PalandriKharaka.yaml.

◆ ReactionRateModelPalandriKharaka() [2/2]

auto Reaktoro::ReactionRateModelPalandriKharaka ( Params const &  params) -> ReactionRateModelGenerator

Return the reaction rate model of [for] dissolution/precipitation kinetics of minerals.

The required model parameters will be fetched from the Params object params. They must be available under a PalandriKharaka section inside a section ReactionRateModelParams.

Parameters
paramsThe object where mineral reaction rate parameters should be found.

◆ ReactionStandardThermoModelConstLgK()

auto Reaktoro::ReactionStandardThermoModelConstLgK ( const ReactionStandardThermoModelParamsConstLgK params) -> ReactionStandardThermoModel

Return a function that calculates thermodynamic properties of a reaction using a constant model for \(\lg K(T)\).

In this model, the equilibrium constant of the reaction remains constant:

\[\lg K(T)=\lg K_{\mathrm{r}},\]

where \(\lg K_{\mathrm{r}}\) is a given equilibrium constant at a reference temperature and pressure.

The standard Gibbs energy of the reaction is computed using:

\[\Delta G^{\circ}(T,P)=-RT\ln K_{\mathrm{r}}+\Delta V^{\circ}(P-P_{\mathrm{r}}),\]

the standard enthalpy of the reaction using:

\[\Delta H^{\circ}(T,P)=\Delta V^{\circ}(P-P_{\mathrm{r}}).\]

and the standard isobaric heat capacity of reaction using:

\[\Delta C_{P}^{\circ}(T, P) = \Delta V^{\circ}_T(P-P_{\mathrm{r}}),\]

where we have considered the following thermodynamic relations:

\[\begin{align*} \Delta G^{\circ} & \equiv-RT\ln K,\vphantom{\left(-\frac{\Delta G^{\circ}}{T}\right)}\\ \Delta H^{\circ} & \equiv T^{2}\frac{\partial}{\partial T}\left(-\frac{\Delta G^{\circ}}{T}\right)_{P}=RT^{2}\frac{\partial\ln K}{\partial T},\\ \Delta C_{P}^{\circ} & \equiv\left(\dfrac{\partial\Delta H^{\circ}}{\partial T}\right)_{P}. \end{align*}\]

Note that a pressure correction is introduced above, where \(\Delta V^{\circ}\) is the change of standard molar volume of the reaction at \(T\) and \(P\), with \(P_{\mathrm{r}}\) denoting a given reference pressure. \(\Delta V^{\circ}_T\) is the temperature derivative of \(\Delta V^{\circ}\) at constant pressure.

◆ ReactionStandardThermoModelGemsLgK()

auto Reaktoro::ReactionStandardThermoModelGemsLgK ( const ReactionStandardThermoModelParamsGemsLgK params) -> ReactionStandardThermoModel

Return a function that calculates thermodynamic properties of a reaction using GEM-Selektor's expression for \(\lg K(T)\).

In this model, the equilibrium constant of the reaction is computed at a given temperature with:

\[\lg K(T)=A_{0}+A_{1}T+A_{2}T^{-1}+A_{3}\ln T+A_{4}T^{-2}+A_{5}T^{2}+A_{6}T^{-0.5},\]

where \(A_i\) are given coefficients.

The standard Gibbs energy of reaction is computed using:

\[\Delta G^{\circ}(T,P)=-RT\left(A_{0}+A_{1}T+A_{2}T^{-1}+A_{3}\ln T+A_{4}T^{-2}+A_{5}T^{2}+A_{6}T^{-0.5}\right)\ln_{10}+\Delta V^{\circ}(P-P_{\mathrm{r}}),\]

the standard enthalpy of reaction using:

\[\Delta H^{\circ}(T,P)=R\left(A_{1}T^{2}-A_{2}+A_{3}T-2A_{4}T^{-1}+2A_{5}T^{3}-0.5A_{6}T^{0.5}\right)\ln_{10}+\Delta V^{\circ}(P-P_{\mathrm{r}}),\]

and the standard isobaric heat capacity of reaction using:

\[\Delta C_{P}^{\circ}(T,P)=R\left(2A_{1}T+A_{3}+2A_{4}T^{-2}+6A_{5}T^{2}-0.25A_{6}T^{-0.5}\right)\ln_{10}+\Delta V^{\circ}_T(P-P_{\mathrm{r}}),\]

where we have considered the following thermodynamic relations:

\[\begin{align*} \Delta G^{\circ} & \equiv-RT\ln K,\vphantom{\left(-\frac{\Delta G^{\circ}}{T}\right)}\\ \Delta H^{\circ} & \equiv T^{2}\frac{\partial}{\partial T}\left(-\frac{\Delta G^{\circ}}{T}\right)_{P}=RT^{2}\frac{\partial\ln K}{\partial T},\\ \Delta C_{P}^{\circ} & \equiv\left(\dfrac{\partial\Delta H^{\circ}}{\partial T}\right)_{P}. \end{align*}\]

Note that a pressure correction is introduced above, where \(\Delta V^{\circ}\) is the change of standard molar volume of the reaction at \(T\) and \(P\), with \(P_{\mathrm{r}}\) denoting a given reference pressure. \(\Delta V^{\circ}_T\) is the temperature derivative of \(\Delta V^{\circ}\) at constant pressure.

References:

  • Kulik, D., Wagner T. (2010) Part 3. Temperature corrections of standard molar (partial molal) thermodynamic properties of substances and reactions using data in ReacDC records of GEM-Selektor.
  • Haas, J.L., Fisher, J.R. (1976). Simultaneous evaluation and correlation of thermodynamic data. In American Journal of Science (Vol. 276, Issue 4, pp. 525–545). https://doi.org/10.2475/ajs.276.4.525

◆ ReactionStandardThermoModelPhreeqcLgK()

auto Reaktoro::ReactionStandardThermoModelPhreeqcLgK ( const ReactionStandardThermoModelParamsPhreeqcLgK params) -> ReactionStandardThermoModel

Return a function that calculates thermodynamic properties of a reaction using PHREEQC's analytical expression.

In this model, the equilibrium constant of the reaction is computed at a given temperature with:

\[\lg K(T)=A_{1}+A_{2}T+A_{3}T^{-1}+A_{4}\log_{10}T+A_{5}T^{-2}+A_{6}T^{2},\]

where \(A_i\) are given coefficients.

The standard Gibbs energy of reaction is computed using:

\[\Delta G^{\circ}(T,P)=-RT\left(A_{1}+A_{2}T+A_{3}T^{-1}+A_{4}\log_{10}T+A_{5}T^{-2}+A_{6}T^{2}\right)\ln_{10}+\Delta V^{\circ}(P-P_{\mathrm{r}}),\]

the standard enthalpy of reaction using:

\[\Delta H^{\circ}(T,P)=R\left(A_{2}T^{2}-A_{3}+\frac{A_{4}}{\ln10}T-2A_{5}T^{-1}+2A_{6}T^{3}\right)\ln_{10}+\Delta V^{\circ}(P-P_{\mathrm{r}}),\]

and the standard isobaric heat capacity of reaction using:

\[\Delta C_{P}^{\circ}(T,P)=R\left(2A_{2}T+\frac{A_{4}}{\ln10}+2A_{5}T^{-2}+6A_{6}T^{2}\right)\ln_{10}+\Delta V_{T}^{\circ}(P-P_{\mathrm{r}}),\]

where we have considered the following thermodynamic relations:

\[\begin{align*} \Delta G^{\circ} & \equiv-RT\ln K,\vphantom{\left(-\frac{\Delta G^{\circ}}{T}\right)}\\ \Delta H^{\circ} & \equiv T^{2}\frac{\partial}{\partial T}\left(-\frac{\Delta G^{\circ}}{T}\right)_{P}=RT^{2}\frac{\partial\ln K}{\partial T},\\ \Delta C_{P}^{\circ} & \equiv\left(\dfrac{\partial\Delta H^{\circ}}{\partial T}\right)_{P}. \end{align*}\]

Note that a pressure correction is introduced above, where \(\Delta V^{\circ}\) is the change of standard molar volume of the reaction at \(T\) and \(P\), with \(P_{\mathrm{r}}\) denoting a given reference pressure. \(\Delta V^{\circ}_T\) is the temperature derivative of \(\Delta V^{\circ}\) at constant pressure.

Reference:

  • Parkhurst, D.L., Appelo, C.A.J. (2013). Description of input and examples for PHREEQC version 3—A computer program for speciation, batch-reaction, one-dimensional transport, and inverse geochemical calculations. In Groundwater Book 6, Modeling Techniques (p. 497). U.S. Geological Survey Techniques and Methods. http://pubs.usgs.gov/tm/06/a43

◆ ReactionStandardThermoModelPressureCorrection()

auto Reaktoro::ReactionStandardThermoModelPressureCorrection ( real const &  Pr) -> ReactionStandardThermoModel

Return a function that calculates pressure correction for standard Gibbs energy and enthalpy a reaction.

In this model, the standard Gibbs energy, enthalpy, and isobatic heat capacity of reaction are computed using:

\[\Delta G^{\circ}=\Delta G_{\mathrm{base}}^{\circ}+\Delta V^{\circ}(P-P_{r})\]

\[\Delta H^{\circ}=\Delta H_{\mathrm{base}}^{\circ}+\Delta V^{\circ}(P-P_{r})\]

\[\Delta C_P^{\circ}=\Delta C_{P,\mathrm{base}}^{\circ}\]

where \(\Delta G_{\mathrm{base}}^{\circ}\), \(\Delta H_{\mathrm{base}}^{\circ}\), and \(\Delta C_{P,\mathrm{base}}^{\circ}\) denote standard properties computed using a given base thermodynamic model function of the reaction.

Parameters
PrThe reference pressure for the pressure correction (in Pa).

◆ ReactionStandardThermoModelVantHoff()

auto Reaktoro::ReactionStandardThermoModelVantHoff ( const ReactionStandardThermoModelParamsVantHoff params) -> ReactionStandardThermoModel

Return a function that calculates thermodynamic properties of a reaction using van't Hoff's model.

In this model, the equilibrium constant of the reaction is computed at a given temperature with:

\[\ln K(T)=\ln K_{\mathrm{r}}-\frac{\Delta H_{\mathrm{r}}^{\circ}}{R}\left(\frac{1}{T}-\frac{1}{T_{\mathrm{r}}}\right),\]

where \(\ln K_{\mathrm{r}}\) and \(\Delta H_{\mathrm{r}}^{\circ}\) are the equilibrium constant and enthalpy of reaction at reference temperature \(T_\mathrm{r}\).

The standard Gibbs energy of reaction is computed using:

\[\Delta G^{\circ}(T, P)=-RT\ln K_{\mathrm{r}}+\Delta V^{\circ}(P-P_{\mathrm{r}}),\]

the standard enthalpy of the reaction using:

\[\Delta H^{\circ}(T, P)=\Delta H_{\mathrm{r}}^{\circ}+\Delta V^{\circ}(P-P_{\mathrm{r}}).\]

and the standard isobaric heat capacity of reaction using:

\[\Delta C_{P}^{\circ}(T, P) = \Delta V^{\circ}_T(P-P_{\mathrm{r}}),\]

where we have considered the following thermodynamic relations:

\[\begin{align*} \Delta G^{\circ} & \equiv-RT\ln K,\vphantom{\left(-\frac{\Delta G^{\circ}}{T}\right)}\\ \Delta H^{\circ} & \equiv T^{2}\frac{\partial}{\partial T}\left(-\frac{\Delta G^{\circ}}{T}\right)_{P}=RT^{2}\frac{\partial\ln K}{\partial T},\\ \Delta C_{P}^{\circ} & \equiv\left(\dfrac{\partial\Delta H^{\circ}}{\partial T}\right)_{P}. \end{align*}\]

Note that a pressure correction is introduced above, where \(\Delta V^{\circ}\) is the change of standard molar volume of the reaction at \(T\) and \(P\), with \(P_{\mathrm{r}}\) denoting a given reference pressure. \(\Delta V^{\circ}_T\) is the temperature derivative of \(\Delta V^{\circ}\) at constant pressure.

◆ SurfaceAreaModelLinearMolar()

auto Reaktoro::SurfaceAreaModelLinearMolar ( String const &  phase,
real const &  Abar 
) -> SurfaceAreaModel

Return a surface area model based on linear variation from a given molar surface area.

Parameters
phaseThe name of the phase (as present in the chemical system) that forms the surface.
AbarThe molar area of the surface (in m2/mol)

◆ SurfaceAreaModelLinearSpecific()

auto Reaktoro::SurfaceAreaModelLinearSpecific ( String const &  phase,
real const &  Abar 
) -> SurfaceAreaModel

Return a surface area model based on linear variation from a given specific surface area.

Parameters
phaseThe name of the phase (as present in the chemical system) that forms the surface.
AbarThe specific area of the surface (in m2/kg)

◆ SurfaceAreaModelLinearVolumetric()

auto Reaktoro::SurfaceAreaModelLinearVolumetric ( String const &  phase,
real const &  Abar 
) -> SurfaceAreaModel

Return a surface area model based on linear variation from a given volumetric surface area.

Parameters
phaseThe name of the phase (as present in the chemical system) that forms the surface.
AbarThe volumetric area of the surface (in m2/m3)

◆ waterElectroPropsJohnsonNorton()

auto Reaktoro::waterElectroPropsJohnsonNorton ( real  T,
real  P,
const WaterThermoProps wtp 
) -> WaterElectroProps

Calculate the electrostatic state of water using the model of Johnson and Norton (1991).

Reference:

  • Johnson, J. W., Norton, D. (1991). Critical phenomena in hydrothermal systems; state, thermodynamic, electrostatic, and transport properties of H2O in the critical region. American Journal of Science, 291(6), 541–648. doi

◆ waterHelmholtzPropsHGK()

auto Reaktoro::waterHelmholtzPropsHGK ( real  T,
real  D 
) -> WaterHelmholtzProps

Calculate the Helmholtz free energy state of water using the Haar–Gallagher–Kell (1984) equation of state.

Parameters
TThe temperature of water (in units of K)
DThe density of water (in units of kg/m3)
Returns
The Helmholtz free energy state of water
See also
WaterHelmholtzProps

◆ waterHelmholtzPropsWagnerPruss()

auto Reaktoro::waterHelmholtzPropsWagnerPruss ( real  T,
real  D 
) -> WaterHelmholtzProps

Calculate the Helmholtz free energy state of water using the Wagner and Pruss (1995) equation of state.

Parameters
TThe temperature of water (in units of K)
DThe density of water (in units of kg/m3)
Returns
The Helmholtz free energy state of water
See also
WaterHelmholtzProps

◆ waterDensityWagnerPrussInterp()

auto Reaktoro::waterDensityWagnerPrussInterp ( real const &  T,
real const &  P,
StateOfMatter  som 
) -> real

Compute the density of water (in kg/m3) at given a temperature and pressure using quadratic interpolation.

The interpolation is performed using pre-computed water properties at temperatures and pressures shown in Table 13.2 of Wagner, W., Pruss, A. (2002). The IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use. Journal of Physical and Chemical Reference Data, 31(2), 387. https://doi.org/10.1063/1.1461829.

Parameters
TThe temperature value (in K)
PThe pressure value (in Pa)
somThe desired state of matter for water (the actual state of matter may end up being different!)

◆ waterThermoPropsWagnerPrussInterp()

auto Reaktoro::waterThermoPropsWagnerPrussInterp ( real const &  T,
real const &  P,
StateOfMatter  som 
) -> WaterThermoProps

Compute the thermodynamic properties of water at given a temperature and pressure using quadratic interpolation.

The interpolation is performed using pre-computed water properties at temperatures and pressures shown in Table 13.2 of Wagner, W., Pruss, A. (2002). The IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use. Journal of Physical and Chemical Reference Data, 31(2), 387. https://doi.org/10.1063/1.1461829.

Parameters
TThe temperature value (in K)
PThe pressure value (in Pa)
somThe desired state of matter for water (the actual state of matter may end up being different!)

◆ waterThermoPropsWagnerPrussInterpData()

auto Reaktoro::waterThermoPropsWagnerPrussInterpData ( StateOfMatter  som) -> Vec< Vec< WaterThermoProps >> const &

Return the pre-computed thermodynamic properties of water using Wagner and Pruss (2002) equation of state used for interpolation.

The interpolation data consists of pre-computed water properties at temperatures and pressures shown in Table 13.2 of Wagner, W., Pruss, A. (2002). The IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use. Journal of Physical and Chemical Reference Data, 31(2), 387. https://doi.org/10.1063/1.1461829.

Note
The first call to this function will trigger a parsing operation of embedded text data.
Parameters
somThe desired state of matter for water (the actual state of matter may end up being different!)

◆ waterThermoPropsHGK()

auto Reaktoro::waterThermoPropsHGK ( real const &  T,
real const &  P,
StateOfMatter  som 
) -> WaterThermoProps

Calculate the thermodynamic properties of water using the Haar-Gallagher-Kell (1984) equation of state.

References:

  • Haar, L., Gallagher, J. S., Kell, G. S. (1984). NBS/NRC Steam Tables: Thermodynamic and Transport Properties and Computer Program for Vapor and Liquid States of Water in SI Units. New York: Hemisphere Publishing Corporation.
    Parameters
    TThe temperature of water (in units of K)
    PThe pressure of water (in units of Pa)
    somThe desired state of matter for water (the actual state of matter may end up being different!)
    Returns
    The thermodynamic state of water
    See also
    WaterThermoProps

◆ waterThermoPropsHGKMemoized()

auto Reaktoro::waterThermoPropsHGKMemoized ( real const &  T,
real const &  P,
StateOfMatter  som 
) -> WaterThermoProps

Calculate the thermodynamic properties of water using the Haar-Gallagher-Kell (1984) equation of state.

Note
This function will skip the computation if given arguments are the same as in its last invocation. The cached result will be returned, thus improving performance.

◆ waterThermoPropsWagnerPruss()

auto Reaktoro::waterThermoPropsWagnerPruss ( real const &  T,
real const &  P,
StateOfMatter  som 
) -> WaterThermoProps

Calculate the thermodynamic properties of water using the Wagner and Pruss (1995) equation of state.

References:

  • Wagner, W., Pruss, A. (1999). The IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use. Journal of Physical and Chemical Reference Data, 31(2), 387. doi
    Parameters
    TThe temperature of water (in units of K)
    PThe pressure of water (in units of Pa)
    somThe desired state of matter for water (the actual state of matter may end up being different!)
    Returns
    The thermodynamic state of water
    See also
    WaterThermoProps

◆ waterThermoPropsWagnerPrussMemoized()

auto Reaktoro::waterThermoPropsWagnerPrussMemoized ( real const &  T,
real const &  P,
StateOfMatter  som 
) -> WaterThermoProps

Calculate the thermodynamic properties of water using the Wagner and Pruss (1995) equation of state.

Note
This function will skip the computation if given arguments are the same as in its last invocation. The cached result will be returned, thus improving performance.

◆ waterThermoPropsWagnerPrussInterpMemoized()

auto Reaktoro::waterThermoPropsWagnerPrussInterpMemoized ( real const &  T,
real const &  P,
StateOfMatter  som 
) -> WaterThermoProps

Calculate the thermodynamic properties of water using interpolation of pre-computed properties using the Wagner and Pruss (1995) equation of state.

Note
This function will skip the computation if given arguments are the same as in its last invocation. The cached result will be returned, thus improving performance.

◆ waterThermoProps()

auto Reaktoro::waterThermoProps ( real const &  T,
real const &  P,
WaterHelmholtzProps const &  whp 
) -> WaterThermoProps

Calculate the thermodynamic properties of water.

This is a general method that uses the Helmholtz free energy state of water, as an instance of WaterHelmholtzProps, to completely resolve its thermodynamic state.

Parameters
TThe temperature of water (in units of K)
PThe pressure of water (in units of Pa)
whpThe Helmholtz free energy state of water
Returns
The thermodynamic properties of water
See also
WaterHelmholtzProps, WaterThermoProps

◆ waterDensityHGK()

auto Reaktoro::waterDensityHGK ( real const &  T,
real const &  P,
StateOfMatter  stateofmatter 
) -> real

Calculate the density of water using the Haar–Gallagher–Kell (1984) equation of state.

Parameters
TThe temperature of water (in K)
PThe pressure of water (in Pa)
stateofmatterThe state of matter of water
Returns
The density of liquid water (in kg/m3)

◆ waterDensityWagnerPruss()

auto Reaktoro::waterDensityWagnerPruss ( real const &  T,
real const &  P,
StateOfMatter  stateofmatter 
) -> real

Calculate the density of water using the Wagner and Pruss (1995) equation of state.

Parameters
TThe temperature of water (in K)
PThe pressure of water (in Pa)
stateofmatterThe state of matter of water
Returns
The density of liquid water (in kg/m3)

◆ waterLiquidDensityHGK()

auto Reaktoro::waterLiquidDensityHGK ( real const &  T,
real const &  P 
) -> real

Calculate the density of liquid water using the Haar–Gallagher–Kell (1984) equation of state.

Parameters
TThe temperature of water (in K)
PThe pressure of water (in Pa)
Returns
The density of liquid water (in kg/m3)

◆ waterLiquidDensityWagnerPruss()

auto Reaktoro::waterLiquidDensityWagnerPruss ( real const &  T,
real const &  P 
) -> real

Calculate the density of liquid water using the Wagner and Pruss (1995) equation of state.

Parameters
TThe temperature of water (in K)
PThe pressure of water (in Pa)
Returns
The density of liquid water (in kg/m3)

◆ waterVaporDensityHGK()

auto Reaktoro::waterVaporDensityHGK ( real const &  T,
real const &  P 
) -> real

Calculate the density of vapor water using the Haar–Gallagher–Kell (1984) equation of state.

Parameters
TThe temperature of water (in K)
PThe pressure of water (in Pa)
Returns
The density of water (in kg/m3)

◆ waterVaporDensityWagnerPruss()

auto Reaktoro::waterVaporDensityWagnerPruss ( real const &  T,
real const &  P 
) -> real

Calculate the density of vapor water using the Wagner and Pruss (1995) equation of state.

Parameters
TThe temperature of water (in K)
PThe pressure of water (in Pa)
Returns
The density of water (in kg/m3)

◆ waterPressureHGK()

auto Reaktoro::waterPressureHGK ( real const &  T,
real const &  D 
) -> real

Calculate the pressure of water using the Haar–Gallagher–Kell (1984) equation of state.

Parameters
TThe temperature of water (in K)
DThe density of water (in kg/m3)
Returns
The pressure of water (in Pa)

◆ waterPressureWagnerPruss()

auto Reaktoro::waterPressureWagnerPruss ( real const &  T,
real const &  D 
) -> real

Calculate the pressure of water using the Wagner and Pruss (1995) equation of state.

Parameters
TThe temperature of water (in K)
DThe density of water (in kg/m3)
Returns
The pressure of water (in Pa)

◆ waterSaturationPressureWagnerPruss()

auto Reaktoro::waterSaturationPressureWagnerPruss ( real const &  T) -> real

Calculate the saturation pressure of water using the Wagner and Pruss (1995) equation of state.

Parameters
TThe temperature of water (in K)
Returns
The saturation pressure of water (in Pa)

◆ waterSaturationLiquidDensityWagnerPruss()

auto Reaktoro::waterSaturationLiquidDensityWagnerPruss ( real const &  T) -> real

Calculate the saturation liquid-density of water using the Wagner and Pruss (1995) equation of state.

Parameters
TThe temperature of water (in K)
Returns
The saturation liquid-density of water (in kg/m3)

◆ waterSaturationVapourDensityWagnerPruss()

auto Reaktoro::waterSaturationVapourDensityWagnerPruss ( real const &  T) -> real

Calculate the saturation vapour-density of water using the Wagner and Pruss (1995) equation of state.

Parameters
TThe temperature of water (in K)
Returns
The saturation vapour-density of water (in kg/m3)