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
-
state The chemical state representing the source. volumerate The volumetric rate of the source. units The 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
-
phase The name of the phase. volumerate The volumetric rate of the phase removal. units The 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
-
volumerate The volumetric rate of the fluid removal. units The 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
-
volumerate The volumetric rate of the solid removal. units The 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
-
state The state of the chemical system tstart The start time of the integration.
◆ step() [1/2]
auto step | ( | ChemicalState & | state, |
double | t | ||
) | -> double |
Integrate one step of the chemical kinetics problem.
- Parameters
-
state The kinetic state of the system [in,out] t The 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
-
state The kinetic state of the system [in,out] t The current time of the integration (in units of seconds) tfinal The 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
-
state The kinetic state of the system t The start time of the integration (in units of seconds) dt The step to be used for the integration from t
tot + dt
(in units of seconds)
The documentation for this class was generated from the following files:
- Reaktoro/Kinetics/KineticSolver.hpp
- Reaktoro/Kinetics/KineticSolver.cpp