Reaktoro  v2.9.4
A unified framework for modeling chemically reactive systems
Gems.hpp
1 // // Reaktoro is a unified framework for modeling chemically reactive systems.
2 // //
3 // // Copyright © 2014-2022 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 // // Reaktoro includes
21 // #include <Reaktoro/Extensions/Interfaces/Interface.hpp>
22 
23 // // Forward declarations
24 // class TNode;
25 
26 // namespace Reaktoro {
27 
28 // /// A type that describes the options for Gems
29 // struct GemsOptions
30 // {
31 // /// The flag that indicates if smart start initial approximation is used
32 // bool warmstart = true;
33 // };
34 
35 // /// A wrapper class for Gems code
36 // class Gems : public Interface
37 // {
38 // public:
39 // /// Construct a default Gems instance
40 // Gems();
41 
42 // /// Construct a Gems instance from a specification file
43 // /// @param filename The name of the file containing the definition of the chemical system
44 // Gems(std::string filename);
45 
46 // /// Destroy this Gems instance
47 // virtual ~Gems();
48 
49 // /// Return the temperature (in units of K)
50 // virtual auto temperature() const -> double;
51 
52 // /// Return the pressure (in units of Pa)
53 // virtual auto pressure() const -> double;
54 
55 // /// Return the amounts of the species (in units of mol)
56 // virtual auto speciesAmounts() const -> VectorXr;
57 
58 // /// Return the number of elements
59 // virtual auto numElements() const -> unsigned;
60 
61 // /// Return the number of species
62 // virtual auto numSpecies() const -> unsigned;
63 
64 // /// Return the number of phases
65 // virtual auto numPhases() const -> unsigned;
66 
67 // /// Return the number of species in a phase
68 // virtual auto numSpeciesInPhase(Index iphase) const -> unsigned;
69 
70 // /// Return the name of an element
71 // virtual auto elementName(Index ielement) const -> std::string;
72 
73 // /// Return the molar mass of an element (in units of kg/mol)
74 // virtual auto elementMolarMass(Index ielement) const -> double;
75 
76 // /// Return the stoichiometry of an element in a species
77 // virtual auto elementStoichiometry(Index ispecies, Index ielement) const -> double;
78 
79 // /// Return the name of a species
80 // virtual auto speciesName(Index ispecies) const -> std::string;
81 
82 // /// Return the name of a phase
83 // virtual auto phaseName(Index iphase) const -> std::string;
84 
85 // /// Return the thermodynamic properties of the phases and its species.
86 // /// @param iphase The index of the phase
87 // /// @param T The temperature (in units of K)
88 // /// @param P The pressure (in units of Pa)
89 // virtual auto properties(ThermoModelResult& res, double T, double P) -> void;
90 
91 // /// Return the chemical properties of the phases and its species.
92 // /// @param T The temperature (in units of K)
93 // /// @param P The pressure (in units of Pa)
94 // /// @param n The amounts of the species (in units of mol)
95 // virtual auto properties(ChemicalModelResult& res, double T, double P, VectorXrConstRef n) -> void;
96 
97 // /// Return a clone of this Gems instance
98 // virtual auto clone() const -> std::shared_ptr<Interface>;
99 
100 // /// Set the temperature and pressure of the Gems instance.
101 // /// @param T The temperature (in units of K)
102 // /// @param P The pressure (in units of Pa)
103 // auto set(double T, double P) -> void;
104 
105 // /// Set the temperature, pressure and molar composition of the Gems instance.
106 // /// @param T The temperature (in units of K)
107 // /// @param P The pressure (in units of Pa)
108 // /// @param n The composition of the species (in units of mol)
109 // auto set(double T, double P, VectorXrConstRef n) -> void;
110 
111 // /// Set the options of the Gems instance
112 // auto setOptions(const GemsOptions& options) -> void;
113 
114 // /// Calculate the equilibrium state of the system
115 // /// @param T The temperature for the equilibrium calculation (in units of K)
116 // /// @param P The pressure for the equilibrium calculation (in units of Pa)
117 // /// @param n The amounts of the elements (in units of mol)
118 // auto equilibrate(double T, double P, VectorXrConstRef b) -> void;
119 
120 // /// Return the convergence result of the equilibrium calculation
121 // auto converged() const -> bool;
122 
123 // /// Return the number of iterations of the equilibrium calculation
124 // auto numIterations() const -> unsigned;
125 
126 // /// Return the wall time of the equilibrium calculation (in units of s)
127 // auto elapsedTime() const -> double;
128 
129 // /// Return a shared pointer to the TNode instance of Gems
130 // auto node() const -> std::shared_ptr<TNode>;
131 
132 // private:
133 // struct Impl;
134 
135 // std::shared_ptr<Impl> pimpl;
136 // };
137 
138 // } // namespace Reaktoro