OGS
ChemicalReaction.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <limits>
7#include <vector>
8
9namespace ChemistryLib
10{
12{
14{
15 explicit ChemicalReaction(std::vector<double> stoichiometric_vector_)
16 : stoichiometric_vector(std::move(stoichiometric_vector_))
17 {
18 }
19
20 virtual ~ChemicalReaction() = default;
21
22 virtual double getKineticPrefactor() const
23 {
24 return std::numeric_limits<double>::quiet_NaN();
25 }
26
27 std::vector<double> stoichiometric_vector;
28};
29
38{
39 FirstOrderReaction(std::vector<double> stoichiometric_vector_,
40 double first_order_rate_constant_)
41 : ChemicalReaction(std::move(stoichiometric_vector_)),
42 first_order_rate_constant(first_order_rate_constant_)
43 {
44 }
45
46 double getKineticPrefactor() const override
47 {
49 }
50
52private:
54};
55} // namespace SelfContainedSolverData
56} // namespace ChemistryLib
ChemicalReaction(std::vector< double > stoichiometric_vector_)
FirstOrderReaction(std::vector< double > stoichiometric_vector_, double first_order_rate_constant_)
double first_order_rate_constant
the first order rate constant for first-order reaction.