Reaktoro
A unified framework for modeling chemically reactive systems
Reaktoro Namespace Reference

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

Namespaces

 ChemicalProperty
 The namespace of all chemical property functions.
 

Classes

class  AqueousMixture
 A type used to describe an aqueous mixture. More...
 
struct  AqueousMixtureState
 A type used to describe the state of an aqueous mixture. More...
 
class  AqueousPhase
 A type used to describe an aqueous phase. More...
 
class  AqueousSpecies
 A type to represent an aqueous species. More...
 
struct  AqueousSpeciesThermoData
 A type for storing the thermodynamic data of an aqueous species. More...
 
struct  AqueousSpeciesThermoParamsHKF
 A type for storing the parameters of the HKF equation of state for a aqueous species. More...
 
class  BilinearInterpolator
 A class used to calculate bilinear interpolation of data in two dimensions. More...
 
class  ChemicalEditor
 Provides convenient operations to initialize ChemicalSystem and ReactionSystem instances. More...
 
class  ChemicalField
 
class  ChemicalModelResult
 The result of a chemical model function that calculates the chemical properties of species. More...
 
class  ChemicalOutput
 A type used to output sequence of chemical states to a file or terminal. More...
 
class  ChemicalPlot
 A class used to create plots from sequence of chemical states. More...
 
class  ChemicalProperties
 A class for querying thermodynamic and chemical properties of a chemical system. More...
 
class  ChemicalQuantity
 A class that provides a convenient way to retrieve chemical quantities. More...
 
class  ChemicalScalarBase
 A template base class to represent a chemical scalar and its partial derivatives. More...
 
class  ChemicalState
 Provides a computational representation of the state of a multiphase chemical system. More...
 
class  ChemicalSystem
 A class to represent a system and its attributes and properties. More...
 
class  ChemicalVectorBase
 A template base class to represent a vector of chemical properties and their partial derivatives. More...
 
class  Composition
 A type that describes temperature in units of K. More...
 
class  Connectivity
 A type to describe the connectivity of elements, species, and phases in a chemical system. More...
 
class  CubicEOS
 Defines a cubic equation of state and calculates thermodynamic properties of a fluid phase. More...
 
struct  DaeOptions
 A struct that defines the options for the DaeSolver. More...
 
class  DaeProblem
 A class that defines a system of differential-algebraic equations (DAE) problem. More...
 
class  DaeSolver
 A class for solving differential-algebraic equations (DAE). More...
 
class  Database
 Provides operations to retrieve physical and thermodynamic data of chemical species. More...
 
class  DebyeHuckelParams
 A class used to define the parameters in the Debye–Hückel activity model for aqueous mixtures. More...
 
class  Element
 A type used to define a chemical element and its attributes. More...
 
class  EquilibriumBalance
 A class that defines the mass balance conditions for equilibrium calculations. More...
 
class  EquilibriumInverseProblem
 A class used for defining an inverse equilibrium problem. More...
 
class  EquilibriumInverseSolver
 A class used for solving inverse equilibrium problems. More...
 
struct  EquilibriumOptions
 The options for the equilibrium calculations. More...
 
class  EquilibriumPath
 A class that describes a path of equilibrium states. More...
 
struct  EquilibriumPathOptions
 A struct that describes the options from an equilibrium path calculation. More...
 
struct  EquilibriumPathResult
 A struct that describes the result of an equilibrium path calculation. More...
 
class  EquilibriumProblem
 A type that defines an equilibrium problem. More...
 
class  EquilibriumReactions
 A class that generates a system of equilibrium reactions written in terms of master and secondary species. More...
 
struct  EquilibriumResult
 A type used to describe the result of an equilibrium calculation. More...
 
struct  EquilibriumSensitivity
 A type that contains the sensitivity data of the equilibrium state. More...
 
class  EquilibriumSolver
 A solver class for solving chemical equilibrium calculations. More...
 
struct  Exception
 Provides a convenient way to initialized an exception with helpful error messages. More...
 
class  Filter
 A type that describes an optimisation filter. More...
 
class  FluidMixture
 Provides a computational representation of a fluid (gaseous or liquid) mixture. More...
 
struct  FluidMixtureState
 A type used to describe the state of a fluid (gaseous or liquid) mixture. More...
 
class  FluidPhase
 Class that defines a fluid (gaseous or liquid) phase. More...
 
class  FluidSpecies
 A type to describe the attributes of a fluids (gaseous or liquid) species. More...
 
struct  FluidSpeciesThermoData
 A type for storing the thermodynamic data of fluid (gaseous or liquid) species. More...
 
struct  FluidSpeciesThermoParamsHKF
 A type for storing the parameters of the HKF equation of state for a fluid (gaseous or liquid) species. More...
 
struct  FunctionG
 A type used to describe the function g of the HKF model and its partial temperature and pressure derivatives. More...
 
class  GaseousPhase
 
class  Gems
 A wrapper class for Gems code. More...
 
struct  GemsOptions
 A type that describes the options for Gems. More...
 
class  GeneralMixture
 Provide a base of implementation for the mixture classes. More...
 
class  Gnuplot
 
struct  Hessian
 A type to describe the Hessian of an objective function. More...
 
class  Interface
 A class used to interface other codes with Reaktoro. More...
 
class  Interpreter
 Used to interpret json files containing defined calculations. More...
 
struct  Jacobian
 A type to describe the Jacobian of an equality constraint function. More...
 
struct  KineticOptions
 A struct to describe the options for a chemical kinetics calculation. More...
 
struct  KineticOutputOptions
 
class  KineticPath
 A class that conveniently solves kinetic path calculations. More...
 
class  KineticProblem
 A type that defines a kinetic problem. More...
 
class  KineticResult
 
class  KineticSolver
 A class that represents a solver for chemical kinetics problems. More...
 
struct  KktMatrix
 A type to represent the left-hand side matrix of a KKT equation. More...
 
struct  KktOptions
 A type to describe the options for the KKT calculation. More...
 
struct  KktResult
 A type to describe the result of a KKT calculation. More...
 
struct  KktSolution
 A type to represent the solution vector of a KKT equation. More...
 
class  KktSolver
 A type to describe a solver for a KKT equation. More...
 
struct  KktVector
 A type to represent the right-hand side vector of a KKT equation. More...
 
class  LagrangeInterpolator
 A class used to calculate interpolation of data in one dimension in any order. More...
 
class  LiquidPhase
 
struct  LU
 The class that computes the full pivoting Auxiliary struct for storing the LU decomposition of a matrix A. More...
 
class  Mesh
 A class that defines the mesh for TransportSolver. More...
 
struct  MineralCatalyst
 
struct  MineralMechanism
 
class  MineralMixture
 Provide a computational representation of a mineral mixture. More...
 
struct  MineralMixtureState
 A type used to describe the state of a mineral mixture. More...
 
class  MineralPhase
 Class that defines a mineral phase. More...
 
class  MineralReaction
 
class  MineralSpecies
 A type to describe the attributes of a mineral species. More...
 
struct  MineralSpeciesThermoData
 A type for storing the thermodynamic data of a mineral species. More...
 
struct  MineralSpeciesThermoParamsHKF
 A type for storing the parameters of the HKF equation of state for a mineral species. More...
 
struct  MixtureState
 A type used to describe the state of a mixture. More...
 
struct  NonlinearOptions
 A type that describes the options for the solution of a non-linear problem. More...
 
struct  NonlinearOutput
 A type that describes the options for the output of a non-linear problem calculation. More...
 
struct  NonlinearProblem
 A type that describes the non-linear problem. More...
 
struct  NonlinearResidual
 A type that describes the evaluation result of a non-linear residual function. More...
 
struct  NonlinearResult
 A type that describes the result of a non-linear problem calculation. More...
 
class  NonlinearSolver
 A type that implements the Newton algorithm for solving non-linear problems. More...
 
struct  ObjectiveResult
 A type that describes the result of the evaluation of an objective function. More...
 
struct  ODEOptions
 A struct that defines the options for the ODESolver. More...
 
class  ODEProblem
 A class that defines a system of ordinary differential equations (ODE) problem. More...
 
class  ODESolver
 A wrapper class for CVODE, a library for solving ordinary differential equations. More...
 
struct  OptimumOptions
 A type that describes the options of a optimisation calculation. More...
 
struct  OptimumOutputOptions
 A type that describes the options for the output of a optimisation calculation. More...
 
struct  OptimumParamsActNewton
 
struct  OptimumParamsIpAction
 
struct  OptimumParamsIpActive
 
struct  OptimumParamsIpNewton
 
struct  OptimumParamsIpOpt
 
struct  OptimumParamsKarpov
 
struct  OptimumParamsRefiner
 
struct  OptimumParamsRegularization
 A type that describes the regularization options for the optimisation calculation. More...
 
struct  OptimumProblem
 A type that describes the non-linear constrained optimisation problem. More...
 
struct  OptimumResult
 A type that describes the result of an optimisation calculation. More...
 
class  OptimumSolver
 The friendly interface to all optimisation algorithms. More...
 
class  OptimumSolverActNewton
 The class that implements the ActNewton algorithm using an active-set strategy. More...
 
class  OptimumSolverBase
 The base class for all optimization algorithms. More...
 
class  OptimumSolverIpAction
 The class that implements the IpAction algorithm using an interior-point method with a null-space KKT formulation. More...
 
class  OptimumSolverIpActive
 The class that implements the IpActive algorithm using an interior-point method combined with an active-set strategy. More...
 
class  OptimumSolverIpBounds
 The class that implements the IpBounds algorithm using an interior-point method. More...
 
class  OptimumSolverIpFeasible
 The class that implements the IpFeasible algorithm using an interior-point method. More...
 
class  OptimumSolverIpNewton
 The class that implements the IpNewton algorithm using an interior-point method. More...
 
class  OptimumSolverIpOpt
 The class that implements the IpOpt algorithm using an interior-point method. More...
 
class  OptimumSolverKarpov
 The class that implements an optimization algorithm based on Karpov's method. More...
 
class  OptimumSolverRefiner
 The class that implements a refinement operation of the optimal solution. More...
 
class  OptimumSolverSimplex
 The class that implements the simplex algorithm for linear programming problems. More...
 
struct  OptimumState
 A type that describes the state of an optimum solution. More...
 
class  Outputter
 A utility class for printing the progress of iterative calculations. More...
 
struct  OutputterOptions
 
class  Partition
 Provide a computational representation of the Partition of a chemical system. More...
 
class  Phase
 A type used to define a phase and its attributes. More...
 
struct  PhaseChemicalModelResultBase
 The result of a chemical model function that calculates the chemical properties of species. More...
 
struct  PhaseThermoModelResultBase
 The result of a thermodynamic model function that calculates the thermodynamic properties of species. More...
 
class  Phreeqc
 
class  PhreeqcDatabase
 
class  PhreeqcEditor
 
class  Pressure
 A type that describes pressure in units of Pa. More...
 
class  Reaction
 Provide a computational representation of a chemical reaction. More...
 
class  ReactionEquation
 Define a type that describes the equation of a reaction. More...
 
class  ReactionSystem
 A class that represents a system of chemical reactions. More...
 
struct  ReactionThermoInterpolatedProperties
 A type for storing thermodynamic properties of a reaction over a range of temperatures and pressures. More...
 
class  ReactiveTransportSolver
 Use this class for solving reactive transport problems. More...
 
class  Regularizer
 A type that represents a regularized optimization problem. More...
 
struct  RegularizerOptions
 A type that describes the options for regularizing linear constraints. More...
 
struct  ResidualEquilibriumConstraints
 A type used to define the result of the evaluation of a system of equilibrium constraints. More...
 
struct  SmartEquilibriumOptions
 The options for the smart equilibrium calculations. More...
 
struct  SmartEquilibriumResult
 A type used to describe the result of a smart equilibrium calculation. More...
 
class  SmartEquilibriumSolver
 A class used to perform equilibrium calculations using machine learning scheme. More...
 
class  Species
 A type used to describe a species and its attributes. More...
 
struct  SpeciesElectroState
 
struct  SpeciesThermoData
 A type for storing the thermodynamic data of general species. More...
 
struct  SpeciesThermoInterpolatedProperties
 A type for storing thermodynamic properties of a species over a range of temperatures and pressures. More...
 
struct  SpeciesThermoParamsPhreeqc
 A type for storing Phreeqc parameters of a species. More...
 
struct  SpeciesThermoState
 Describe the thermodynamic state of a species. More...
 
class  StringList
 A class for representing a list of strings with special constructors. More...
 
class  Temperature
 A type that describes temperature in units of K. More...
 
class  Thermo
 A type to calculate thermodynamic properties of chemical species. More...
 
class  ThermoModelResult
 The result of a thermodynamic model function that calculates standard thermodynamic properties of species. More...
 
class  ThermoProperties
 A class used for calculating standard thermodynamic properties of species in a chemical system. More...
 
class  ThermoScalarBase
 A template base class to represent a thermodynamic scalar and its partial derivatives. More...
 
class  ThermoVectorBase
 A template base class to represent a vector of thermodynamic scalars and their partial derivatives. More...
 
class  TransportSolver
 A class for solving advection-diffusion problem. More...
 
class  TridiagonalMatrix
 A class that defines a Tridiagonal Matrix used on TransportSolver. More...
 
struct  WaterElectroState
 
struct  WaterHelmholtzState
 
struct  WaterThermoState
 

Typedefs

using ChemicalScalar = ChemicalScalarBase< double, RowVector >
 A type that represents a chemical property and its derivatives. More...
 
using ChemicalScalarRef = ChemicalScalarBase< double &, Eigen::Ref< RowVector, 0, Eigen::InnerStride< Eigen::Dynamic > >>
 A type that represents a chemical property and its derivatives.
 
using ChemicalScalarConstRef = ChemicalScalarBase< const double &, Eigen::Ref< const RowVector, 0, Eigen::InnerStride< Eigen::Dynamic > >>
 A type that represents a chemical property and its derivatives.
 
using ChemicalVector = ChemicalVectorBase< Vector, Vector, Vector, Matrix >
 A type that represents a vector of chemical properties and their derivatives. More...
 
using ChemicalVectorRef = ChemicalVectorBase< VectorRef, VectorRef, VectorRef, MatrixRef >
 A type that represents a vector of chemical properties and their derivatives.
 
using ChemicalVectorConstRef = ChemicalVectorBase< VectorConstRef, VectorConstRef, VectorConstRef, MatrixConstRef >
 A type that represents a vector of chemical properties and their derivatives.
 
using Index = std::size_t
 Define a type that represents an index.
 
using Indices = std::vector< Index >
 Define a type that represents a collection of indices.
 
using json = nlohmann::json
 
using ThermoScalar = ThermoScalarBase< double >
 A type that defines a scalar thermo property. More...
 
using ThermoVector = ThermoVectorBase< Vector, Vector, Vector >
 A type that defines a vector of thermodynamic properties. More...
 
using ThermoScalarFunction = std::function< ThermoScalar(Temperature, Pressure)>
 
using ThermoVectorFunction = std::function< ThermoVector(Temperature, Pressure)>
 
using ChemicalScalarFunction = std::function< ChemicalScalar(Temperature, Pressure, VectorConstRef)>
 
using ChemicalVectorFunction = std::function< ChemicalVector(Temperature, Pressure, VectorConstRef)>
 
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 ThermoVectorRef = ThermoVectorBase< VectorRef, VectorRef, VectorRef >
 A type that defines a vector of thermodynamic properties.
 
using ThermoVectorConstRef = ThermoVectorBase< VectorConstRef, VectorConstRef, VectorConstRef >
 A type that defines a vector of thermodynamic properties.
 
using Time = std::chrono::time_point< std::chrono::high_resolution_clock >
 
using Duration = std::chrono::duration< double >
 
template<typename Condition >
using EnableIf = typename std::enable_if< Condition::value, void >::type
 
template<typename Type >
using IsScalar = std::is_scalar< Type >
 
template<typename Type >
using EnableIfScalar = EnableIf< IsScalar< Type > >
 
using ChemicalPropertyFunction = std::function< ChemicalScalar(const ChemicalProperties &)>
 The signature of a function that calculates a single chemical property.
 
using ReactionRateFunction = std::function< ChemicalScalar(const ChemicalProperties &)>
 The function signature of the rate of a reaction (in units of mol/s). More...
 
using ReactionRateVectorFunction = std::function< ChemicalVector(const ChemicalProperties &)>
 The function signature of the rates of a collection of reactions (in units of mol/s). More...
 
using GaseousSpecies = FluidSpecies
 
using DaeFunction = std::function< int(double t, VectorConstRef u, VectorConstRef udot, VectorRef F)>
 The function signature of the right-hand side function of a system of ordinary differential equations.
 
using DaeJacobian = std::function< int(double t, VectorConstRef u, VectorConstRef udot, MatrixRef J)>
 The function signature of the Jacobian of the right-hand side function of a system of ordinary differential equations.
 
using ScalarFunction = std::function< double(VectorConstRef)>
 Define a scalar function type.
 
using VectorFunction = std::function< Vector(VectorConstRef)>
 Define a vector function type.
 
using Vector = Eigen::VectorXd
 
using VectorRef = Eigen::Ref< Eigen::VectorXd >
 < Alias to Eigen type VectorXd. More...
 
using VectorStridedRef = Eigen::Ref< Vector, 0, Eigen::InnerStride<> >
 < Alias to Eigen type Ref<VectorXd>.
 
using VectorConstRef = Eigen::Ref< const Eigen::VectorXd >
 < Alias to Eigen type Ref<VectorXd>. More...
 
using VectorMap = Eigen::Map< Eigen::VectorXd >
 < Alias to Eigen type Ref<const VectorXd>. More...
 
using VectorConstMap = Eigen::Map< const Eigen::VectorXd >
 < Alias to Eigen type Map<VectorXd>. More...
 
using RowVector = Eigen::RowVectorXd
 < Alias to Eigen type Map<const VectorXd>.
 
using RowVectorRef = Eigen::Ref< Eigen::RowVectorXd >
 < Alias to Eigen type RowVectorXd.
 
using RowVectorStridedRef = Eigen::Ref< Eigen::RowVectorXd, 0, Eigen::InnerStride<> >
 < Alias to Eigen type Ref<RowVectorXd>.
 
using RowVectorConstRef = Eigen::Ref< const Eigen::RowVectorXd >
 < Alias to Eigen type Ref<RowVectorXd>.
 
using RowVectorMap = Eigen::Map< Eigen::RowVectorXd >
 < Alias to Eigen type Ref<const RowVectorXd>.
 
using RowVectorConstMap = Eigen::Map< const Eigen::RowVectorXd >
 < Alias to Eigen type Map<VectorXd>.
 
using Matrix = Eigen::MatrixXd
 Alias to Eigen type MatrixXd.
 
using MatrixRef = Eigen::Ref< Eigen::MatrixXd >
 Alias to Eigen type Ref<MatrixXd>. More...
 
using MatrixConstRef = Eigen::Ref< const Eigen::MatrixXd >
 Alias to Eigen type Ref<const MatrixXd>. More...
 
using MatrixMap = Eigen::Map< Eigen::MatrixXd >
 Alias to Eigen type Map<MatrixXd>. More...
 
using MatrixConstMap = Eigen::Map< const Eigen::MatrixXd >
 Alias to Eigen type Map<const MatrixXd>. More...
 
using VectorXd = Eigen::VectorXd
 Alias to Eigen type Eigen::VectorXd.
 
using VectorXi = Eigen::VectorXi
 Alias to Eigen type Eigen::VectorXd.
 
using VectorXdRef = Eigen::Ref< VectorXd >
 Alias to Eigen type Eigen::Ref<VectorXd>.
 
using VectorXiRef = Eigen::Ref< VectorXi >
 Alias to Eigen type Eigen::Ref<VectorXi>.
 
using VectorXdConstRef = Eigen::Ref< const VectorXd >
 Alias to Eigen type Eigen::Ref<const VectorXd>.
 
using VectorXiConstRef = Eigen::Ref< const VectorXi >
 Alias to Eigen type Eigen::Ref<const VectorXi>.
 
using VectorXdMap = Eigen::Map< VectorXd >
 Alias to Eigen type Eigen::Map<VectorXd>.
 
using VectorXiMap = Eigen::Map< VectorXi >
 Alias to Eigen type Eigen::Map<VectorXi>.
 
using VectorXdConstMap = Eigen::Map< const VectorXd >
 Alias to Eigen type Eigen::Map<const VectorXd>.
 
using VectorXiConstMap = Eigen::Map< const VectorXi >
 Alias to Eigen type Eigen::Map<const VectorXi>.
 
using MatrixXd = Eigen::MatrixXd
 Alias to Eigen type Eigen::MatrixXd.
 
using MatrixXi = Eigen::MatrixXi
 Alias to Eigen type Eigen::MatrixXd.
 
using MatrixXdRef = Eigen::Ref< MatrixXd >
 Alias to Eigen type Eigen::Ref<MatrixXd>.
 
using MatrixXiRef = Eigen::Ref< MatrixXi >
 Alias to Eigen type Eigen::Ref<MatrixXi>.
 
using MatrixXdConstRef = Eigen::Ref< const MatrixXd >
 Alias to Eigen type Eigen::Ref<const MatrixXd>.
 
using MatrixXiConstRef = Eigen::Ref< const MatrixXi >
 Alias to Eigen type Eigen::Ref<const MatrixXi>.
 
using MatrixXdMap = Eigen::Map< MatrixXd >
 Alias to Eigen type Eigen::Map<MatrixXd>.
 
using MatrixXiMap = Eigen::Map< MatrixXi >
 Alias to Eigen type Eigen::Map<MatrixXi>.
 
using MatrixXdConstMap = Eigen::Map< const MatrixXd >
 Alias to Eigen type Eigen::Map<const MatrixXd>.
 
using MatrixXiConstMap = Eigen::Map< const MatrixXi >
 Alias to Eigen type Eigen::Map<const MatrixXi>.
 
using PermutationMatrix = Eigen::PermutationMatrix< Eigen::Dynamic, Eigen::Dynamic >
 Define an alias to a permutation matrix type of the Eigen library.
 
using N_Vector = struct _generic_N_Vector *
 
using ODEFunction = std::function< int(double, VectorConstRef, VectorRef)>
 The function signature of the right-hand side function of a system of ordinary differential equations.
 
using ODEJacobian = std::function< int(double, VectorConstRef, MatrixRef)>
 The function signature of the Jacobian of the right-hand side function of a system of ordinary differential equations.
 
using CubicRoots = std::tuple< std::complex< double >, std::complex< double >, std::complex< double > >
 Define a type that describes the roots of a cubic equation.
 
using SquareRoots = std::tuple< double, double >
 Define a type that describes the roots of a square equation.
 
using NonlinearFunction = std::function< NonlinearResidual(VectorConstRef x)>
 A type that describes the functional signature of a non-linear residual function. More...
 
using ObjectiveFunction = std::function< ObjectiveResult(VectorConstRef x)>
 A type that describes the functional signature of an objective function. More...
 
using AqueousActivityModel = std::function< ChemicalScalar(const AqueousMixtureState &)>
 The signature of a function that calculates the ln activity coefficient of a neutral aqueous species. More...
 
using LiquidSpecies = FluidSpecies
 
using GaseousMixtureState = FluidMixtureState
 
using GaseousMixture = FluidMixture
 
using LiquidMixtureState = FluidMixtureState
 
using LiquidMixture = FluidMixture
 
using ChemicalModel = std::function< void(ChemicalModelResult &, Temperature, Pressure, VectorConstRef)>
 The signature of the chemical model function that calculates the chemical properties of the species in a chemical system.
 
using PhaseChemicalModelResult = PhaseChemicalModelResultBase< ChemicalScalarRef, ChemicalVectorRef >
 The chemical properties of the species in a phase.
 
using PhaseChemicalModelResultConst = PhaseChemicalModelResultBase< ChemicalScalarConstRef, ChemicalVectorConstRef >
 The chemical properties of the species in a phase (constant).
 
using PhaseChemicalModel = std::function< void(PhaseChemicalModelResult &, Temperature, Pressure, VectorConstRef)>
 The signature of the chemical model function that calculates the chemical properties of the species in a phase.
 
using PhaseThermoModelResult = PhaseThermoModelResultBase< ThermoVectorRef >
 The thermodynamic properties of the species in a phase.
 
using PhaseThermoModelResultConst = PhaseThermoModelResultBase< ThermoVectorConstRef >
 The thermodynamic properties of the species in a phase (constant).
 
using PhaseThermoModel = std::function< void(PhaseThermoModelResult &, Temperature, Pressure)>
 The signature of the chemical model function that calculates the thermodynamic properties of the species in a phase.
 
using ThermoModel = std::function< void(ThermoModelResult &, Temperature, Pressure)>
 The signature of the thermodynamic model function that calculates the standard thermodynamic properties of the species in a chemical system.
 
using GaseousSpeciesThermoParamsHKF = FluidSpeciesThermoParamsHKF
 
using LiquidSpeciesThermoParamsHKF = FluidSpeciesThermoParamsHKF
 
using GaseousSpeciesThermoData = FluidSpeciesThermoData
 
using LiquidSpeciesThermoData = FluidSpeciesThermoData
 

Enumerations

enum  PhaseType { Solid, Liquid, Gas, Plasma }
 A type to define the possible state of matter of a phase.
 
enum  GibbsHessian { Exact, ExactDiagonal, Approximation, ApproximationDiagonal }
 The options for the description of the Hessian of the Gibbs energy function. More...
 
enum  ODEStepMode { Adams, BDF }
 The linear multistep method to be used in ODESolver.
 
enum  ODEIterationMode { Functional, Newton }
 The type of nonlinear solver iteration to be used in ODESolver.
 
enum  KktMethod {
  PartialPivLU, FullPivLU, Nullspace, Rangespace,
  Automatic
}
 An enumeration of possible methods for the solution of a KKT equation. More...
 
enum  OptimumMethod {
  IpAction, IpActive, IpNewton, IpOpt,
  Karpov, Refiner, Simplex, ActNewton
}
 The method used for the optimisation calculationss.
 
enum  StepMode { Conservative, Aggressive }
 The available stepping modes for some optimization algorithms. More...
 
enum  StateOfMatter { Solid, Liquid, Gas, Plasma }
 A type to define the possible states of matter of a phase or substance.
 
enum  PhaseIdentificationMethod { None, VolumeMethod, IsothermalCompressibilityMethods, GibbsEnergyAndEquationOfStateMethod }
 Defines the enumeration of available phase identification methods.
 

Functions

auto amount (double value, Index nspecies, Index ispecies) -> ChemicalScalarBase< double, decltype(tr(unit(nspecies, ispecies)))>
 Return a ChemicalScalar representation of a mole amount of a species. More...
 
template<typename V , typename N >
auto operator+ (const ChemicalScalarBase< V, N > &l) -> ChemicalScalarBase< V, N >
 
template<typename V , typename N >
auto operator- (const ChemicalScalarBase< V, N > &l) -> ChemicalScalarBase< double, decltype(-l.ddn)>
 
template<typename VL , typename NL , typename VR , typename NR >
auto operator+ (const ChemicalScalarBase< VL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> ChemicalScalarBase< double, decltype(l.ddn+r.ddn)>
 
template<typename VL , typename NL , typename VR >
auto operator+ (const ChemicalScalarBase< VL, NL > &l, const ThermoScalarBase< VR > &r) -> ChemicalScalarBase< double, decltype(l.ddn)>
 
template<typename VL , typename VR , typename NR >
auto operator+ (const ThermoScalarBase< VL > &l, const ChemicalScalarBase< VR, NR > &r) -> decltype(r+l)
 
template<typename V , typename N >
auto operator+ (const ChemicalScalarBase< V, N > &l, double r) -> ChemicalScalarBase< double, decltype(l.ddn)>
 
template<typename V , typename N >
auto operator+ (double l, const ChemicalScalarBase< V, N > &r) -> decltype(r+l)
 
template<typename VL , typename NL , typename VR , typename NR >
auto operator- (const ChemicalScalarBase< VL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> ChemicalScalarBase< double, decltype(l.ddn - r.ddn)>
 
template<typename VL , typename NL , typename VR >
auto operator- (const ChemicalScalarBase< VL, NL > &l, const ThermoScalarBase< VR > &r) -> ChemicalScalarBase< double, decltype(l.ddn)>
 
template<typename VL , typename VR , typename NR >
auto operator- (const ThermoScalarBase< VL > &l, const ChemicalScalarBase< VR, NR > &r) -> ChemicalScalarBase< double, decltype(-r.ddn)>
 
template<typename V , typename N >
auto operator- (const ChemicalScalarBase< V, N > &l, double r) -> ChemicalScalarBase< double, decltype(l.ddn)>
 
template<typename V , typename N >
auto operator- (double l, const ChemicalScalarBase< V, N > &r) -> ChemicalScalarBase< double, decltype(-r.ddn)>
 
template<typename V , typename N >
auto operator* (double l, const ChemicalScalarBase< V, N > &r) -> ChemicalScalarBase< double, decltype(l *r.ddn)>
 
template<typename V , typename N >
auto operator* (const ChemicalScalarBase< V, N > &l, double r) -> decltype(r *l)
 
template<typename VL , typename VR , typename NR >
auto operator* (const ThermoScalarBase< VL > &l, const ChemicalScalarBase< VR, NR > &r) -> ChemicalScalarBase< double, decltype(l.val *r.ddn)>
 
template<typename VL , typename NL , typename VR >
auto operator* (const ChemicalScalarBase< VL, NL > &l, const ThermoScalarBase< VR > &r) -> decltype(r *l)
 
template<typename VL , typename NL , typename VR , typename NR >
auto operator* (const ChemicalScalarBase< VL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> ChemicalScalarBase< double, decltype(l.val *r.ddn+l.ddn *r.val)>
 
template<typename V , typename N >
auto operator/ (double l, const ChemicalScalarBase< V, N > &r) -> ChemicalScalarBase< double, decltype(double() *r.ddn)>
 
template<typename V , typename N >
auto operator/ (const ChemicalScalarBase< V, N > &l, double r) -> decltype((1.0/r) *l)
 
template<typename VL , typename VR , typename NR >
auto operator/ (const ThermoScalarBase< VL > &l, const ChemicalScalarBase< VR, NR > &r) -> ChemicalScalarBase< double, decltype(-(l.val *r.ddn) *double())>
 
template<typename VL , typename NL , typename VR >
auto operator/ (const ChemicalScalarBase< VL, NL > &l, const ThermoScalarBase< VR > &r) -> ChemicalScalarBase< double, decltype(l.ddn/r.val)>
 
template<typename VL , typename NL , typename VR , typename NR >
auto operator/ (const ChemicalScalarBase< VL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> ChemicalScalarBase< double, decltype((l.ddn *r.val - l.val *r.ddn) *double())>
 
template<typename VL , typename NL , typename VR , typename NR >
auto operator< (const ChemicalScalarBase< VL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> bool
 
template<typename V , typename N >
auto operator< (const ChemicalScalarBase< V, N > &l, double r) -> bool
 
template<typename V , typename N >
auto operator< (double l, const ChemicalScalarBase< V, N > &r) -> bool
 
template<typename VL , typename NL , typename VR , typename NR >
auto operator<= (const ChemicalScalarBase< VL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> bool
 
template<typename V , typename N >
auto operator<= (const ChemicalScalarBase< V, N > &l, double r) -> bool
 
template<typename V , typename N >
auto operator<= (double l, const ChemicalScalarBase< V, N > &r) -> bool
 
template<typename VL , typename NL , typename VR , typename NR >
auto operator> (const ChemicalScalarBase< VL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> bool
 
template<typename V , typename N >
auto operator> (const ChemicalScalarBase< V, N > &l, double r) -> bool
 
template<typename V , typename N >
auto operator> (double l, const ChemicalScalarBase< V, N > &r) -> bool
 
template<typename VL , typename NL , typename VR , typename NR >
auto operator>= (const ChemicalScalarBase< VL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> bool
 
template<typename V , typename N >
auto operator>= (const ChemicalScalarBase< V, N > &l, double r) -> bool
 
template<typename V , typename N >
auto operator>= (double l, const ChemicalScalarBase< V, N > &r) -> bool
 
template<typename VL , typename NL , typename VR , typename NR >
auto operator== (const ChemicalScalarBase< VL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> bool
 
template<typename V , typename N >
auto operator== (const ChemicalScalarBase< V, N > &l, double r) -> bool
 
template<typename V , typename N >
auto operator== (double l, const ChemicalScalarBase< V, N > &r) -> bool
 
template<typename VL , typename NL , typename VR , typename NR >
auto operator!= (const ChemicalScalarBase< VL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> bool
 
template<typename V , typename N >
auto operator!= (const ChemicalScalarBase< V, N > &l, double r) -> bool
 
template<typename V , typename N >
auto operator!= (double l, const ChemicalScalarBase< V, N > &r) -> bool
 
auto operator<< (std::ostream &out, const ChemicalScalar &scalar) -> std::ostream &
 
template<typename V , typename N >
auto abs (const ChemicalScalarBase< V, N > &l) -> ChemicalScalarBase< double, decltype(double() *l.ddn)>
 
template<typename V , typename N >
auto sqrt (const ChemicalScalarBase< V, N > &l) -> ChemicalScalarBase< double, decltype(double() *l.ddn)>
 
template<typename V , typename N >
auto pow (const ChemicalScalarBase< V, N > &l, double power) -> ChemicalScalarBase< double, decltype(double() *l.ddn)>
 
template<typename V , typename N >
auto exp (const ChemicalScalarBase< V, N > &l) -> ChemicalScalarBase< double, decltype(double() *l.ddn)>
 
template<typename V , typename N >
auto log (const ChemicalScalarBase< V, N > &l) -> ChemicalScalarBase< double, decltype(double() *l.ddn)>
 
template<typename V , typename N >
auto log10 (const ChemicalScalarBase< V, N > &l) -> decltype(log(l)/1.0)
 
template<typename V , typename T , typename P , typename N >
auto zeros (const ChemicalVectorBase< V, T, P, N > &v) -> ChemicalVectorBase< decltype(zeros(0)), decltype(zeros(0)), decltype(zeros(0)), decltype(zeros(0, 0))>
 Return a ChemicalVectorBase expression representing zeros with same dimension of given vector.
 
template<typename V , typename T , typename P , typename N >
auto ones (const ChemicalVectorBase< V, T, P, N > &v) -> ChemicalVectorBase< decltype(ones(0)), decltype(zeros(0)), decltype(zeros(0)), decltype(zeros(0, 0))>
 Return a ChemicalVectorBase expression representing ones with same dimension of given vector.
 
template<typename V , typename T , typename P , typename N >
auto operator<< (std::ostream &out, const ChemicalVectorBase< V, T, P, N > &r) -> std::ostream &
 
template<typename V , typename T , typename P , typename N >
auto operator+ (const ChemicalVectorBase< V, T, P, N > &r) -> ChemicalVectorBase< V, T, P, N >
 
template<typename V , typename T , typename P , typename N >
auto operator- (const ChemicalVectorBase< V, T, P, N > &r) -> ChemicalVectorBase< decltype(-r.val), decltype(-r.ddT), decltype(-r.ddP), decltype(-r.ddn)>
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator+ (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> ChemicalVectorBase< decltype(l.val+r.val), decltype(l.ddT+r.ddT), decltype(l.ddP+r.ddP), decltype(l.ddn+r.ddn)>
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR >
auto operator+ (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> ChemicalVectorBase< decltype(l.val+r.val), decltype(l.ddT+r.ddT), decltype(l.ddP+r.ddP), decltype(l.ddn)>
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR , typename NR >
auto operator+ (const ThermoVectorBase< VL, TL, PL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> decltype(r+l)
 
template<typename VL , typename TL , typename PL , typename NL , typename VR >
auto operator+ (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ThermoScalarBase< VR > &r) -> ChemicalVectorBase< decltype(l.val+r.val *ones(l.size())), decltype(l.ddT+r.ddT *ones(l.size())), decltype(l.ddP+r.ddP *ones(l.size())), decltype(l.ddn)>
 
template<typename VL , typename VR , typename TR , typename PR , typename NR >
auto operator+ (const ThermoScalarBase< VL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> decltype(r+l)
 
template<typename V , typename T , typename P , typename N , typename Derived >
auto operator+ (const ChemicalVectorBase< V, T, P, N > &l, const Eigen::MatrixBase< Derived > &r) -> ChemicalVectorBase< decltype(l.val+r), T, P, N >
 
template<typename V , typename T , typename P , typename N , typename Derived >
auto operator+ (const Eigen::MatrixBase< Derived > &l, const ChemicalVectorBase< V, T, P, N > &r) -> decltype(r+l)
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator- (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> ChemicalVectorBase< decltype(l.val - r.val), decltype(l.ddT - r.ddT), decltype(l.ddP - r.ddP), decltype(l.ddn - r.ddn)>
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR >
auto operator- (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> ChemicalVectorBase< decltype(l.val - r.val), decltype(l.ddT - r.ddT), decltype(l.ddP - r.ddP), decltype(l.ddn)>
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR , typename NR >
auto operator- (const ThermoVectorBase< VL, TL, PL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> decltype(-(r - l))
 
template<typename VL , typename TL , typename PL , typename NL , typename VR >
auto operator- (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ThermoScalarBase< VR > &r) -> ChemicalVectorBase< decltype(l.val - r.val *ones(l.size())), decltype(l.ddT - r.ddT *ones(l.size())), decltype(l.ddP - r.ddP *ones(l.size())), decltype(l.ddn)>
 
template<typename VL , typename VR , typename TR , typename PR , typename NR >
auto operator- (const ThermoScalarBase< VL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> decltype(r+l)
 
template<typename V , typename T , typename P , typename N , typename Derived >
auto operator- (const ChemicalVectorBase< V, T, P, N > &l, const Eigen::MatrixBase< Derived > &r) -> ChemicalVectorBase< decltype(l.val - r), T, P, N >
 
template<typename V , typename T , typename P , typename N , typename Derived >
auto operator- (const Eigen::MatrixBase< Derived > &l, const ChemicalVectorBase< V, T, P, N > &r) -> decltype(-(r - l))
 
template<typename V , typename T , typename P , typename N >
auto operator* (double l, const ChemicalVectorBase< V, T, P, N > &r) -> ChemicalVectorBase< decltype(l *r.val), decltype(l *r.ddT), decltype(l *r.ddP), decltype(l *r.ddn)>
 
template<typename V , typename T , typename P , typename N >
auto operator* (const ChemicalVectorBase< V, T, P, N > &l, double r) -> decltype(r *l)
 
template<typename VL , typename VR , typename T , typename P , typename N >
auto operator* (const ThermoScalarBase< VL > &l, const ChemicalVectorBase< VR, T, P, N > &r) -> ChemicalVectorBase< decltype(l.val *r.val), decltype(l.val *r.ddT+l.ddT *r.val), decltype(l.val *r.ddP+l.ddP *r.val), decltype(l.val *r.ddn)>
 
template<typename VL , typename VR , typename T , typename P , typename N >
auto operator* (const ChemicalVectorBase< VL, T, P, N > &l, const ThermoScalarBase< VR > &r) -> decltype(r *l)
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename NR >
auto operator* (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> ChemicalVectorBase< decltype(l.val *r.val), decltype(l.val *r.ddT+l.ddT *r.val), decltype(l.val *r.ddP+l.ddP *r.val), decltype(l.val *r.ddn+l.ddn *r.val)>
 
template<typename VL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator* (const ChemicalScalarBase< VL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> decltype(r *l)
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator% (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> ChemicalVectorBase< decltype(diag(l.val) *r.val), decltype(diag(l.val) *r.ddT+diag(r.val) *l.ddT), decltype(diag(l.val) *r.ddP+diag(r.val) *l.ddP), decltype(diag(l.val) *r.ddn+diag(r.val) *l.ddn)>
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR , typename NR >
auto operator% (const ThermoVectorBase< VL, TL, PL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> ChemicalVectorBase< decltype(diag(l.val) *r.val), decltype(diag(l.val) *r.ddT+diag(r.val) *l.ddT), decltype(diag(l.val) *r.ddP+diag(r.val) *l.ddP), decltype(diag(l.val) *r.ddn)>
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR >
auto operator% (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> decltype(r % l)
 
template<typename V , typename T , typename P , typename N , typename Derived >
auto operator% (const Eigen::MatrixBase< Derived > &l, const ChemicalVectorBase< V, T, P, N > &r) -> ChemicalVectorBase< decltype(diag(l) *r.val), decltype(diag(l) *r.ddT), decltype(diag(l) *r.ddP), decltype(diag(l) *r.ddn)>
 
template<typename VL , typename TL , typename PL , typename NL , typename Derived >
auto operator% (const ChemicalVectorBase< VL, TL, PL, NL > &l, const Eigen::MatrixBase< Derived > &r) -> decltype(r % l)
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator/ (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> ChemicalVector
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator/ (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> ChemicalVector
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename NR >
auto operator/ (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalScalarBase< VR, NR > &r) -> ChemicalVector
 
template<typename VL , typename VR , typename T , typename P , typename N >
auto operator/ (const ChemicalVectorBase< VL, T, P, N > &l, const ThermoScalarBase< VR > &r) -> ChemicalVectorBase< decltype(l.val/r.val), decltype(double() *(l.ddT *r.val - l.val *r.ddT)), decltype(double() *(l.ddP *r.val - l.val *r.ddP)), decltype(double() *(l.ddn *r.val))>
 
template<typename V , typename T , typename P , typename N >
auto operator/ (const ChemicalVectorBase< V, T, P, N > &l, double r) -> decltype((1.0/r) *l)
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator< (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> bool
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator<= (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> bool
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator> (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> bool
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator>= (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> bool
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator== (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> bool
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto operator!= (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> bool
 
template<typename V , typename T , typename P , typename N >
auto row (ChemicalVectorBase< V, T, P, N > &vec, Index irow) -> ChemicalScalarBase< decltype(vec.val[irow]), decltype(vec.ddn.row(irow))>
 Return a ChemicalScalarBase with reference to the chemical scalar in a given row.
 
template<typename V , typename T , typename P , typename N >
auto row (const ChemicalVectorBase< V, T, P, N > &vec, Index irow) -> ChemicalScalarBase< decltype(vec.val[irow]), decltype(vec.ddn.row(irow))>
 Return a ChemicalScalarBase with const reference to the chemical scalar in a given row.
 
template<typename V , typename T , typename P , typename N >
auto row (ChemicalVectorBase< V, T, P, N > &vec, Index irow, Index icol, Index ncols) -> ChemicalScalarBase< decltype(vec.val[irow]), decltype(vec.ddn.row(irow).segment(icol, ncols))>
 Return a reference of a row of this ChemicalVectorBase instance.
 
template<typename V , typename T , typename P , typename N >
auto row (const ChemicalVectorBase< V, T, P, N > &vec, Index irow, Index icol, Index ncols) -> ChemicalScalarBase< decltype(vec.val[irow]), decltype(vec.ddn.row(irow).segment(icol, ncols))>
 Return a const reference of a row of this ChemicalVectorBase instance.
 
template<typename V , typename T , typename P , typename N >
auto rows (ChemicalVectorBase< V, T, P, N > &vec, Index irow, Index nrows) -> ChemicalVectorBase< decltype(rows(vec.val, irow, nrows)), decltype(rows(vec.ddT, irow, nrows)), decltype(rows(vec.ddP, irow, nrows)), decltype(rows(vec.ddn, irow, nrows))>
 Return a reference of a sequence of rows of this ChemicalVectorBase instance.
 
template<typename V , typename T , typename P , typename N >
auto rows (const ChemicalVectorBase< V, T, P, N > &vec, Index irow, Index nrows) -> ChemicalVectorBase< decltype(rows(vec.val, irow, nrows)), decltype(rows(vec.ddT, irow, nrows)), decltype(rows(vec.ddP, irow, nrows)), decltype(rows(vec.ddn, irow, nrows))>
 Return a const reference of a sequence of rows of this ChemicalVectorBase instance.
 
template<typename V , typename T , typename P , typename N >
auto rows (ChemicalVectorBase< V, T, P, N > &vec, Index irow, Index icol, Index nrows, Index ncols) -> ChemicalVectorBase< decltype(rows(vec.val, irow, nrows)), decltype(rows(vec.ddT, irow, nrows)), decltype(rows(vec.ddP, irow, nrows)), decltype(block(vec.ddn, irow, icol, nrows, ncols))>
 Return a reference of a sequence of rows of this ChemicalVectorBase instance.
 
template<typename V , typename T , typename P , typename N >
auto rows (const ChemicalVectorBase< V, T, P, N > &vec, Index irow, Index icol, Index nrows, Index ncols) -> ChemicalVectorBase< decltype(rows(vec.val, irow, nrows)), decltype(rows(vec.ddT, irow, nrows)), decltype(rows(vec.ddP, irow, nrows)), decltype(block(vec.ddn, irow, icol, nrows, ncols))>
 Return a const reference of a sequence of rows of this ChemicalVectorBase instance.
 
template<typename V , typename T , typename P , typename N >
auto rows (ChemicalVectorBase< V, T, P, N > &vec, const Indices &irows) -> ChemicalVectorBase< decltype(rows(vec.val, irows)), decltype(rows(vec.ddT, irows)), decltype(rows(vec.ddP, irows)), decltype(rows(vec.ddn, irows))>
 Return a reference of some rows of this ChemicalVectorBase instance.
 
template<typename V , typename T , typename P , typename N >
auto rows (const ChemicalVectorBase< V, T, P, N > &vec, const Indices &irows) -> ChemicalVectorBase< decltype(rows(vec.val, irows)), decltype(rows(vec.ddT, irows)), decltype(rows(vec.ddP, irows)), decltype(rows(vec.ddn, irows))>
 Return a const reference of some rows of this ChemicalVectorBase instance.
 
template<typename V , typename T , typename P , typename N >
auto rows (ChemicalVectorBase< V, T, P, N > &vec, const Indices &irows, const Indices &icols) -> ChemicalVectorBase< decltype(rows(vec.val, irows)), decltype(rows(vec.ddT, irows)), decltype(rows(vec.ddP, irows)), decltype(submatrix(vec.ddn, irows, icols))>
 Return a reference of some rows and cols of this ChemicalVectorBase instance.
 
template<typename V , typename T , typename P , typename N >
auto rows (const ChemicalVectorBase< V, T, P, N > &vec, const Indices &irows, const Indices &icols) -> ChemicalVectorBase< decltype(rows(vec.val, irows)), decltype(rows(vec.ddT, irows)), decltype(rows(vec.ddP, irows)), decltype(submatrix(vec.ddn, irows, icols))>
 Return a const reference of some rows and cols of this ChemicalVectorBase instance.
 
template<typename V , typename T , typename P , typename N >
auto abs (const ChemicalVectorBase< V, T, P, N > &l) -> ChemicalVector
 
template<typename V , typename T , typename P , typename N >
auto sqrt (const ChemicalVectorBase< V, T, P, N > &l) -> ChemicalVector
 
template<typename V , typename T , typename P , typename N >
auto pow (const ChemicalVectorBase< V, T, P, N > &l, double power) -> ChemicalVector
 
template<typename V , typename T , typename P , typename N >
auto exp (const ChemicalVectorBase< V, T, P, N > &l) -> ChemicalVector
 
template<typename V , typename T , typename P , typename N >
auto log (const ChemicalVectorBase< V, T, P, N > &l) -> ChemicalVector
 
template<typename V , typename T , typename P , typename N >
auto log10 (const ChemicalVectorBase< V, T, P, N > &l) -> decltype(log(l)/double())
 
template<typename V , typename T , typename P , typename N >
auto min (const ChemicalVectorBase< V, T, P, N > &r) -> double
 
template<typename V , typename T , typename P , typename N >
auto max (const ChemicalVectorBase< V, T, P, N > &r) -> double
 
template<typename V , typename T , typename P , typename N >
auto sum (const ChemicalVectorBase< V, T, P, N > &r) -> ChemicalScalarBase< double, decltype(r.ddn.colwise().sum())>
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto dot (const ChemicalVectorBase< VL, TL, PL, NL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> ChemicalScalarBase< double, decltype(tr(l.val) *r.ddn+tr(r.val) *l.ddn)>
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto dot (const ThermoVectorBase< VL, TL, PL > &l, const ChemicalVectorBase< VR, TR, PR, NR > &r) -> ChemicalScalarBase< double, decltype(tr(l.val) *r.ddn)>
 
template<typename VL , typename TL , typename PL , typename NL , typename VR , typename TR , typename PR , typename NR >
auto dot (const ChemicalVectorBase< VR, TR, PR, NR > &l, const ThermoVectorBase< VL, TL, PL > &r) -> decltype(dot(r, l))
 
template<typename V , typename T , typename P , typename N , typename Derived >
auto dot (const Eigen::MatrixBase< Derived > &l, const ChemicalVectorBase< V, T, P, N > &r) -> ChemicalScalarBase< double, decltype(tr(l) *r.ddn)>
 
template<typename V , typename T , typename P , typename N , typename Derived >
auto dot (const ChemicalVectorBase< V, T, P, N > &l, const Eigen::MatrixBase< Derived > &r) -> decltype(dot(r, l))
 
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.
 
auto elements () -> std::vector< std::string >
 Return a vector of all known 116 chemical elements.
 
auto elements (std::string formula) -> std::map< std::string, double >
 Determine. More...
 
auto atomicMass (std::string element) -> double
 Return the atomic mass of a chemical element (in units of kg/mol). More...
 
auto molarMass (const std::map< std::string, double > &compound) -> double
 Calculate the molar mass of a chemical compound (in units of kg/mol). More...
 
auto molarMass (std::string formula) -> double
 Calculate the molar mass of a chemical compound (in units of kg/mol). More...
 
auto charge (const std::string &formula) -> double
 Extract the electrical charge of a chemical formula. More...
 
auto interpolate (const std::vector< double > &temperatures, const std::vector< double > &pressures, const std::vector< ThermoScalar > &scalars) -> ThermoScalarFunction
 
auto interpolate (const std::vector< double > &temperatures, const std::vector< double > &pressures, const ThermoScalarFunction &f) -> ThermoScalarFunction
 
auto interpolate (const std::vector< double > &temperatures, const std::vector< double > &pressures, const std::vector< ThermoScalarFunction > &fs) -> ThermoVectorFunction
 
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...
 
template<typename Ret , typename... Args>
auto memoize (std::function< Ret(Args...)> f) -> std::function< Ret(Args...)>
 
template<typename Ret , typename... Args>
auto memoizeLast (std::function< Ret(Args...)> f) -> std::function< Ret(Args...)>
 
template<typename Ret , typename... Args>
auto memoizeLastPtr (std::function< Ret(Args...)> f) -> std::shared_ptr< std::function< Ret(Args...)>>
 
template<typename Ret , typename... Args>
auto dereference (const std::shared_ptr< std::function< Ret(Args...)>> &f) -> std::function< Ret(Args...)>
 
auto parseReaction (std::string equation) -> std::map< std::string, double >
 Parse a reaction equation.
 
auto operator<< (std::ostream &out, const ReactionEquation &equation) -> std::ostream &
 Output a ReactionEquation instance.
 
auto begin (const Reaktoro::ReactionEquation &equation) -> decltype(equation.equation().begin())
 Return begin const iterator of a ReactionEquation instance.
 
auto begin (Reaktoro::ReactionEquation &equation) -> decltype(equation.equation().begin())
 Return begin iterator of a ReactionEquation instance.
 
auto end (const Reaktoro::ReactionEquation &equation) -> decltype(equation.equation().end())
 Return end const iterator of a ReactionEquation instance.
 
auto end (Reaktoro::ReactionEquation &equation) -> decltype(equation.equation().end())
 Return end iterator of a ReactionEquation instance.
 
template<typename T >
auto index (const T &value, const std::vector< T > &values) -> Index
 Find the index of a value in a container of values.
 
auto index (const std::string &word, const std::vector< std::string > &strings) -> Index
 Find the index of the word in the container of strings.
 
template<typename NamedValues >
auto index (const std::string &name, const NamedValues &values) -> Index
 Return the index of an entry in a container.
 
template<typename NamedValue , typename NamedValues >
auto index (const NamedValue &value, const NamedValues &values) -> Index
 Return the index of an entry in a container.
 
template<typename Names , typename NamedValues >
auto indexAny (const Names &names, const NamedValues &values) -> Index
 Return the index of the first entry in a container of named values with any of the given names.
 
template<typename NamedValues >
auto indices (const std::vector< std::string > &names, const NamedValues &values) -> Indices
 Return the indices of some entries in a container.
 
template<typename NamedValues >
auto indices (const NamedValues &subvalues, const NamedValues &values) -> Indices
 Return the indices of some entries in a container.
 
auto indices (const std::vector< std::string > &words, const std::vector< std::string > &strings) -> Indices
 Find the indices of the words in the container of strings
 
template<typename Container >
auto contained (const Container &values1, const Container &values2) -> bool
 Check if a value is contained in a container of values. More...
 
template<typename NamedValues >
auto contained (const std::string &name, const NamedValues &values) -> bool
 Return true if a named value is in a set of values.
 
template<typename T >
auto unify (const std::vector< T > &values1, const std::vector< T > &values2) -> std::vector< T >
 Determine the union of two containers.
 
template<typename T >
auto intersect (const std::vector< T > &values1, const std::vector< T > &values2) -> std::vector< T >
 Determine the intersection of two containers.
 
template<typename T >
auto difference (const std::vector< T > &values1, const std::vector< T > &values2) -> std::vector< T >
 Determine the difference of two containers.
 
template<typename T >
auto emptyIntersection (const std::vector< T > &values1, const std::vector< T > &values2) -> bool
 Check if two containers have empty intersection.
 
template<typename T >
auto emptyDifference (const std::vector< T > &values1, const std::vector< T > &values2) -> bool
 Check if two containers have empty difference.
 
template<typename Container >
auto equal (const Container &values1, const Container &values2) -> bool
 Check if two containers are equal.
 
template<typename Container >
auto isunique (Container values) -> bool
 Check if a container has unique values.
 
template<typename T >
auto unique (std::vector< T > values) -> std::vector< T >
 Create a container with unique values from another.
 
template<typename T >
auto range (T first, T last, T step) -> std::vector< T >
 Return a range of values. More...
 
template<typename T >
auto range (T first, T last) -> std::vector< T >
 Return a range of values with unit step. More...
 
template<typename T >
auto range (T last) -> std::vector< T >
 Return a range of values starting from zero and increasing by one. More...
 
template<typename T , typename Predicate >
auto filter (const std::vector< T > &values, Predicate predicate) -> std::vector< T >
 Filter the values that pass on the predicate.
 
template<typename T , typename Predicate >
auto remove (const std::vector< T > &values, Predicate predicate) -> std::vector< T >
 Remove the values that pass on the predicate.
 
template<typename T >
auto extract (const std::vector< T > &values, const Indices &indices) -> std::vector< T >
 Extract values from a vector given a list of indices. More...
 
template<typename Container >
auto minValue (const Container &values) -> typename Container::value_type
 Return the minimum value in a STL compatible container.
 
template<typename Container >
auto maxValue (const Container &values) -> typename Container::value_type
 Return the maximum value in a STL compatible container.
 
template<typename Container , typename = typename std::enable_if<!std::is_same<typename Container::value_type, std::string>::value>::type>
auto contained (const typename Container::value_type &value, const Container &values) -> bool
 
 StringList::operator const std::vector< std::string > & () const
 
auto begin (const StringList &strings) -> decltype(strings.strings().begin())
 Return begin const iterator of a StringList instance.
 
auto begin (StringList &strings) -> decltype(strings.strings().begin())
 Return begin iterator of a StringList instance.
 
auto end (const StringList &strings) -> decltype(strings.strings().end())
 Return end const iterator of a StringList instance.
 
auto end (StringList &strings) -> decltype(strings.strings().end())
 Return end iterator of a StringList instance.
 
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 leftTrim (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 rightTrim (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 (const std::string &str, const std::string &delims, std::function< std::string &(std::string &)> transform) -> std::vector< std::string >
 Split the string on every occurrence of the specified delimiters.
 
auto split (const std::string &str, const std::string &delims=" ") -> std::vector< std::string >
 Split the string on every occurrence of the specified delimiters.
 
auto splitrim (const std::string &str, const std::string &delims=" ") -> std::vector< std::string >
 Split the string on every occurrence of the specified delimiters and trim each word.
 
auto join (const std::vector< std::string > &strs, std::string delim=" ") -> std::string
 Join several strings into one.
 
auto tofloat (const std::string &str) -> double
 Convert the string into a floating point number.
 
auto tofloats (const std::string &str, const std::string &delims=" ") -> std::vector< double >
 Convert the string into a list of floating point numbers.
 
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 >
 
template<typename V >
auto operator+ (const ThermoScalarBase< V > &l) -> ThermoScalarBase< double >
 
template<typename VL , typename VR >
auto operator+ (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &r) -> ThermoScalarBase< double >
 
template<typename V >
auto operator+ (double l, const ThermoScalarBase< V > &r) -> ThermoScalarBase< double >
 
template<typename V >
auto operator+ (const ThermoScalarBase< V > &l, double r) -> ThermoScalarBase< double >
 
template<typename V >
auto operator- (const ThermoScalarBase< V > &l) -> ThermoScalarBase< double >
 
template<typename VL , typename VR >
auto operator- (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &r) -> ThermoScalarBase< double >
 
template<typename V >
auto operator- (const ThermoScalarBase< V > &l, double r) -> ThermoScalarBase< double >
 
template<typename V >
auto operator- (double l, const ThermoScalarBase< V > &r) -> ThermoScalarBase< double >
 
template<typename VL , typename VR >
auto operator* (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &r) -> ThermoScalarBase< double >
 
template<typename V >
auto operator* (double l, const ThermoScalarBase< V > &r) -> ThermoScalarBase< double >
 
template<typename V >
auto operator* (const ThermoScalarBase< V > &l, double r) -> ThermoScalarBase< double >
 
template<typename VL , typename VR >
auto operator/ (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &r) -> ThermoScalarBase< double >
 
template<typename V >
auto operator/ (double l, const ThermoScalarBase< V > &r) -> ThermoScalarBase< double >
 
template<typename V >
auto operator/ (const ThermoScalarBase< V > &l, double r) -> ThermoScalarBase< double >
 
template<typename VL , typename VR >
auto operator< (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &r) -> bool
 
template<typename VL , typename VR >
auto operator<= (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &r) -> bool
 
template<typename VL , typename VR >
auto operator> (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &r) -> bool
 
template<typename VL , typename VR >
auto operator>= (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &r) -> bool
 
template<typename VL , typename VR >
auto operator== (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &r) -> bool
 
template<typename VL , typename VR >
auto operator!= (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &r) -> bool
 
template<typename V >
auto operator< (double l, const ThermoScalarBase< V > &r) -> bool
 
template<typename V >
auto operator< (const ThermoScalarBase< V > &l, double r) -> bool
 
template<typename V >
auto operator<= (double l, const ThermoScalarBase< V > &r) -> bool
 
template<typename V >
auto operator<= (const ThermoScalarBase< V > &l, double r) -> bool
 
template<typename V >
auto operator> (double l, const ThermoScalarBase< V > &r) -> bool
 
template<typename V >
auto operator> (const ThermoScalarBase< V > &l, double r) -> bool
 
template<typename V >
auto operator>= (double l, const ThermoScalarBase< V > &r) -> bool
 
template<typename V >
auto operator>= (const ThermoScalarBase< V > &l, double r) -> bool
 
template<typename V >
auto operator== (double l, const ThermoScalarBase< V > &r) -> bool
 
template<typename V >
auto operator== (const ThermoScalarBase< V > &l, double r) -> bool
 
template<typename V >
auto operator!= (double l, const ThermoScalarBase< V > &r) -> bool
 
template<typename V >
auto operator!= (const ThermoScalarBase< V > &l, double r) -> bool
 
template<typename V >
auto operator<< (std::ostream &out, const ThermoScalarBase< V > &scalar) -> std::ostream &
 
template<typename V >
auto abs (const ThermoScalarBase< V > &l) -> ThermoScalarBase< double >
 
template<typename V >
auto sqrt (const ThermoScalarBase< V > &l) -> ThermoScalarBase< double >
 
template<typename V >
auto pow (const ThermoScalarBase< V > &l, double power) -> ThermoScalarBase< double >
 
template<typename VL , typename VR >
auto pow (const ThermoScalarBase< VL > &l, const ThermoScalarBase< VR > &power) -> ThermoScalarBase< double >
 
template<typename V >
auto exp (const ThermoScalarBase< V > &l) -> ThermoScalarBase< double >
 
template<typename V >
auto log (const ThermoScalarBase< V > &l) -> ThermoScalarBase< double >
 
template<typename V >
auto log10 (const ThermoScalarBase< V > &l) -> ThermoScalarBase< double >
 
template<typename V , typename T , typename P >
auto zeros (const ThermoVectorBase< V, T, P > &v) -> ThermoVectorBase< decltype(zeros(0)), decltype(zeros(0)), decltype(zeros(0))>
 Return a ThermoVectorBase expression representing zeros with same dimension of given vector.
 
template<typename V , typename T , typename P >
auto ones (const ThermoVectorBase< V, T, P > &v) -> ThermoVectorBase< decltype(ones(0)), decltype(zeros(0)), decltype(zeros(0))>
 Return a ThermoVectorBase expression representing ones with same dimension of given vector.
 
template<typename V , typename T , typename P >
auto operator<< (std::ostream &out, const ThermoVectorBase< V, T, P > &a) -> std::ostream &
 
template<typename V , typename T , typename P >
auto operator+ (const ThermoVectorBase< V, T, P > &l) -> ThermoVectorBase< V, T, P >
 
template<typename V , typename T , typename P >
auto operator- (const ThermoVectorBase< V, T, P > &l) -> ThermoVectorBase< decltype(-l.val), decltype(-l.ddT), decltype(-l.ddP)>
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator+ (const ThermoVectorBase< VL, TL, PL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> ThermoVectorBase< decltype(l.val+r.val), decltype(l.ddT+r.ddT), decltype(l.ddP+r.ddP)>
 
template<typename V , typename T , typename P >
auto operator+ (const ThermoVectorBase< V, T, P > &l, VectorConstRef r) -> ThermoVectorBase< decltype(l.val+r), T, P >
 
template<typename V , typename T , typename P >
auto operator+ (VectorConstRef l, const ThermoVectorBase< V, T, P > &r) -> decltype(r+l)
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator- (const ThermoVectorBase< VL, TL, PL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> ThermoVectorBase< decltype(l.val - r.val), decltype(l.ddT - r.ddT), decltype(l.ddP - r.ddP)>
 
template<typename V , typename T , typename P >
auto operator- (const ThermoVectorBase< V, T, P > &l, VectorConstRef r) -> ThermoVectorBase< decltype(l.val - r), T, P >
 
template<typename V , typename T , typename P >
auto operator- (VectorConstRef l, const ThermoVectorBase< V, T, P > &r) -> decltype(-(r - l))
 
template<typename V , typename T , typename P >
auto operator* (double l, const ThermoVectorBase< V, T, P > &r) -> ThermoVectorBase< decltype(l *r.val), decltype(l *r.ddT), decltype(l *r.ddP)>
 
template<typename V , typename T , typename P >
auto operator* (const ThermoVectorBase< V, T, P > &l, double r) -> decltype(r *l)
 
template<typename VL , typename V , typename T , typename P >
auto operator* (const ThermoScalarBase< VL > &l, const ThermoVectorBase< V, T, P > &r) -> ThermoVectorBase< decltype(l.val *r.val), decltype(l.val *r.ddT+l.ddT *r.val), decltype(l.val *r.ddP+l.ddP *r.val)>
 
template<typename V , typename T , typename P , typename VR >
auto operator* (const ThermoVectorBase< V, T, P > &l, const ThermoScalarBase< VR > &r) -> decltype(r *l)
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator% (const ThermoVectorBase< VL, TL, PL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> ThermoVectorBase< decltype(diag(l.val) *r.val), decltype(diag(l.val) *r.ddT+diag(r.val) *l.ddT), decltype(diag(l.val) *r.ddP+diag(r.val) *l.ddP)>
 
template<typename V , typename T , typename P >
auto operator% (VectorConstRef l, const ThermoVectorBase< V, T, P > &r) -> ThermoVectorBase< decltype(diag(l) *r.val), decltype(diag(l) *r.ddT), decltype(diag(l) *r.ddP)>
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator% (const ThermoVectorBase< VL, TL, PL > &l, VectorConstRef r) -> decltype(r % l)
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator/ (const ThermoVectorBase< VL, TL, PL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> ThermoVector
 
template<typename V , typename T , typename P , typename VR >
auto operator/ (const ThermoVectorBase< V, T, P > &l, const ThermoScalarBase< VR > &r) -> ThermoVectorBase< decltype(l.val/r.val), decltype(double() *(l.ddT *r.val - l.val *r.ddT)), decltype(double() *(l.ddP *r.val - l.val *r.ddP))>
 
template<typename V , typename T , typename P >
auto operator/ (const ThermoVectorBase< V, T, P > &l, double r) -> decltype((1.0/r) *l)
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator< (const ThermoVectorBase< VL, TL, PL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> bool
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator<= (const ThermoVectorBase< VL, TL, PL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> bool
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator> (const ThermoVectorBase< VL, TL, PL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> bool
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator>= (const ThermoVectorBase< VL, TL, PL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> bool
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator== (const ThermoVectorBase< VL, TL, PL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> bool
 
template<typename VL , typename TL , typename PL , typename VR , typename TR , typename PR >
auto operator!= (const ThermoVectorBase< VL, TL, PL > &l, const ThermoVectorBase< VR, TR, PR > &r) -> bool
 
template<typename V , typename T , typename P >
auto row (ThermoVectorBase< V, T, P > &vec, Index irow) -> ThermoScalarBase< decltype(vec.val[irow])>
 Return a reference of a row of this ThermoVectorBase instance.
 
template<typename V , typename T , typename P >
auto row (const ThermoVectorBase< V, T, P > &vec, Index irow) -> ThermoScalarBase< decltype(vec.val[irow])>
 Return a const reference of a row of this ThermoVectorBase instance.
 
template<typename V , typename T , typename P >
auto rows (ThermoVectorBase< V, T, P > &vec, Index irow, Index nrows) -> ThermoVectorBase< decltype(vec.val.segment(irow, nrows)), decltype(vec.ddT.segment(irow, nrows)), decltype(vec.ddP.segment(irow, nrows))>
 Return a reference of a sequence of rows of this ThermoVectorBase instance.
 
template<typename V , typename T , typename P >
auto rows (const ThermoVectorBase< V, T, P > &vec, Index irow, Index nrows) -> ThermoVectorBase< decltype(vec.val.segment(irow, nrows)), decltype(vec.ddT.segment(irow, nrows)), decltype(vec.ddP.segment(irow, nrows))>
 Return a const reference of a sequence of rows of this ThermoVectorBase instance.
 
template<typename V , typename T , typename P >
auto rows (ThermoVectorBase< V, T, P > &vec, const Indices &irows) -> ThermoVectorBase< decltype(Reaktoro::rows(vec.val, irows)), decltype(Reaktoro::rows(vec.ddT, irows)), decltype(Reaktoro::rows(vec.ddP, irows))>
 Return a reference of some rows of this ThermoVectorBase instance.
 
template<typename V , typename T , typename P >
auto rows (const ThermoVectorBase< V, T, P > &vec, const Indices &irows) -> ThermoVectorBase< decltype(Reaktoro::rows(vec.val, irows)), decltype(Reaktoro::rows(vec.ddT, irows)), decltype(Reaktoro::rows(vec.ddP, irows))>
 Return a const reference of some rows of this ThermoVectorBase instance.
 
template<typename V , typename T , typename P >
auto abs (const ThermoVectorBase< V, T, P > &l) -> ThermoVector
 
template<typename V , typename T , typename P >
auto sqrt (const ThermoVectorBase< V, T, P > &l) -> ThermoVector
 
template<typename V , typename T , typename P >
auto pow (const ThermoVectorBase< V, T, P > &l, double power) -> ThermoVector
 
template<typename V , typename T , typename P >
auto exp (const ThermoVectorBase< V, T, P > &l) -> ThermoVector
 
template<typename V , typename T , typename P >
auto log (const ThermoVectorBase< V, T, P > &l) -> ThermoVector
 
template<typename V , typename T , typename P >
auto log10 (const ThermoVectorBase< V, T, P > &l) -> ThermoVector
 
auto time () -> Time
 Return the time point now. More...
 
auto elapsed (const Time &end, const Time &begin) -> double
 Return the elapsed time between two time points (in units of s) More...
 
auto elapsed (const Time &begin) -> double
 Return the elapsed time between a time point and now (in units of s) More...
 
auto operator<< (std::ostream &out, const ChemicalState &state) -> std::ostream &
 Outputs a ChemicalState instance.
 
auto operator+ (const ChemicalState &l, const ChemicalState &r) -> ChemicalState
 Add two ChemicalState instances.
 
auto operator* (double scalar, const ChemicalState &state) -> ChemicalState
 Multiply a ChemicalState instance by a scalar (from the left).
 
auto operator* (const ChemicalState &state, double scalar) -> ChemicalState
 Multiply a ChemicalState instance by a scalar (from the right).
 
auto operator<< (std::ostream &out, const ChemicalSystem &system) -> std::ostream &
 Output a ChemicalSystem instance.
 
auto operator< (const Element &lhs, const Element &rhs) -> bool
 Compare two Element instances for less than.
 
auto operator== (const Element &lhs, const Element &rhs) -> bool
 Compare two Element instances for equality.
 
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 Reaction &lhs, const Reaction &rhs) -> bool
 Compare two Reaction instances for less than.
 
auto operator== (const Reaction &lhs, const Reaction &rhs) -> bool
 Compare two Reaction instances for equality.
 
auto operator<< (std::ostream &out, const ReactionSystem &reactions) -> std::ostream &
 
auto operator< (const Species &lhs, const Species &rhs) -> bool
 Compare two Species instances for less than.
 
auto operator== (const Species &lhs, const Species &rhs) -> bool
 Compare two Species instances for equality.
 
template<typename NamedValues >
auto names (const NamedValues &values) -> std::vector< std::string >
 Return the names of the entries in a container.
 
template<typename ChargedValues >
auto charges (const ChargedValues &values) -> Vector
 Return the electrical charges of all species in a list of species.
 
template<typename SpeciesValues >
auto molarMasses (const SpeciesValues &species) -> Vector
 Return the molar masses of all species in a list of species (in units of kg/mol)
 
auto moleFractions (Composition n) -> ChemicalVector
 Return the mole fractions of the species.
 
template<typename SpeciesValues >
auto charges (const SpeciesValues &species) -> Vector
 
auto equilibrate (ChemicalState &state) -> EquilibriumResult
 Equilibrate a chemical state instance. More...
 
auto equilibrate (ChemicalState &state, const Partition &partition) -> EquilibriumResult
 Equilibrate a chemical state instance. More...
 
auto equilibrate (ChemicalState &state, const EquilibriumOptions &options) -> EquilibriumResult
 Equilibrate a chemical state instance with equilibrium options. More...
 
auto equilibrate (ChemicalState &state, const Partition &partition, const EquilibriumOptions &options) -> EquilibriumResult
 Equilibrate a chemical state instance with equilibrium options. More...
 
auto equilibrate (ChemicalState &state, const EquilibriumProblem &problem) -> EquilibriumResult
 Equilibrate a chemical state instance with an equilibrium problem. More...
 
auto equilibrate (ChemicalState &state, const EquilibriumProblem &problem, const EquilibriumOptions &options) -> EquilibriumResult
 Equilibrate a chemical state instance with an equilibrium problem. More...
 
auto equilibrate (const EquilibriumProblem &problem) -> ChemicalState
 Equilibrate a chemical state instance with an equilibrium problem. More...
 
auto equilibrate (const EquilibriumProblem &problem, const EquilibriumOptions &options) -> ChemicalState
 Equilibrate a chemical state instance with an equilibrium problem. More...
 
auto equilibrate (ChemicalState &state, const EquilibriumInverseProblem &problem) -> EquilibriumResult
 Equilibrate a chemical state instance with an equilibrium inverse problem. More...
 
auto equilibrate (ChemicalState &state, const EquilibriumInverseProblem &problem, const EquilibriumOptions &options) -> EquilibriumResult
 Equilibrate a chemical state instance with an equilibrium inverse problem. More...
 
auto equilibrate (const EquilibriumInverseProblem &problem) -> ChemicalState
 Equilibrate a chemical state instance with an equilibrium inverse problem. More...
 
auto equilibrate (const EquilibriumInverseProblem &problem, const EquilibriumOptions &options) -> ChemicalState
 Equilibrate a chemical state instance with an equilibrium inverse problem. More...
 
auto operator<< (std::ostream &out, const BilinearInterpolator &interpolator) -> std::ostream &
 Output a BilinearInterpolator instance.
 
auto derivativeForward (const ScalarFunction &f, VectorConstRef x) -> Vector
 Calculate the partial derivatives of a scalar function using a 1st-order forward finite difference scheme. More...
 
auto derivativeBackward (const ScalarFunction &f, VectorConstRef x) -> Vector
 Calculate the partial derivatives of a scalar function using a 1st-order backward finite difference scheme. More...
 
auto derivativeCentral (const ScalarFunction &f, VectorConstRef x) -> Vector
 Calculate the partial derivatives of a scalar function using a 2nd-order central finite difference scheme. More...
 
auto derivativeForward (const VectorFunction &f, VectorConstRef x) -> Matrix
 Calculate the partial derivatives of a vector function using a 1st-order forward finite difference scheme. More...
 
auto derivativeBackward (const VectorFunction &f, VectorConstRef x) -> Matrix
 Calculate the partial derivatives of a vector function using a 1st-order backward finite difference scheme. More...
 
auto derivativeCentral (const VectorFunction &f, VectorConstRef x) -> Matrix
 Calculate the partial derivatives of a vector function using a 2nd-order central finite difference scheme. More...
 
auto linearlyIndependentCols (MatrixConstRef A) -> Indices
 Determine the set of linearly independent columns in a matrix using a column pivoting QR algorithm. More...
 
auto linearlyIndependentRows (MatrixConstRef A) -> Indices
 Determine the set of linearly independent rows in a matrix. More...
 
auto linearlyIndependentCols (MatrixConstRef A, MatrixRef B) -> Indices
 Determine the set of linearly independent columns in a matrix. More...
 
auto linearlyIndependentRows (MatrixConstRef A, MatrixRef B) -> Indices
 Determine the set of linearly independent rows in a matrix. More...
 
auto inverseShermanMorrison (MatrixConstRef invA, VectorConstRef D) -> Matrix
 Calculate the inverse of A + D where inv(A) is already known and D is a diagonal matrix. More...
 
auto farey (double x, unsigned maxden) -> std::tuple< long, long >
 Return the numerator and denominator of the rational number closest to x. 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 (MatrixRef A, long maxden=6) -> void
 Clean a matrix that is known to have rational numbers from round-off errors. More...
 
template<typename VectorTypeX , typename VectorTypeY >
auto dot3p_ (const VectorTypeX &x, const VectorTypeY &y, double s) -> double
 
auto dot3p (VectorConstRef x, VectorConstRef y, double s) -> double
 Return the dot product s + dot(x, y) of two vectors with triple-precision.
 
auto residual3p (MatrixConstRef A, VectorConstRef x, VectorConstRef b) -> Vector
 Return the residual of the equation A*x - b with triple-precision.
 
auto zeros (Index rows) -> decltype(Vector::Zero(rows))
 Return an expression of a zero vector. More...
 
auto ones (Index rows) -> decltype(Vector::Ones(rows))
 Return an expression of a vector with entries equal to one. More...
 
auto random (Index rows) -> decltype(Vector::Random(rows))
 Return an expression of a vector with random entries. More...
 
auto linspace (Index rows, double start, double stop) -> decltype(Vector::LinSpaced(rows, start, stop))
 Return a linearly spaced vector. More...
 
auto unit (Index rows, Index i) -> decltype(Vector::Unit(rows, i))
 Return an expression of a unit vector. More...
 
auto zeros (Index rows, Index cols) -> decltype(Matrix::Zero(rows, cols))
 Return an expression of a zero matrix. More...
 
auto ones (Index rows, Index cols) -> decltype(Matrix::Ones(rows, cols))
 Return an expression of a matrix with entries equal to one. More...
 
auto random (Index rows, Index cols) -> decltype(Matrix::Random(rows, cols))
 Return an expression of a matrix with random entries. More...
 
auto identity (Index rows, Index cols) -> decltype(Matrix::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 Scalar , int Rows, int Cols, int Options, int MaxRows, int MaxCols>
auto blockmap (Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &mat, Index row, Index col, Index nrows, Index ncols) -> Eigen::Map< Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Eigen::Unaligned, Eigen::Stride< Rows, Cols >>
 Return a block mapped view of a matrix. More...
 
template<typename Scalar , int Rows, int Cols, int Options, int MaxRows, int MaxCols>
auto blockmap (const Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &mat, Index row, Index col, Index nrows, Index ncols) -> Eigen::Map< const Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Eigen::Unaligned, Eigen::Stride< Rows, Cols >>
 Return a const block mapped view of a matrix. More...
 
template<typename Scalar , int Rows, int Cols, int Options, int MaxRows, int MaxCols>
auto rowsmap (Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &mat, Index row, Index nrows) -> Eigen::Map< Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Eigen::Unaligned, Eigen::Stride< Rows, Cols >>
 Return a mapped view of a sequence of rows of a matrix. More...
 
template<typename Scalar , int Rows, int Cols, int Options, int MaxRows, int MaxCols>
auto rowsmap (const Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &mat, Index row, Index nrows) -> Eigen::Map< const Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Eigen::Unaligned, Eigen::Stride< Rows, Cols >>
 Return a const mapped view of a sequence of rows of a matrix. More...
 
template<typename Scalar , int Rows, int Cols, int Options, int MaxRows, int MaxCols>
auto colsmap (Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &mat, Index col, Index ncols) -> Eigen::Map< Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Eigen::Unaligned, Eigen::Stride< Rows, Cols >>
 Return a mapped view of a sequence of columns of a matrix. More...
 
template<typename Scalar , int Rows, int Cols, int Options, int MaxRows, int MaxCols>
auto colsmap (const Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &mat, Index col, Index ncols) -> Eigen::Map< const Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Eigen::Unaligned, Eigen::Stride< Rows, Cols >>
 Return a const mapped view of a sequence of 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(Vector::Constant(rows, val))
 
auto unitcol (Index rows, Index i) -> decltype(unit(rows, i))
 
auto unitrow (Index cols, Index i) -> decltype(RowVector::Unit(cols, i))
 
int CVODEStep (const ODEStepMode &step)
 
int CVODEIteration (const ODEIterationMode &iteration)
 
int CVODEMaxStepOrder (const ODEOptions &options)
 
int CVODEFunction (realtype t, N_Vector y, N_Vector ydot, void *user_data)
 
int CVODEJacobian (long int N, realtype t, N_Vector y, N_Vector fy, DlsMat J, void *user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3)
 
auto cardano (double a, double b, double c, double d) -> CubicRoots
 Calculate the roots of a cubic equation using Cardano's method. More...
 
auto newton (const std::function< std::tuple< double, double >(double)> &f, double x0, double epsilon, unsigned maxiter) -> double
 Calculate the root of a non-linear function using Newton's method. More...
 
auto newton (const std::function< void(VectorConstRef, VectorRef, MatrixRef)> &f, VectorConstRef x0, double epsilon, unsigned maxiter) -> Vector
 Calculate the root of a non-linear multi-dimensional function using Newton's method. More...
 
auto realRoots (const CubicRoots &roots) -> std::vector< double >
 Return all real roots of a group of roots. More...
 
auto operator* (const Hessian &H, VectorConstRef x) -> Vector
 Return the multiplication of a Hessian matrix and a vector.
 
auto isfinite (const ObjectiveResult &f) -> bool
 Returns true if the evaluation of a objective function has finite value and gradient.
 
auto largestStep (VectorConstRef p, VectorConstRef dp) -> double
 Compute the largest step length \(\alpha\) such that \(\mathbf{p} + \alpha\Delta\mathbf{p}\) is on the lower bound \(\mathbf{x}_l=\mathbf{0}\). More...
 
auto fractionToTheBoundary (VectorConstRef p, VectorConstRef dp, double tau) -> double
 
auto fractionToTheBoundary (VectorConstRef p, VectorConstRef dp, double tau, Index &ilimiting) -> double
 
auto fractionToTheBoundary (VectorConstRef p, VectorConstRef dp, MatrixConstRef C, VectorConstRef r, double tau) -> double
 
auto fractionToTheLowerBoundary (VectorConstRef p, VectorConstRef dp, VectorConstRef lower, double tau) -> double
 
auto lessThan (double a, double b, double baseval) -> bool
 Compute the fraction-to-the-boundary step length given by: More...
 
auto greaterThan (double a, double b, double baseval) -> bool
 Check if a float number is greater than another by a base value. More...
 
auto infinity () -> double
 Return the floating-point representation of positive infinity.
 
auto bfgs () -> std::function< Matrix(VectorConstRef, VectorConstRef)>
 Return an inverse Hessian function based on the BFGS Hessian approximation.
 
auto minimizeGoldenSectionSearch (const std::function< double(double)> &f, double tol) -> double
 
auto minimizeGoldenSectionSearch (const std::function< double(double)> &f, double a, double b, double tol=1e-5) -> double
 Calculate the minimum of a single variable function using the Golden Section Search algorithm.
 
auto minimizeBrent (const std::function< double(double)> &f, double min, double max, double tolerance=1e-5, unsigned maxiters=100) -> double
 Calculate the minimum of a single variable function using the Brent algorithm.
 
auto aqueousActivityModelDrummondCO2 (const AqueousMixture &mixture) -> AqueousActivityModel
 Create the function for the calculation of ln activity coefficient of CO2(aq), based on the model of Drummond (1981). More...
 
auto aqueousActivityModelDuanSunCO2 (const AqueousMixture &mixture) -> AqueousActivityModel
 Create the function for the calculation of ln activity coefficient of CO2(aq), based on the model of Duan and Sun (2003) The model is documented in the paper Duan, Z., Sun, R. More...
 
auto aqueousActivityModelRumpfCO2 (const AqueousMixture &mixture) -> AqueousActivityModel
 Create the function for the calculation of ln activity coefficient of CO2(aq), based on the model of Rumpf et al. More...
 
auto aqueousActivityModelSetschenow (const AqueousMixture &mixture, double b) -> AqueousActivityModel
 Create the aqueous activity function of a neutral species based on the Setschenow model. More...
 
auto database (std::string name) -> std::string
 Return the contents of a built-in database as a string. More...
 
auto databases () -> std::vector< std::string >
 Return the list of names of all built-in databases.
 
auto sanityCheckInteractionParamsFunction (const unsigned &nspecies, const CubicEOS::InteractionParamsFunction &func) -> void
 Sanity check free function to verify if BIPs matrices have proper dimensions. More...
 
auto identifyPhaseUsingVolume (const ThermoScalar &temperature, const ThermoScalar &pressure, const ChemicalScalar &Z, const ChemicalScalar &b) -> PhaseType
 Return a PhaseType that says if the phase is a Liquid or Gas based on Volume Method. More...
 
auto identifyPhaseUsingIsothermalCompressibility (const ThermoScalar &temperature, const ThermoScalar &pressure, const ChemicalScalar &Z) -> PhaseType
 Return a PhaseType that says if the phase is a Liquid or Gas based on Isothermal Compressibility. More...
 
auto pressureComparison (const ThermoScalar &Pressure, const ThermoScalar &Temperature, const ChemicalScalar &amix, const ChemicalScalar &bmix, const ChemicalScalar &A, const ChemicalScalar &B, const ChemicalScalar &C, const double epsilon, const double sigma) -> PhaseType
 
auto gibbsResidualEnergyComparison (const ThermoScalar &pressure, const ThermoScalar &temperature, const ChemicalScalar &amix, const ChemicalScalar &bmix, const ChemicalScalar &A, const ChemicalScalar &B, const ChemicalScalar &Z_min, const ChemicalScalar &Z_max, const double epsilon, const double sigma) -> PhaseType
 
auto identifyPhaseUsingGibbsEnergyAndEos (const ThermoScalar &pressure, const ThermoScalar &temperature, const ChemicalScalar &amix, const ChemicalScalar &bmix, const ChemicalScalar &A, const ChemicalScalar &B, const ChemicalScalar &C, std::vector< ChemicalScalar > Zs, const double epsilon, const double sigma) -> PhaseType
 Return a PhaseType that says if the phase is a Liquid or Gas based on gibbs residual energy and equation of state. More...
 
auto operator== (const MixtureState &l, const MixtureState &r) -> bool
 Compare two MixtureState instances for equality.
 
auto aqueousChemicalModelDebyeHuckel (const AqueousMixture &mixture, const DebyeHuckelParams &params) -> PhaseChemicalModel
 Return an equation of state for an aqueous phase based on the Debye–Hückel activity model. More...
 
auto aqueousChemicalModelHKF (const AqueousMixture &mixture) -> PhaseChemicalModel
 Return an equation of state for an aqueous phase based on HKF model. More...
 
auto aqueousChemicalModelIdeal (const AqueousMixture &mixture) -> PhaseChemicalModel
 Return an equation of state for an aqueous phase based on the ideal model. More...
 
auto aqueousChemicalModelPitzerHMW (const AqueousMixture &mixture) -> PhaseChemicalModel
 Return an equation of state for an aqueous phase based on a Pitzer model. More...
 
auto fluidChemicalModelCubicEOS (const FluidMixture &mixture, PhaseType phase_type, CubicEOS::Params params) -> PhaseChemicalModel
 Set the chemical model of the phase with a Cubic equation of state. More...
 
auto fluidChemicalModelIdeal (const FluidMixture &mixture) -> PhaseChemicalModel
 Return an equation of state for a gaseous phase based on the ideal model. More...
 
auto fluidChemicalModelSpycherPruessEnnis (const FluidMixture &mixture) -> PhaseChemicalModel
 Return a chemical model function for a gaseous phase based on the Spycher et al. More...
 
auto fluidChemicalModelSpycherReed (const FluidMixture &mixture) -> PhaseChemicalModel
 Return a chemical model function for a gaseous phase based on the Spycher and Reed (1988) model. More...
 
auto mineralChemicalModelIdeal (const MineralMixture &mixture) -> PhaseChemicalModel
 Return an equation of state for a mineral phase based on the ideal model. More...
 
auto mineralChemicalModelRedlichKister (const MineralMixture &mixture, double a0, double a1, double a2) -> PhaseChemicalModel
 Return an equation of state for a binary mineral solid solution based on Redlich-Kister model. More...
 
auto functionG (Temperature T, Pressure P, const WaterThermoState &wts) -> FunctionG
 Calculate the function g of the HKF model.
 
auto speciesElectroStateHKF (const FunctionG &g, const AqueousSpecies &species) -> SpeciesElectroState
 Calculate the electrostatic state of the aqueous species using the g-function state.
 
auto speciesElectroStateHKF (Temperature T, Pressure P, const AqueousSpecies &species) -> SpeciesElectroState
 Calculate the electrostatic state of the aqueous species using the HKF model.
 
auto speciesThermoStateSolventHKF (Temperature T, Pressure P, const WaterThermoState &wts) -> SpeciesThermoState
 Calculate the thermodynamic state of solvent water using the HKF model.
 
auto speciesThermoStateSoluteHKF (Temperature T, Pressure P, const AqueousSpecies &species, const SpeciesElectroState &aes, const WaterElectroState &wes) -> SpeciesThermoState
 Calculate the thermodynamic state of an aqueous solute using the HKF model.
 
auto speciesThermoStateHKF (Temperature T, Pressure P, const AqueousSpecies &species) -> SpeciesThermoState
 Calculate the thermodynamic state of an aqueous species using the HKF model.
 
auto speciesThermoStateHKF (Temperature T, Pressure P, const FluidSpecies &species) -> SpeciesThermoState
 Calculate the thermodynamic state of a fluid species using the HKF model.
 
auto speciesThermoStateHKF (Temperature T, Pressure P, const MineralSpecies &species) -> SpeciesThermoState
 Calculate the thermodynamic state of a mineral species using the HKF model.
 
auto operator< (const MineralCatalyst &lhs, const MineralCatalyst &rhs) -> bool
 Compare two MineralCatalyst instances for less than.
 
auto operator== (const MineralCatalyst &lhs, const MineralCatalyst &rhs) -> bool
 Compare two MineralCatalyst instances for equality.
 
auto operator< (const MineralMechanism &lhs, const MineralMechanism &rhs) -> bool
 Compare two MineralMechanism instances for less than.
 
auto operator== (const MineralMechanism &lhs, const MineralMechanism &rhs) -> bool
 Compare two MineralMechanism instances for equality.
 
auto molarSurfaceArea (const MineralReaction &reaction, const ChemicalSystem &system) -> double
 Calculate the molar surface area of a mineral (in units of m2/mol) More...
 
auto createReaction (const MineralReaction &mineralrxn, const ChemicalSystem &system) -> Reaction
 
auto waterElectroStateJohnsonNorton (Temperature T, Pressure P, const WaterThermoState &wts) -> WaterElectroState
 Calculate the electrostatic state of water using the model of Johnson and Norton (1991). More...
 
auto waterHelmholtzStateHGK (Temperature T, ThermoScalar D) -> WaterHelmholtzState
 Calculate the Helmholtz free energy state of water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterHelmholtzStateWagnerPruss (Temperature T, ThermoScalar D) -> WaterHelmholtzState
 Calculate the Helmholtz free energy state of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterThermoStateHGK (Temperature T, Pressure P, StateOfMatter stateofmatter) -> WaterThermoState
 Calculate the thermodynamic state of water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterThermoStateWagnerPruss (Temperature T, Pressure P, StateOfMatter stateofmatter) -> WaterThermoState
 Calculate the thermodynamic state of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterThermoState (Temperature T, Pressure P, const WaterHelmholtzState &whs) -> WaterThermoState
 Calculate the thermodynamic state of water. More...
 
template<typename HelmholtsModel >
auto waterDensity (Temperature T, Pressure P, const HelmholtsModel &model, StateOfMatter stateofmatter) -> ThermoScalar
 
auto waterDensityHGK (Temperature T, Pressure P, StateOfMatter stateofmatter) -> ThermoScalar
 Calculate the density of water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterLiquidDensityHGK (Temperature T, Pressure P) -> ThermoScalar
 Calculate the density of liquid water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterVaporDensityHGK (Temperature T, Pressure P) -> ThermoScalar
 Calculate the density of vapor water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterDensityWagnerPruss (Temperature T, Pressure P, StateOfMatter stateofmatter) -> ThermoScalar
 Calculate the density of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterLiquidDensityWagnerPruss (Temperature T, Pressure P) -> ThermoScalar
 Calculate the density of liquid water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterVaporDensityWagnerPruss (Temperature T, Pressure P) -> ThermoScalar
 Calculate the density of vapor water using the Wagner and Pruss (1995) equation of state. More...
 
template<typename HelmholtzModel >
auto waterPressure (Temperature T, ThermoScalar D, const HelmholtzModel &model) -> ThermoScalar
 
auto waterPressureHGK (Temperature T, ThermoScalar D) -> ThermoScalar
 Calculate the pressure of water using the Haar–Gallagher–Kell (1984) equation of state. More...
 
auto waterPressureWagnerPruss (Temperature T, ThermoScalar D) -> ThermoScalar
 Calculate the pressure of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterSaturatedPressureWagnerPruss (Temperature T) -> ThermoScalar
 Calculate the saturated pressure of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterSaturatedLiquidDensityWagnerPruss (Temperature T) -> ThermoScalar
 Calculate the saturated liquid-density of water using the Wagner and Pruss (1995) equation of state. More...
 
auto waterSaturatedVapourDensityWagnerPruss (Temperature T) -> ThermoScalar
 Calculate the saturated vapour-density of water using the Wagner and Pruss (1995) equation of state. More...
 

Variables

constexpr auto universalGasConstant = 8.3144621
 The universal gas constant (in units of J/(mol*K))
 
constexpr auto faradayConstant = 96485.3329
 The Faraday constant (in units of C/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 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.
 
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

◆ ChemicalScalar

A type that represents a chemical property and its derivatives.

A chemical scalar is a quantity that depends on temperature, pressure, and mole amounts of species. A ChemicalScalar holds not only its value, but also its temperature, pressure, and mole partial derivatives.

See also
ThermoScalar, ChemicalVector, ThermoVector

◆ ChemicalVector

typedef ChemicalVectorBase< Vector, Vector, Vector, Matrix > ChemicalVector

A type that represents a vector of chemical properties and their derivatives.

A chemical scalar is a quantity that depends on temperature, pressure, and mole amounts of species. A ChemicalScalar holds not only its value, but also its partial derivatives with respect to temperature, pressure, and species amounts. A ChemicalVector is a vector representation of a collection of ChemicalScalar instances.

See also
ThermoVector, ThermoScalar, ChemicalScalar

◆ ThermoScalar

typedef ThermoScalarBase< double > ThermoScalar

A type that defines a scalar thermo property.

A thermo property means here any property that depends on temperature and pressure. A ThermoScalar instance not only holds the value of the thermo property, but also is partial temperature and pressure derivatives.

See also
ChemicalVector

◆ ThermoVector

typedef ThermoVectorBase< Vector, Vector, Vector > ThermoVector

A type that defines a vector of thermodynamic properties.

A thermo property means here any property that depends on temperature and pressure. A ThermoVector instance not only holds the values of the thermo properties, but also their partial temperature and pressure derivatives.

See also
ThermoScalar, ChemicalScalar, ChemicalVector

◆ VectorRef

typedef Eigen::Ref< VectorXd > VectorRef

< Alias to Eigen type VectorXd.

Alias to Eigen type Eigen::Ref<VectorXd>.

◆ VectorConstRef

typedef Eigen::Ref< const VectorXd > VectorConstRef

< Alias to Eigen type Ref<VectorXd>.

Alias to Eigen type Eigen::Ref<const VectorXd>.

◆ VectorMap

typedef Eigen::Map< VectorXd > VectorMap

< Alias to Eigen type Ref<const VectorXd>.

Alias to Eigen type Eigen::Map<VectorXd>.

◆ VectorConstMap

typedef Eigen::Map< const VectorXd > VectorConstMap

< Alias to Eigen type Map<VectorXd>.

Alias to Eigen type Eigen::Map<const VectorXd>.

◆ MatrixRef

typedef Eigen::Ref< MatrixXd > MatrixRef

Alias to Eigen type Ref<MatrixXd>.

Alias to Eigen type Eigen::Ref<MatrixXd>.

◆ MatrixConstRef

typedef Eigen::Ref< const MatrixXd > MatrixConstRef

Alias to Eigen type Ref<const MatrixXd>.

Alias to Eigen type Eigen::Ref<const MatrixXd>.

◆ MatrixMap

typedef Eigen::Map< MatrixXd > MatrixMap

Alias to Eigen type Map<MatrixXd>.

Alias to Eigen type Eigen::Map<MatrixXd>.

◆ MatrixConstMap

typedef Eigen::Map< const MatrixXd > MatrixConstMap

Alias to Eigen type Map<const MatrixXd>.

Alias to Eigen type Eigen::Map<const MatrixXd>.

◆ NonlinearFunction

A type that describes the functional signature of a non-linear residual function.

Parameters
xThe vector of variables
Returns
The residual of the non-linear function evaluated at x

◆ ObjectiveFunction

A type that describes the functional signature of an objective function.

Parameters
xThe vector of primal variables
Returns
The objective function evaluated at x

◆ AqueousActivityModel

The signature of a function that calculates the ln activity coefficient of a neutral aqueous species.

See also
AqueousMixtureState, ChemicalScalar

Enumeration Type Documentation

◆ 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 H = H(exact).

ExactDiagonal 

The Hessian of the Gibbs energy function is H = diag(H(exact)).

Approximation 

The Hessian of the Gibbs energy function is H = d(ln(x))/dn, where x is the mole fractions of the species.

ApproximationDiagonal 

The Hessian of the Gibbs energy function is H = diag(d(ln(x))/dn), where x is the mole fractions of the species.

◆ KktMethod

enum KktMethod
strong

An enumeration of possible methods for the solution of a KKT equation.

Enumerator
PartialPivLU 

Use a partial pivoting LU algorithm on the full KKT equation.

This can only be used for dense Hessian matrices.

FullPivLU 

Use a full pivoting LU algorithm on the full KKT equation.

This can only be used for dense Hessian matrices.

Nullspace 

Use a nullspace method to solve the KKT equation.

This method is advisable when there are many equality constraints and these are linear so that their gradient is constant.

Rangespace 

Use a rangespace method to solve the KKT equation.

This method is advisable when the Hessian matrix can be easily inverted such as a quasi-Newton approximation or a diagonal matrix.

Automatic 

Use a method that fits better to the type of KKT equation.

This option will ensure that a rangespace method is used when the Hessian matrix is diagonal or its inverse is available. It will use a PartialPivLU method for dense KKT equations.

◆ StepMode

enum StepMode

The available stepping modes for some optimization algorithms.

Enumerator
Conservative 

Use convervative step in which its direction is not changed.

Aggressive 

Use aggressive step that results in faster approach of variables to the bounds.

Function Documentation

◆ amount()

auto Reaktoro::amount ( double  value,
Index  nspecies,
Index  ispecies 
) -> ChemicalScalarBase<double, decltype(tr(unit(nspecies, ispecies)))>
inline

Return a ChemicalScalar representation of a mole amount of a species.

Parameters
valueThe mole amount of the species.
nspeciesThe number of species in the system.
ispeciesThe index of the species in the system.

◆ elements()

auto elements ( std::string  formula) -> std::map< std::string, double >

Determine.

the elemental composition of a chemical compound.

Parameters
compoundThe formula of the chemical compound
Returns
The elemental composition of the chemical compound

◆ atomicMass()

auto atomicMass ( std::string  element) -> double

Return the atomic mass of a chemical element (in units of kg/mol).

Parameters
elementThe symbol of the chemical element
Returns
The atomic mass of the chemical element

◆ molarMass() [1/2]

auto molarMass ( const std::map< std::string, double > &  compound) -> double

Calculate the molar mass of a chemical compound (in units of kg/mol).

Parameters
compoundThe elements and their stoichiometries that compose the chemical compound
Returns
The molar mass of the chemical compound

◆ molarMass() [2/2]

auto molarMass ( std::string  formula) -> double

Calculate the molar mass of a chemical compound (in units of kg/mol).

Parameters
compoundThe formula of the chemical compound
Returns
The molar mass of the chemical compound

◆ charge()

auto charge ( const std::string &  formula) -> double

Extract the electrical charge of a chemical formula.

The chemical formula of a species can be represented by string with the following formats:

std::string formula1 = "Na+"; // species: Na+
std::string formula2 = "Ca++"; // species: Ca++
std::string formula3 = "OH-"; // species: OH-
std::string formula4 = "CO3--"; // species: CO3--
std::string formula5 = "H+"; // species: H+

The number 1 is optional when the species has one negative or positive electrical charge.

Parameters
formulaThe chemical formula of a species
Returns
The electrical charge of the species

◆ alternativeWaterNames()

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

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

Parameters
nameThe name of the species.

◆ alternativeChargedSpeciesNames()

auto 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 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 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 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 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 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 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 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 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 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 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

◆ contained()

auto contained ( const Container &  values1,
const Container &  values2 
) -> bool

Check if a value is contained in a container of values.

Check if a container of values is contained in another

◆ range() [1/3]

auto range ( first,
last,
step 
) -> std::vector<T>

Return a range of values.

Parameters
beginThe begin of the sequence
endThe past-the-end entry of the sequence
stepThe step of the sequence

◆ range() [2/3]

auto range ( first,
last 
) -> std::vector<T>

Return a range of values with unit step.

Parameters
beginThe begin of the sequence
endThe past-the-end entry of the sequence

◆ range() [3/3]

auto range ( last) -> std::vector<T>

Return a range of values starting from zero and increasing by one.

Parameters
Thesize of the sequence

◆ extract()

auto extract ( const std::vector< T > &  values,
const Indices indices 
) -> std::vector<T>

Extract values from a vector given a list of indices.

Parameters
valuesThe values from which a extraction will be performed
indicesThe indices of the values to be extracted
Returns
The extracted values

◆ time()

auto time ( ) -> Time

Return the time point now.

See also
elapsed

◆ elapsed() [1/2]

auto elapsed ( const Time &  end,
const Time &  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 elapsed ( const Time &  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

◆ equilibrate() [1/12]

auto equilibrate ( ChemicalState state) -> EquilibriumResult

Equilibrate a chemical state instance.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [2/12]

auto equilibrate ( ChemicalState state,
const Partition partition 
) -> EquilibriumResult

Equilibrate a chemical state instance.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [3/12]

auto equilibrate ( ChemicalState state,
const EquilibriumOptions options 
) -> EquilibriumResult

Equilibrate a chemical state instance with equilibrium options.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [4/12]

auto equilibrate ( ChemicalState state,
const Partition partition,
const EquilibriumOptions options 
) -> EquilibriumResult

Equilibrate a chemical state instance with equilibrium options.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [5/12]

auto equilibrate ( ChemicalState state,
const EquilibriumProblem problem 
) -> EquilibriumResult

Equilibrate a chemical state instance with an equilibrium problem.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [6/12]

auto equilibrate ( ChemicalState state,
const EquilibriumProblem problem,
const EquilibriumOptions options 
) -> EquilibriumResult

Equilibrate a chemical state instance with an equilibrium problem.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [7/12]

auto equilibrate ( const EquilibriumProblem problem) -> ChemicalState

Equilibrate a chemical state instance with an equilibrium problem.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [8/12]

auto equilibrate ( const EquilibriumProblem problem,
const EquilibriumOptions options 
) -> ChemicalState

Equilibrate a chemical state instance with an equilibrium problem.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [9/12]

auto equilibrate ( ChemicalState state,
const EquilibriumInverseProblem problem 
) -> EquilibriumResult

Equilibrate a chemical state instance with an equilibrium inverse problem.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [10/12]

auto equilibrate ( ChemicalState state,
const EquilibriumInverseProblem problem,
const EquilibriumOptions options 
) -> EquilibriumResult

Equilibrate a chemical state instance with an equilibrium inverse problem.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [11/12]

auto equilibrate ( const EquilibriumInverseProblem problem) -> ChemicalState

Equilibrate a chemical state instance with an equilibrium inverse problem.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ equilibrate() [12/12]

auto equilibrate ( const EquilibriumInverseProblem problem,
const EquilibriumOptions options 
) -> ChemicalState

Equilibrate a chemical state instance with an equilibrium inverse problem.

Warning
This function is intended for convenience only! For performance critical applications, use class EquilibriumSolver.

◆ derivativeForward() [1/2]

auto derivativeForward ( const ScalarFunction f,
VectorConstRef  x 
) -> Vector

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 derivativeBackward ( const ScalarFunction f,
VectorConstRef  x 
) -> Vector

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 derivativeCentral ( const ScalarFunction f,
VectorConstRef  x 
) -> Vector

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 derivativeForward ( const VectorFunction f,
VectorConstRef  x 
) -> Matrix

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 derivativeBackward ( const VectorFunction f,
VectorConstRef  x 
) -> Matrix

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 derivativeCentral ( const VectorFunction f,
VectorConstRef  x 
) -> Matrix

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 linearlyIndependentCols ( MatrixConstRef  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 linearlyIndependentRows ( MatrixConstRef  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 linearlyIndependentCols ( MatrixConstRef  A,
MatrixRef  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 linearlyIndependentRows ( MatrixConstRef  A,
MatrixRef  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 inverseShermanMorrison ( MatrixConstRef  invA,
VectorConstRef  D 
) -> Matrix

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

Parameters
invA[in,out]The inverse of the matrix A and the final inverse of A + D
DThe diagonal matrix D

◆ farey()

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

Return the numerator and denominator of the rational number closest to x.

This methods expects 0 <= x <= 1.

Parameters
xThe number for which the closest rational number is sought.
maxdenThe maximum denominator that the rational number can have.

◆ rationalize()

auto 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 cleanRationalNumbers ( double *  vals,
long  size,
long  maxden = 6 
) -> void

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

Parameters
vals[in,out]The values to be cleaned
maxdenThe maximum known denominator in the array with rational numbers

◆ cleanRationalNumbers() [2/2]

auto cleanRationalNumbers ( MatrixRef  A,
long  maxden = 6 
) -> void

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

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

◆ zeros() [1/2]

auto zeros ( Index  rows) -> decltype(Vector::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(Vector::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(Vector::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 ( Index  rows,
double  start,
double  stop 
) -> decltype(Vector::LinSpaced(rows, start, stop))
inline

Return a linearly spaced vector.

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

◆ unit()

auto unit ( Index  rows,
Index  i 
) -> decltype(Vector::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(Matrix::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(Matrix::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(Matrix::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(Matrix::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
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
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
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
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
matThe matrix for which the view is created
irowsThe indices of the rows of the matrix
icolsThe indices of the columns of the matrix

◆ 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
matThe matrix for which the view is created
irowsThe indices of the rows of the matrix
icolsThe indices of the columns of the matrix

◆ 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
irowsThe indices of the rows of the matrix
icolsThe indices of the columns of the matrix

◆ 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
irowsThe indices of the rows of the matrix
icolsThe indices of the columns of the matrix

◆ 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

◆ blockmap() [1/2]

auto Reaktoro::blockmap ( Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &  mat,
Index  row,
Index  col,
Index  nrows,
Index  ncols 
) -> Eigen::Map<Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>

Return a block mapped view of a matrix.

Parameters
matThe matrix from which the mapped view is created.
rowThe index of the row at which the view starts.
colThe index of the column at which the view starts.
nrowsThe number of rows of the mapped view.
ncolsThe number of columns of the mapped view.

◆ blockmap() [2/2]

auto Reaktoro::blockmap ( const Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &  mat,
Index  row,
Index  col,
Index  nrows,
Index  ncols 
) -> Eigen::Map<const Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>

Return a const block mapped view of a matrix.

Parameters
matThe matrix from which the mapped view is created.
rowThe index of the row at which the view starts.
colThe index of the column at which the view starts.
nrowsThe number of rows of the mapped view.
ncolsThe number of columns of the mapped view.

◆ rowsmap() [1/2]

auto Reaktoro::rowsmap ( Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &  mat,
Index  row,
Index  nrows 
) -> Eigen::Map<Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>

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

Parameters
matThe matrix from which the mapped view is created.
rowThe index of the row at which the view starts.
nrowsThe number of rows of the mapped view.

◆ rowsmap() [2/2]

auto Reaktoro::rowsmap ( const Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &  mat,
Index  row,
Index  nrows 
) -> Eigen::Map<const Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>

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

Parameters
matThe matrix from which the mapped view is created.
rowThe index of the row at which the view starts.
nrowsThe number of rows of the mapped view.

◆ colsmap() [1/2]

auto Reaktoro::colsmap ( Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &  mat,
Index  col,
Index  ncols 
) -> Eigen::Map<Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>

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

Parameters
matThe matrix from which the mapped view is created.
rowThe index of the row at which the view starts.
colThe index of the column at which the view starts.
nrowsThe number of rows of the mapped view.
ncolsThe number of columns of the mapped view.

◆ colsmap() [2/2]

auto Reaktoro::colsmap ( const Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &  mat,
Index  col,
Index  ncols 
) -> Eigen::Map<const Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>

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

Parameters
matThe matrix from which the mapped view is created.
rowThe index of the row at which the view starts.
colThe index of the column at which the view starts.
nrowsThe number of rows of the mapped view.
ncolsThe number of columns of the mapped view.

◆ cardano()

auto cardano ( double  a,
double  b,
double  c,
double  d 
) -> CubicRoots

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: \( ax^{3}+bx^{2}+cx+d=0 \).

Parameters
aThe coefficient a of the cubic equation
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, where \( |r_1| \geq |r_2| \geq |r_3| \). If they are all real, they are returned in descending order (the first element is the highest).

◆ newton() [1/2]

auto newton ( const std::function< std::tuple< double, double >(double)> &  f,
double  x0,
double  epsilon,
unsigned  maxiter 
) -> double

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.

◆ newton() [2/2]

auto newton ( const std::function< void(VectorConstRef, VectorRef, MatrixRef)> &  f,
VectorConstRef  x0,
double  epsilon,
unsigned  maxiter 
) -> Vector

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

Parameters
fThe function that returns \( f(x) \) and \( J(x) \).
x0The initial guess for the iterative root calculation.
epsilonThe tolerance used in \( |f(x)| < \epsilon \) to check convergence.
maxiterThe maximum number of iterations.

◆ realRoots()

auto realRoots ( const CubicRoots roots) -> std::vector< double >

Return all real roots of a group of roots.

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

◆ largestStep()

auto largestStep ( VectorConstRef  p,
VectorConstRef  dp 
) -> double

Compute the largest step length \(\alpha\) such that \(\mathbf{p} + \alpha\Delta\mathbf{p}\) is on the lower bound \(\mathbf{x}_l=\mathbf{0}\).

Parameters
pThe point \(\mathbf{p}\)
dpThe step \(\Delta\mathbf{p}\)

◆ lessThan()

auto lessThan ( double  a,
double  b,
double  baseval 
) -> bool

Compute the fraction-to-the-boundary step length given by:

\[\alpha_{\mathrm{max}}=\max\{\alpha\in(0,1]:\mathbf{p}+\alpha\Delta\mathbf{p}\geq(1-\tau)\mathbf{p}\}@f.] @param p The point @f$\mathbf{p}@f$ @param dp The step @f$\Delta\mathbf{p}@f$ @param tau The fraction-to-the-boundary parameter @f$\tau@f$ auto fractionToTheBoundary(VectorConstRef p, VectorConstRef dp, double tau) -> double; Compute the fraction-to-the-boundary step length given by: @f[\alpha_{\mathrm{max}}=\max\{\alpha\in(0,1]:\mathbf{p}+\alpha\Delta\mathbf{p}\geq(1-\tau)\mathbf{p}\}@f.] @param p The point @f$\mathbf{p}@f$ @param dp The step @f$\Delta\mathbf{p}@f$ @param tau The fraction-to-the-boundary parameter @f$\tau@f$ @param ilimiting The index of the limiting variable auto fractionToTheBoundary(VectorConstRef p, VectorConstRef dp, double tau, Index& ilimiting) -> double; Compute the fraction-to-the-boundary step length given by: @f[\alpha_{\mathrm{max}}=\max\{\alpha\in(0,1]:\alpha C\Delta\mathbf{p}\geq-\tau C\mathbf{p}+\mathbf{r}\}@f.] @param p The point @f$\mathbf{p}@f$ @param dp The step @f$\Delta\mathbf{p}@f$ @param C The left-hand side matrix that defines the inequality constraint @f$C\mathbf{p}\geq\mathbf{r}@f$ @param r The right-hand side vector that defines the inequality constraint @f$C\mathbf{p}\geq\mathbf{r}@f$ @param tau The fraction-to-the-boundary parameter @f$\tau@f$ auto fractionToTheBoundary(VectorConstRef p, VectorConstRef dp, MatrixConstRef C, VectorConstRef r, double tau) -> double; Compute the fraction-to-the-boundary step length given by: @f[\alpha_{\mathrm{max}}=\max\{\alpha\in(0,1]:\mathbf{p}+\alpha\Delta\mathbf{p}\geq(1-\tau)\mathbf{p}\}@f.] @param p The point @f$\mathbf{p}@f$ @param dp The step @f$\Delta\mathbf{p}@f$ @param lower The lower bound for the step @f$\Delta\mathbf{p}@f$ @param tau The fraction-to-the-boundary parameter @f$\tau@f$ auto fractionToTheLowerBoundary(VectorConstRef p, VectorConstRef dp, VectorConstRef lower, double tau) -> double; Check if a float number is less than another by a base value. This method is particularly useful when comparing two float numbers where round-off errors can compromise the checking. The following is used for the comparison: @f[a < b + 10\epsilon \mathrm{baseval}\]

, where \(\epsilon\) is the machine double precision.

Parameters
aThe left-hand side value
bThe right-hand side value
basevalThe base value for the comparison

◆ greaterThan()

auto greaterThan ( double  a,
double  b,
double  baseval 
) -> bool

Check if a float number is greater than another by a base value.

This method is particularly useful when comparing two float numbers where round-off errors can compromise the checking. The following is used for the comparison:

\[a > b - 10\epsilon \mathrm{baseval}\]

, where \(\epsilon\) is the machine double precision.

Parameters
aThe left-hand side value
bThe right-hand side value
basevalThe base value for the comparison

◆ aqueousActivityModelDrummondCO2()

auto aqueousActivityModelDrummondCO2 ( const AqueousMixture mixture) -> AqueousActivityModel

Create the function for the calculation of ln activity coefficient of CO2(aq), based on the model of Drummond (1981).

The model is documented in the paper Drummond, S. E. (1981). Boiling and mixing of hydrothermal fluids: chemical effects on mineral precipitation. Pennsylvania State University.

Parameters
mixtureThe aqueous mixture instance
Returns
The aqueous activity function of species CO2(aq)
See also
AqueousMixture, AqueousActivityModel

◆ aqueousActivityModelDuanSunCO2()

auto aqueousActivityModelDuanSunCO2 ( const AqueousMixture mixture) -> AqueousActivityModel

Create the function for the calculation of ln activity coefficient of CO2(aq), based on the model of Duan and Sun (2003) The model is documented in the paper 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.

Parameters
mixtureThe aqueous mixture instance
See also
AqueousMixture, AqueousActivityModel

◆ aqueousActivityModelRumpfCO2()

auto aqueousActivityModelRumpfCO2 ( const AqueousMixture mixture) -> AqueousActivityModel

Create the function for the calculation of ln activity coefficient of CO2(aq), based on the model of Rumpf et al.

(1994). The model is documented in the paper *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,

Parameters
mixtureThe aqueous mixture instance
See also
AqueousMixture, AqueousActivityModel

◆ aqueousActivityModelSetschenow()

auto aqueousActivityModelSetschenow ( const AqueousMixture mixture,
double  b 
) -> AqueousActivityModel

Create the aqueous activity function of a neutral species based on the Setschenow model.

Parameters
mixtureThe aqueous mixture instance containing the aqueous species
bThe Setschenow constant
Returns
The aqueous activity function of the aqueous species
See also
AqueousMixture, AqueousActivityModel

◆ database()

auto database ( std::string  name) -> std::string

Return the contents of a built-in database as a string.

This method searches among all built-in databases and return the database file as a string. If the given database name is not found, an empty string is returned.

Parameters
nameThe name of the database.
See also
databases

◆ sanityCheckInteractionParamsFunction()

auto Reaktoro::sanityCheckInteractionParamsFunction ( const unsigned &  nspecies,
const CubicEOS::InteractionParamsFunction func 
) -> void

Sanity check free function to verify if BIPs matrices have proper dimensions.

Considering that the phase has n species, the BIP matrices k, kT and kTT should have (n, n) as dimensions.

See also
CubicEOS::setInteractionParamsFunction

◆ identifyPhaseUsingVolume()

auto identifyPhaseUsingVolume ( const ThermoScalar temperature,
const ThermoScalar pressure,
const ChemicalScalar Z,
const ChemicalScalar b 
) -> PhaseType

Return a PhaseType that says if the phase is a Liquid or Gas based on Volume Method.

Parameters
TemperaturePhase temperature
PressurePhase pressure
ZPhase compressibility factor
Returns
The type of the phase

Reference: Bennett, J. and Schmidt, K.A., 2016. Comparison of Phase Identification Methods Used in Oil Industry Flow Simulations. Energy & Fuels, 31(4), pp.3370-3379.

◆ identifyPhaseUsingIsothermalCompressibility()

auto identifyPhaseUsingIsothermalCompressibility ( const ThermoScalar temperature,
const ThermoScalar pressure,
const ChemicalScalar Z 
) -> PhaseType

Return a PhaseType that says if the phase is a Liquid or Gas based on Isothermal Compressibility.

Parameters
TemperaturePhase temperature
PressurePhase pressure
ZPhase compressibility factor
Returns
The type of the phase

Reference: Bennett, J. and Schmidt, K.A., 2016. Comparison of Phase Identification Methods Used in Oil Industry Flow Simulations. Energy & Fuels, 31(4), pp.3370-3379.

◆ identifyPhaseUsingGibbsEnergyAndEos()

auto identifyPhaseUsingGibbsEnergyAndEos ( const ThermoScalar pressure,
const ThermoScalar temperature,
const ChemicalScalar amix,
const ChemicalScalar bmix,
const ChemicalScalar A,
const ChemicalScalar B,
const ChemicalScalar C,
std::vector< ChemicalScalar Zs,
const double  epsilon,
const double  sigma 
) -> PhaseType

Return a PhaseType that says if the phase is a Liquid or Gas based on gibbs residual energy and equation of state.

Parameters
pressurePhase pressure
temperaturePhase temperature
amixattractive parameter
ZsZ-roots, as calculated by the cubic EOS. Must have size 1 or 2 here. If size(Z) == 2, the values od Gibbs residual energy are compared. It is a liquid phase if Gibbs residual energy of Z_min is the smallest and gaseous if Gibbs residual energy of Z_max is the smallest. If size(Z) == 1, the pressue is compared with the local P_min and local P_max of the EoS. It is a liquid phase if P \textgreater P_min and gaseous if P \textless Pmax.
Returns
The type of the phase

Reference: Bennett, J. and Schmidt, K.A., 2016. Comparison of Phase Identification Methods Used in Oil Industry Flow Simulations. Energy & Fuels, 31(4), pp.3370-3379.

◆ aqueousChemicalModelDebyeHuckel()

auto aqueousChemicalModelDebyeHuckel ( const AqueousMixture mixture,
const DebyeHuckelParams params 
) -> PhaseChemicalModel

Return an equation of state for an aqueous phase based on the Debye–Hückel activity model.

Parameters
mixtureThe aqueous mixture instance
paramsThe parameters for the Debye–Hückel activity model.
Returns
The activity model function for the aqueous phase
See also
AqueousMixture, DebyeHuckelParams, PhaseChemicalModel

◆ aqueousChemicalModelHKF()

auto aqueousChemicalModelHKF ( const AqueousMixture mixture) -> PhaseChemicalModel

Return an equation of state for an aqueous phase based on HKF model.

The HKF model implemented here was documented in:

  • 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.
    Parameters
    mixtureThe aqueous mixture
    Returns
    The equation of state function for the aqueous phase
    See also
    AqueousMixture, PhaseChemicalModel

◆ aqueousChemicalModelIdeal()

auto aqueousChemicalModelIdeal ( const AqueousMixture mixture) -> PhaseChemicalModel

Return an equation of state for an aqueous phase based on the ideal model.

Parameters
mixtureThe aqueous mixture
Returns
The equation of state function for the aqueous phase
See also
AqueousMixture, PhaseChemicalModel

◆ aqueousChemicalModelPitzerHMW()

auto aqueousChemicalModelPitzerHMW ( const AqueousMixture mixture) -> PhaseChemicalModel

Return an equation of state for an aqueous phase based on a Pitzer model.

The implementation of this Pitzer model was taken from the following references:

  1. 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.
  2. 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.
  3. Pitzer, K. S. (1975). Thermodynamics of electrolytes. V. effects of higher-order electrostatic terms. Journal of Solution Chemistry, 4(3), 249–265.
    Parameters
    mixtureThe aqueous mixture
    Returns
    The equation of state function for the aqueous phase
    See also
    AqueousMixture, PhaseChemicalModel

◆ fluidChemicalModelCubicEOS()

auto fluidChemicalModelCubicEOS ( const FluidMixture mixture,
PhaseType  phase_type,
CubicEOS::Params  params 
) -> PhaseChemicalModel

Set the chemical model of the phase with a Cubic equation of state.

See also
FluidPhase::setChemicalModelCubicEOS

◆ fluidChemicalModelIdeal()

auto fluidChemicalModelIdeal ( const FluidMixture mixture) -> PhaseChemicalModel

Return an equation of state for a gaseous phase based on the ideal model.

This model only supports a gaseous phase. Using it in a FluidPhase that is not a PhaseType::Gas will result in a runtime error.

Parameters
mixtureThe fluid mixture
Returns
The equation of state function for the fluid phase
See also
FluidMixture, FluidChemicalModel

◆ fluidChemicalModelSpycherPruessEnnis()

auto fluidChemicalModelSpycherPruessEnnis ( const FluidMixture mixture) -> PhaseChemicalModel

Return a chemical model function for a gaseous phase based on the Spycher et al.

(2003) model. This model only supports a gaseous phase with species CO2(g) and H2O(g). The model is documented in: 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 100°C and up to 600 bar. Geochimica et Cosmochimica Acta, 67(16), 3015–3031.

Parameters
mixtureThe gaseous mixture instance
See also
FluidMixture, PhaseChemicalModel

◆ fluidChemicalModelSpycherReed()

auto fluidChemicalModelSpycherReed ( const FluidMixture mixture) -> PhaseChemicalModel

Return a chemical model function for a gaseous phase based on the Spycher and Reed (1988) model.

This model only supports the gaseous species H2O(g), CO2(g), and CH4(g).

Reference: 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.

Parameters
mixtureThe gaseous mixture instance
See also
GaseousMixture

◆ mineralChemicalModelIdeal()

auto mineralChemicalModelIdeal ( const MineralMixture mixture) -> PhaseChemicalModel

Return an equation of state for a mineral phase based on the ideal model.

Parameters
mixtureThe mineral mixture
Returns
The equation of state function for the mineral phase
See also
MineralMixture, MineralChemicalModel

◆ mineralChemicalModelRedlichKister()

auto mineralChemicalModelRedlichKister ( const MineralMixture mixture,
double  a0,
double  a1,
double  a2 
) -> PhaseChemicalModel

Return an equation of state for a binary mineral solid solution 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
mixtureThe mineral mixture
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
MineralMixture, MineralChemicalModel

◆ molarSurfaceArea()

auto Reaktoro::molarSurfaceArea ( const MineralReaction reaction,
const ChemicalSystem system 
) -> double

Calculate the molar surface area of a mineral (in units of m2/mol)

Parameters
reactionThe mineral reaction instance
systemThe chemical system instance
Returns
The molar surface area of the mineral (in units of m2/mol)

◆ waterElectroStateJohnsonNorton()

auto waterElectroStateJohnsonNorton ( Temperature  T,
Pressure  P,
const WaterThermoState wts 
) -> WaterElectroState

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

References:

  • 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

◆ waterHelmholtzStateHGK()

auto waterHelmholtzStateHGK ( Temperature  T,
ThermoScalar  D 
) -> WaterHelmholtzState

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
WaterHelmholtzState

◆ waterHelmholtzStateWagnerPruss()

auto waterHelmholtzStateWagnerPruss ( Temperature  T,
ThermoScalar  D 
) -> WaterHelmholtzState

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
WaterHelmholtzState

◆ waterThermoStateHGK()

auto waterThermoStateHGK ( Temperature  T,
Pressure  P,
StateOfMatter  stateofmatter 
) -> WaterThermoState

Calculate the thermodynamic state 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)
    Returns
    The thermodynamic state of water
    See also
    WaterThermoState

◆ waterThermoStateWagnerPruss()

auto waterThermoStateWagnerPruss ( Temperature  T,
Pressure  P,
StateOfMatter  stateofmatter 
) -> WaterThermoState

Calculate the thermodynamic state 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)
    Returns
    The thermodynamic state of water
    See also
    WaterThermoState

◆ waterThermoState()

auto waterThermoState ( Temperature  T,
Pressure  P,
const WaterHelmholtzState whs 
) -> WaterThermoState

Calculate the thermodynamic state of water.

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

Parameters
TThe temperature of water (in units of K)
PThe pressure of water (in units of Pa)
whsThe Helmholtz free energy state of water
Returns
The thermodynamic state of water
See also
WaterHelmholtzState, WaterThermoState

◆ waterDensityHGK()

auto waterDensityHGK ( Temperature  T,
Pressure  P,
StateOfMatter  stateofmatter 
) -> ThermoScalar

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

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

◆ waterLiquidDensityHGK()

auto waterLiquidDensityHGK ( Temperature  T,
Pressure  P 
) -> ThermoScalar

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

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

◆ waterVaporDensityHGK()

auto waterVaporDensityHGK ( Temperature  T,
Pressure  P 
) -> ThermoScalar

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

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

◆ waterDensityWagnerPruss()

auto waterDensityWagnerPruss ( Temperature  T,
Pressure  P,
StateOfMatter  stateofmatter 
) -> ThermoScalar

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

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

◆ waterLiquidDensityWagnerPruss()

auto waterLiquidDensityWagnerPruss ( Temperature  T,
Pressure  P 
) -> ThermoScalar

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

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

◆ waterVaporDensityWagnerPruss()

auto waterVaporDensityWagnerPruss ( Temperature  T,
Pressure  P 
) -> ThermoScalar

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

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

◆ waterPressureHGK()

auto waterPressureHGK ( Temperature  T,
ThermoScalar  D 
) -> ThermoScalar

Calculate the pressure 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 pressure of water (in units of Pa)

◆ waterPressureWagnerPruss()

auto waterPressureWagnerPruss ( Temperature  T,
ThermoScalar  D 
) -> ThermoScalar

Calculate the pressure 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 pressure of water (in units of Pa)

◆ waterSaturatedPressureWagnerPruss()

auto waterSaturatedPressureWagnerPruss ( Temperature  T) -> ThermoScalar

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

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

◆ waterSaturatedLiquidDensityWagnerPruss()

auto waterSaturatedLiquidDensityWagnerPruss ( Temperature  T) -> ThermoScalar

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

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

◆ waterSaturatedVapourDensityWagnerPruss()

auto waterSaturatedVapourDensityWagnerPruss ( Temperature  T) -> ThermoScalar

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

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