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-2015 Allan Leal
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program 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
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. 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
std::vector< MineralCatalyst > catalysts
The catalysts of the mineral reaction.
Definition: MineralMechanism.hpp:100
double kappa
The kinetic rate constant of the mineral reaction at 298.15 K (in units of mol/(m2*s)) ...
Definition: MineralMechanism.hpp:88
auto setPowerP(double value) -> MineralMechanism &
Set the power parameter p of the mineral mechanism.
Definition: MineralMechanism.cpp:116
auto setCatalysts(std::string catalysts) -> MineralMechanism &
Set the mineral catalysts of the mineral mechanism.
Definition: MineralMechanism.cpp:128
Definition: MineralCatalyst.hpp:25
double q
The empirical and dimensionless power parameter q.
Definition: MineralMechanism.hpp:97
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
auto setPowerQ(double value) -> MineralMechanism &
Set the power parameter q of the mineral mechanism.
Definition: MineralMechanism.cpp:122
double p
The empirical and dimensionless power parameter p.
Definition: MineralMechanism.hpp:94
Definition: MineralMechanism.hpp:29
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
MineralMechanism()
Construct a default MineralMechanism instance.
Definition: MineralMechanism.cpp:65
auto setActivationEnergy(double value, std::string unit) -> MineralMechanism &
Set the Arrhenius activation energy of the mineral reaction.
Definition: MineralMechanism.cpp:109
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