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

Detailed Description

A class that represents a solver for chemical kinetics problems.

See also
KineticProblem

#include <KineticSolver.hpp>

Public Member Functions

 KineticSolver ()
 Construct a default KineticSolver instance.
 
 KineticSolver (const ReactionSystem &reactions)
 Construct a KineticSolver instance.
 
 KineticSolver (const KineticSolver &other)
 Construct a copy of a KineticSolver instance.
 
virtual ~KineticSolver ()
 Destroy the KineticSolver instance.
 
auto operator= (KineticSolver other) -> KineticSolver &
 Assign a KineticSolver instance to this instance.
 
auto setOptions (const KineticOptions &options) -> void
 Set the options for the chemical kinetics calculation.
 
auto setPartition (const Partition &partition) -> void
 Set the partition of the chemical system. More...
 
auto addSource (const ChemicalState &state, double volumerate, std::string units) -> void
 Add a source to the chemical kinetics problem. More...
 
auto addPhaseSink (std::string phase, double volumerate, std::string units) -> void
 Add a phase sink to the chemical kinetics problem. More...
 
auto addFluidSink (double volumerate, std::string units) -> void
 Add a fluid sink to the chemical kinetics problem. More...
 
auto addSolidSink (double volumerate, std::string units) -> void
 Add a solid sink to the chemical kinetics problem. More...
 
auto initialize (ChemicalState &state, double tstart) -> void
 Initialize the chemical kinetics solver before . More...
 
auto step (ChemicalState &state, double &t) -> void
 Integrate one step of the chemical kinetics problem. More...
 
auto step (ChemicalState &state, double &t, double tfinal) -> void
 Integrate one step of the chemical kinetics problem with a time step that does not go beyond a specified one. More...
 
auto solve (ChemicalState &state, double t, double dt) -> void
 Solve the chemical kinetics problem from a given initial time to a final time. More...
 

Member Function Documentation

auto Reaktoro::KineticSolver::setPartition ( const Partition partition) -> void

Set the partition of the chemical system.

Use this method to specify the equilibrium, kinetic, and inert species.

auto Reaktoro::KineticSolver::addSource ( const ChemicalState state,
double  volumerate,
std::string  units 
) -> void

Add a source to the chemical kinetics problem.

Parameters
stateThe chemical state representing the source.
volumerateThe volumetric rate of the source.
unitsThe units of the volumetric rate (compatible with m3/s).
auto Reaktoro::KineticSolver::addPhaseSink ( std::string  phase,
double  volumerate,
std::string  units 
) -> void

Add a phase sink to the chemical kinetics problem.

This method allows the chemical kinetics problem to account for the sink (i.e., the removal) of a phase from the system.

Parameters
phaseThe name of the phase.
volumerateThe volumetric rate of the phase removal.
unitsThe units of the volumetric rate (compatible with m3/s).
auto Reaktoro::KineticSolver::addFluidSink ( double  volumerate,
std::string  units 
) -> void

Add a fluid sink to the chemical kinetics problem.

This method allows the chemical kinetics problem to account for the sink (i.e., the removal) of fluid from the system.

Parameters
volumerateThe volumetric rate of the fluid removal.
unitsThe units of the volumetric rate (compatible with m3/s).
auto Reaktoro::KineticSolver::addSolidSink ( double  volumerate,
std::string  units 
) -> void

Add a solid sink to the chemical kinetics problem.

This method allows the chemical kinetics problem to account for the sink (i.e., the removal) of solid from the system.

Parameters
volumerateThe volumetric rate of the solid removal.
unitsThe units of the volumetric rate (compatible with m3/s).
auto Reaktoro::KineticSolver::initialize ( ChemicalState state,
double  tstart 
) -> void

Initialize the chemical kinetics solver before .

This method should be invoked whenever the user intends to make a call to KineticsSolver::step.

Parameters
stateThe state of the chemical system
tstartThe start time of the integration.
auto Reaktoro::KineticSolver::step ( ChemicalState state,
double &  t 
) -> void

Integrate one step of the chemical kinetics problem.

Parameters
stateThe kinetic state of the system
[in,out]tThe current time of the integration, updated after the calculation (in units of seconds)
auto Reaktoro::KineticSolver::step ( ChemicalState state,
double &  t,
double  tfinal 
) -> void

Integrate one step of the chemical kinetics problem with a time step that does not go beyond a specified one.

Parameters
stateThe kinetic state of the system
[in,out]tThe current time of the integration, updated after the calculation (in units of seconds)
tfinalThe final time of the integration (in units of seconds)
auto Reaktoro::KineticSolver::solve ( ChemicalState state,
double  t,
double  dt 
) -> void

Solve the chemical kinetics problem from a given initial time to a final time.

Parameters
stateThe kinetic state of the system
tThe start time of the integration (in units of seconds)
dtThe step to be used for the integration from t to t + dt (in units of seconds)

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