Reaktoro
A unified framework for modeling chemically reactive systems
EquilibriumSolver Class Reference

A solver class for solving chemical equilibrium calculations. More...

#include <EquilibriumSolver.hpp>

Public Member Functions

 EquilibriumSolver ()
 Construct a default EquilibriumSolver instance.
 
 EquilibriumSolver (const ChemicalSystem &system)
 Construct an EquilibriumSolver instance.
 
 EquilibriumSolver (const EquilibriumSolver &other)
 Construct a copy of an EquilibriumSolver instance.
 
virtual ~EquilibriumSolver ()
 Destroy this EquilibriumSolver instance.
 
auto operator= (EquilibriumSolver other) -> EquilibriumSolver &
 Assign a copy of an EquilibriumSolver instance.
 
auto setOptions (const EquilibriumOptions &options) -> void
 Set the options of the equilibrium solver.
 
auto setPartition (const Partition &partition) -> void
 Set the partition of the chemical system.
 
auto approximate (ChemicalState &state, double T, double P, VectorConstRef be) -> EquilibriumResult
 Find an initial feasible guess for an equilibrium problem. More...
 
auto approximate (ChemicalState &state, const EquilibriumProblem &problem) -> EquilibriumResult
 Find an initial feasible guess for an equilibrium problem. More...
 
auto approximate (ChemicalState &state) -> EquilibriumResult
 Find an initial feasible guess for an equilibrium problem. More...
 
auto solve (ChemicalState &state, double T, double P, VectorConstRef be) -> EquilibriumResult
 Solve an equilibrium problem with given molar amounts of the elements in the equilibrium partition. More...
 
auto solve (ChemicalState &state, double T, double P, const double *be) -> EquilibriumResult
 Solve an equilibrium problem with given molar amounts of the elements in the equilibrium partition. More...
 
auto solve (ChemicalState &state, const EquilibriumProblem &problem) -> EquilibriumResult
 Solve an equilibrium problem with given equilibrium problem. More...
 
auto solve (ChemicalState &state) -> EquilibriumResult
 Solve an equilibrium problem with given chemical state in disequilibrium. More...
 
auto properties () const -> const ChemicalProperties &
 Return the chemical properties of the calculated equilibrium state.
 
auto sensitivity () -> const EquilibriumSensitivity &
 Return the sensitivity of the equilibrium state. More...
 
auto dndT () -> VectorConstRef
 Compute the sensitivity of the species amounts with respect to temperature.
 
auto dndP () -> VectorConstRef
 Compute the sensitivity of the species amounts with respect to pressure.
 
auto dndb () -> VectorConstRef
 Compute the sensitivity of the species amounts with respect to element amounts.
 

Detailed Description

A solver class for solving chemical equilibrium calculations.

Member Function Documentation

auto approximate ( ChemicalState state,
double  T,
double  P,
VectorConstRef  be 
) -> EquilibriumResult

Find an initial feasible guess for an equilibrium problem.

Parameters
state[in,out]The initial guess and the final state of the equilibrium approximation
beThe molar amounts of the elements in the equilibrium partition
auto approximate ( ChemicalState state,
const EquilibriumProblem problem 
) -> EquilibriumResult

Find an initial feasible guess for an equilibrium problem.

Parameters
state[in,out]The initial guess and the final state of the equilibrium approximation
problemThe equilibrium problem with given temperature, pressure, and element amounts.
auto approximate ( ChemicalState state) -> EquilibriumResult

Find an initial feasible guess for an equilibrium problem.

Parameters
state[in,out]The initial guess and the final state of the equilibrium approximation
auto solve ( ChemicalState state,
double  T,
double  P,
VectorConstRef  be 
) -> EquilibriumResult

Solve an equilibrium problem with given molar amounts of the elements in the equilibrium partition.

Parameters
state[in,out]The initial guess and the final state of the equilibrium calculation
beThe molar amounts of the elements in the equilibrium partition
auto solve ( ChemicalState state,
double  T,
double  P,
const double *  be 
) -> EquilibriumResult

Solve an equilibrium problem with given molar amounts of the elements in the equilibrium partition.

Parameters
state[in,out]The initial guess and the final state of the equilibrium calculation
TThe temperature (in units of K)
PThe pressure (in units of Pa)
beThe molar amounts of the elements in the equilibrium partition
auto solve ( ChemicalState state,
const EquilibriumProblem problem 
) -> EquilibriumResult

Solve an equilibrium problem with given equilibrium problem.

Parameters
state[in,out]The initial guess and the final state of the equilibrium calculation
problemThe equilibrium problem with given temperature, pressure, and element amounts.
auto solve ( ChemicalState state) -> EquilibriumResult

Solve an equilibrium problem with given chemical state in disequilibrium.

Parameters
state[in,out]The initial guess and the final state of the equilibrium calculation
auto sensitivity ( ) -> const EquilibriumSensitivity&

Return the sensitivity of the equilibrium state.

The sensitivity of the equilibrium state is defined as the rate of change of the molar amounts of the equilibrium species with respect to temperature T, pressure P, and molar amounts of equilibrium elements be.


The documentation for this class was generated from the following files: