Reaktoro  v2.11.0
A unified framework for modeling chemically reactive systems
EquilibriumDims.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright © 2014-2024 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/Common/Index.hpp>
22 
23 namespace Reaktoro {
24 
25 // Forward declarations
26 class EquilibriumSpecs;
27 
47 {
48  Index Ne = 0;
49  Index Nn = 0;
50  Index Np = 0;
51  Index Nq = 0;
52  Index Nv = 0;
53  Index Nr = 0;
54  Index Nb = 0;
55  Index Nc = 0;
56  Index Nt = 0;
57  Index Nx = 0;
58  Index Nu = 0;
59  Index Nw = 0;
60 
62  EquilibriumDims() = default;
63 
65  explicit EquilibriumDims(EquilibriumSpecs const& specs);
66 };
67 
68 } // namespace Reaktoro
The class used to define conditions to be satisfied at chemical equilibrium.
Definition: EquilibriumSpecs.hpp:281
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
std::size_t Index
Define a type that represents an index.
Definition: Index.hpp:26
The dimensions of the variables in a chemical equilibrium problem.
Definition: EquilibriumDims.hpp:47
Index Nq
The number of q control variables (amounts of implicit titrants).
Definition: EquilibriumDims.hpp:51
Index Nv
The number of equations constraints in the chemical equilibrium problem.
Definition: EquilibriumDims.hpp:52
EquilibriumDims(EquilibriumSpecs const &specs)
Construct an EquilibriumDims object with given equilibrium specifications.
Index Nn
The number of species in the chemical system.
Definition: EquilibriumDims.hpp:49
Index Nt
The number of substances for which the chemical system is open to (the number of explicit and implici...
Definition: EquilibriumDims.hpp:56
Index Nb
The number of elements and charge in the chemical system (equivalent to 1 + Ne).
Definition: EquilibriumDims.hpp:54
Index Nw
The number of input variables w in the chemical equilibrium problem.
Definition: EquilibriumDims.hpp:59
Index Nc
The number of conservative components (electric charge, chemical elements, extent of restricted react...
Definition: EquilibriumDims.hpp:55
Index Nr
The number of reactivity constraints (i.e., restricted reactions) in the chemical equilibrium problem...
Definition: EquilibriumDims.hpp:53
Index Np
The number of p control variables (temperature, pressure, amounts of explicit titrants,...
Definition: EquilibriumDims.hpp:50
Index Ne
The number of elements in the chemical system.
Definition: EquilibriumDims.hpp:48
EquilibriumDims()=default
Construct a default EquilibriumDims object.
Index Nu
The number of unknown variables in the chemical equilibrium problem (equivalent to Nn + Np + Nq).
Definition: EquilibriumDims.hpp:58
Index Nx
The number of variables x in x = (n, q) (equivalent to Nn + Nq).
Definition: EquilibriumDims.hpp:57