Reaktoro  A unified framework for modeling chemically reactive systems
Reaktoro::ChemicalSolver Class Reference

## Detailed Description

A type that describes a solver for many chemical calculations.

#include <ChemicalSolver.hpp>

## Classes

class  Array
A type that represents a one-dimensional array of values. More...

class  Grid
A type that represents a two-dimensional array of values. More...

## Public Member Functions

ChemicalSolver ()
Construct a default ChemicalSolver instance.

ChemicalSolver (const ChemicalSystem &system, Index npoints)
Construct a ChemicalSolver instance with given chemical system and field number of points.

ChemicalSolver (const ReactionSystem &reactions, Index npoints)
Construct a ChemicalSolver instance with given reaction system and field number of points.

auto numPoints () const -> Index
Return the number of field points.

auto numEquilibriumElements () const -> Index
Return the number of equilibrium elements.

auto numKineticSpecies () const -> Index
Return the number of kinetic species.

auto numComponents () const -> Index
Return the number of chemical components.

auto setPartition (const Partition &partition) -> void
Set the partitioning of the chemical system.

auto setStates (const ChemicalState &state) -> void
Set the chemical state of all field points uniformly. More...

auto setStates (const Array< ChemicalState > &states) -> void
Set the chemical state of all field points. More...

auto setStateAt (Index ipoint, const ChemicalState &state) -> void
Set the chemical state at a specified field point. More...

auto setStateAt (const Array< Index > &ipoints, const ChemicalState &state) -> void
Set the same chemical state at all specified field points. More...

auto setStateAt (const Array< Index > &ipoints, const Array< ChemicalState > &states) -> void
Set the chemical state at all specified field points. More...

auto equilibrate (Array< double > T, Array< double > P, Array< double > be) -> void
Equilibrate the chemical state at every field point.

auto equilibrate (Array< double > T, Array< double > P, Grid< double > be) -> void
Equilibrate the chemical state at every field point.

auto react (double t, double dt) -> void
React the chemical state at every field point.

auto state (Index i) const -> const ChemicalState &
Return the chemical state at given index.

auto states () const -> const std::vector< ChemicalState > &
Return the chemical states at all field points.

auto componentAmounts () -> const std::vector< Vector > &
Return the molar amounts of the chemical components at every field point (in units of mol).

auto equilibriumSpeciesAmounts () -> const std::vector< ChemicalField > &
Return the molar amounts of each equilibrium species and their derivatives at every field point.

auto porosity () -> const ChemicalField &
Return the porosity at every field point.

auto fluidSaturations () -> const std::vector< ChemicalField > &
Return the saturations of the fluid phases at every field point.

auto fluidDensities () -> const std::vector< ChemicalField > &
Return the densities of the fluid phases at every field point (in units of kg/m3).

auto fluidVolumes () -> const std::vector< ChemicalField > &
Return the volumes of the fluid phases at every field point (in units of m3).

auto fluidTotalVolume () -> const ChemicalField &
Return the total volume of the fluid phases at every field point (in units of m3).

auto solidTotalVolume () -> const ChemicalField &
Return the total volume of the solid phases at every field point (in units of m3).

auto componentRates () -> const std::vector< ChemicalField > &
Return the kinetic rates of the chemical components at every field point (in units of mol/s).

## Member Function Documentation

 auto Reaktoro::ChemicalSolver::setStates ( const ChemicalState & state ) -> void

Set the chemical state of all field points uniformly.

Parameters
 state The state of the chemical system.
 auto Reaktoro::ChemicalSolver::setStates ( const Array< ChemicalState > & states ) -> void

Set the chemical state of all field points.

Parameters
 states The array of states of the chemical system.
 auto Reaktoro::ChemicalSolver::setStateAt ( Index ipoint, const ChemicalState & state ) -> void

Set the chemical state at a specified field point.

Parameters
 ipoint The index of the field point. state The state of the chemical system.
 auto Reaktoro::ChemicalSolver::setStateAt ( const Array< Index > & ipoints, const ChemicalState & state ) -> void

Set the same chemical state at all specified field points.

Parameters
 ipoints The indices of the field points. state The state of the chemical system.
 auto Reaktoro::ChemicalSolver::setStateAt ( const Array< Index > & ipoints, const Array< ChemicalState > & states ) -> void

Set the chemical state at all specified field points.

Parameters
 ipoints The indices of the field points. states The states of the chemical system.

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