Reaktoro
A unified framework for modeling chemically reactive systems
MineralMechanism.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright (C) 2014-2018 Allan Leal
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library. If not, see <http://www.gnu.org/licenses/>.
17 
18 #pragma once
19 
20 // C++ includes
21 #include <string>
22 #include <vector>
23 
24 // Reaktoro includes
25 #include <Reaktoro/Thermodynamics/Reactions/MineralCatalyst.hpp>
26 
27 namespace Reaktoro {
28 
30 {
33 
45  MineralMechanism(std::string mechanism);
46 
51  auto setRateConstant(double value, std::string unit) -> MineralMechanism&;
52 
57  auto setActivationEnergy(double value, std::string unit) -> MineralMechanism&;
58 
62  auto setPowerP(double value) -> MineralMechanism&;
63 
67  auto setPowerQ(double value) -> MineralMechanism&;
68 
73  auto setCatalysts(std::string catalysts) -> MineralMechanism&;
74 
79  auto setCatalysts(const MineralCatalyst& catalyst) -> MineralMechanism&;
80 
85  auto setCatalysts(const std::vector<MineralCatalyst>& catalysts) -> MineralMechanism&;
86 
88  double kappa = 0.0;
89 
91  double Ea = 0.0;
92 
94  double p = 1.0;
95 
97  double q = 1.0;
98 
100  std::vector<MineralCatalyst> catalysts;
101 };
102 
104 auto operator<(const MineralMechanism& lhs, const MineralMechanism& rhs) -> bool;
105 
107 auto operator==(const MineralMechanism& lhs, const MineralMechanism& rhs) -> bool;
108 
109 } // namespace Reaktoro
auto setRateConstant(double value, std::string unit) -> MineralMechanism &
Set the kinetic rate constant of the mineral reaction at 298.15 K.
Definition: MineralMechanism.cpp:102
auto setPowerP(double value) -> MineralMechanism &
Set the power parameter p of the mineral mechanism.
Definition: MineralMechanism.cpp:116
auto setPowerQ(double value) -> MineralMechanism &
Set the power parameter q of the mineral mechanism.
Definition: MineralMechanism.cpp:122
auto setCatalysts(std::string catalysts) -> MineralMechanism &
Set the mineral catalysts of the mineral mechanism.
Definition: MineralMechanism.cpp:128
MineralMechanism()
Construct a default MineralMechanism instance.
Definition: MineralMechanism.cpp:65
double q
The empirical and dimensionless power parameter q.
Definition: MineralMechanism.hpp:97
double kappa
The kinetic rate constant of the mineral reaction at 298.15 K (in units of mol/(m2*s))
Definition: MineralMechanism.hpp:88
double p
The empirical and dimensionless power parameter p.
Definition: MineralMechanism.hpp:94
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
Definition: MineralCatalyst.hpp:26
std::vector< MineralCatalyst > catalysts
The catalysts of the mineral reaction.
Definition: MineralMechanism.hpp:100
Definition: MineralMechanism.hpp:30
auto setActivationEnergy(double value, std::string unit) -> MineralMechanism &
Set the Arrhenius activation energy of the mineral reaction.
Definition: MineralMechanism.cpp:109
double Ea
The Arrhenius activation energy of the mineral reaction (in units of kJ/mol)
Definition: MineralMechanism.hpp:91
auto unit(Index rows, Index i) -> decltype(Vector::Unit(rows, i))
Return an expression of a unit vector.
Definition: Matrix.hxx:47