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

A class that represents a solver for chemical kinetics problems. More...

#include <KineticSolver.hpp>

Public Member Functions

 KineticSolver ()
 Construct a default KineticSolver instance.
 
 KineticSolver (const ReactionSystem &reactions)
 Construct a KineticSolver instance.
 
 KineticSolver (const KineticSolver &other)=delete
 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) -> double
 Integrate one step of the chemical kinetics problem. More...
 
auto step (ChemicalState &state, double t, double tfinal) -> double
 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...
 

Detailed Description

A class that represents a solver for chemical kinetics problems.

See also
KineticProblem

Member Function Documentation

◆ setPartition()

auto setPartition ( const Partition partition) -> void

Set the partition of the chemical system.

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

◆ addSource()

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

◆ addPhaseSink()

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

◆ addFluidSink()

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

◆ addSolidSink()

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

◆ initialize()

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

◆ step() [1/2]

auto step ( ChemicalState state,
double  t 
) -> double

Integrate one step of the chemical kinetics problem.

Parameters
stateThe kinetic state of the system
[in,out]tThe current time of the integration (in units of seconds)
Returns
The updated current time after the kinetic step.

◆ step() [2/2]

auto step ( ChemicalState state,
double  t,
double  tfinal 
) -> double

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 (in units of seconds)
tfinalThe final time of the integration (in units of seconds)
Returns
The updated current time after the kinetic step.

◆ solve()

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