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

Detailed Description

A class that represents a system of chemical reactions.

The ReactionSystem class is a collection of Reaction instances. It provides convenient methods that calculates the equilibrium constants, reaction quotients, and rates of the reactions.

See also
Reaction, ChemicalSystem, ChemicalSystem

#include <ReactionSystem.hpp>

Public Member Functions

 ReactionSystem ()
 Construct a default ReactionSystem instances.
 
 ReactionSystem (const ChemicalSystem &system, const std::vector< Reaction > &reactions)
 Construct a ReactionSystem instance with given reactions.
 
virtual ~ReactionSystem ()
 Destroy this ReactionSystem instance.
 
auto numReactions () const -> unsigned
 Return the number of reactions in the reaction system.
 
auto indexReaction (std::string name) const -> Index
 Return the index of the reaction with given name.
 
auto indexReactionWithError (std::string name) const -> Index
 Return the index of the reaction with given name. More...
 
auto reactions () const -> const std::vector< Reaction > &
 Return the reactions in the reaction system.
 
auto reaction (Index index) const -> const Reaction &
 Return the reaction in the reaction system with given index. More...
 
auto reaction (std::string name) const -> const Reaction &
 Return the reaction in the reaction system with given name. More...
 
auto stoichiometricMatrix () const -> const Matrix &
 Return the stoichiometric matrix of the reaction system.
 
auto system () const -> const ChemicalSystem &
 Return the chemical system instance.
 
auto lnEquilibriumConstants (const ChemicalProperties &properties) const -> ThermoVector
 Calculate the equilibrium constants of the reactions. More...
 
auto lnReactionQuotients (const ChemicalProperties &properties) const -> ChemicalVector
 Calculate the reaction quotients of the reactions. More...
 
auto rates (const ChemicalProperties &properties) const -> ChemicalVector
 Calculate the kinetic rates of the reactions. More...
 

Member Function Documentation

auto Reaktoro::ReactionSystem::indexReactionWithError ( std::string  name) const -> Index

Return the index of the reaction with given name.

It throws an exception if the element does not exist.

auto Reaktoro::ReactionSystem::reaction ( Index  index) const -> const Reaction&

Return the reaction in the reaction system with given index.

Parameters
indexThe index of the reaction
auto Reaktoro::ReactionSystem::reaction ( std::string  name) const -> const Reaction&

Return the reaction in the reaction system with given name.

Parameters
nameThe name of the reaction
auto Reaktoro::ReactionSystem::lnEquilibriumConstants ( const ChemicalProperties properties) const -> ThermoVector

Calculate the equilibrium constants of the reactions.

Parameters
propertiesThe chemical properties of the system
auto Reaktoro::ReactionSystem::lnReactionQuotients ( const ChemicalProperties properties) const -> ChemicalVector

Calculate the reaction quotients of the reactions.

Parameters
propertiesThe chemical properties of the system
auto Reaktoro::ReactionSystem::rates ( const ChemicalProperties properties) const -> ChemicalVector

Calculate the kinetic rates of the reactions.

Parameters
propertiesThe thermodynamic properties of the system

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