Reaktoro  v2.9.4
A unified framework for modeling chemically reactive systems
Interface.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 // // C++ includes
21 // #include <string>
22 // #include <memory>
23 
24 // // Reaktoro includes
25 // #include <Reaktoro/Common/Matrix.hpp>
26 // #include <Reaktoro/Models/ChemicalModel.hpp>
27 // #include <Reaktoro/Models/ThermoModel.hpp>
28 
29 // namespace Reaktoro {
30 
31 // // Forward declarations
32 // class ChemicalState;
33 // class ChemicalSystem;
34 
35 // /// A class used to interface other codes with Reaktoro.
36 // class Interface
37 // {
38 // public:
39 // /// Virtual destructor
40 // virtual ~Interface() = 0;
41 
42 // /// Return the temperature (in units of K)
43 // virtual auto temperature() const -> double = 0;
44 
45 // /// Return the pressure (in units of Pa)
46 // virtual auto pressure() const -> double = 0;
47 
48 // /// Return the amounts of the species (in units of mol)
49 // virtual auto speciesAmounts() const -> VectorXr = 0;
50 
51 // /// Return the number of elements
52 // virtual auto numElements() const -> unsigned = 0;
53 
54 // /// Return the number of species
55 // virtual auto numSpecies() const -> unsigned = 0;
56 
57 // /// Return the number of phases
58 // virtual auto numPhases() const -> unsigned = 0;
59 
60 // /// Return the number of species in a phase
61 // virtual auto numSpeciesInPhase(Index iphase) const -> unsigned = 0;
62 
63 // /// Return the name of an element
64 // virtual auto elementName(Index ielement) const -> std::string = 0;
65 
66 // /// Return the molar mass of an element (in units of kg/mol)
67 // virtual auto elementMolarMass(Index ielement) const -> double = 0;
68 
69 // /// Return the stoichiometry of an element in a species
70 // virtual auto elementStoichiometry(Index ispecies, Index ielement) const -> double = 0;
71 
72 // /// Return the name of a species
73 // virtual auto speciesName(Index ispecies) const -> std::string = 0;
74 
75 // /// Return the name of a phase
76 // virtual auto phaseName(Index iphase) const -> std::string = 0;
77 
78 // /// Return the thermodynamic properties of the phases and its species.
79 // /// @param iphase The index of the phase
80 // /// @param T The temperature (in units of K)
81 // /// @param P The pressure (in units of Pa)
82 // // virtual auto properties(ThermoModelResult& res, double T, double P) -> void = 0;
83 
84 // /// Return the chemical properties of the phases and its species.
85 // /// @param T The temperature (in units of K)
86 // /// @param P The pressure (in units of Pa)
87 // /// @param n The amounts of the species (in units of mol)
88 // // virtual auto properties(ChemicalModelResult& res, double T, double P, VectorXrConstRef n) -> void = 0;
89 
90 // /// Return a clone of this Interface instance.
91 // virtual auto clone() const -> std::shared_ptr<Interface> = 0;
92 
93 // /// Return the formula matrix of the species
94 // auto formulaMatrix() const -> MatrixXd;
95 
96 // /// Return the index of an element
97 // auto indexElement(std::string element) const -> Index;
98 
99 // /// Return the index of a species
100 // auto indexSpecies(std::string species) const -> Index;
101 
102 // /// Return the index of a phase
103 // auto indexPhase(std::string phase) const -> Index;
104 
105 // /// Return the index of the phase with a species
106 // auto indexPhaseWithSpecies(Index ispecies) const -> Index;
107 
108 // /// Return the index of the first species in a phase
109 // auto indexFirstSpeciesInPhase(Index iphase) const -> Index;
110 
111 // /// Return a ChemicalSystem instance created from an instance of a class derived from Interface.
112 // auto system() const -> ChemicalSystem;
113 
114 // /// Return a ChemicalState instance created from an instance of a class derived from Interface.
115 // /// @param system The chemical system created using method @ref system.
116 // auto state(const ChemicalSystem& system) const -> ChemicalState;
117 
118 // /// Convert the classes derived from Interface into a ChemicalSystem instance
119 // operator ChemicalSystem() const;
120 // };
121 
122 // } // namespace Reaktoro