Reaktoro 
A unified framework for modeling chemically reactive systems
EquilibriumCompositionProblem.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 // Reaktoro includes
21 #include <Reaktoro/Common/ChemicalScalar.hpp>
22 #include <Reaktoro/Math/Matrix.hpp>
23 #include <Reaktoro/Equilibrium/EquilibriumInverseProblem.hpp>
24 
25 namespace Reaktoro {
26 
27 // Forward declarations
28 class ChemicalState;
29 class ChemicalSystem;
30 class Partition;
31 
34 {
35 public:
38 
41 
44 
47 
50 
52  auto system() const -> const ChemicalSystem&;
53 
55  auto partition() const -> const Partition&;
56 
58  auto setPartition(const Partition& partition) -> void;
59 
63  auto setTemperature(double value, std::string units) -> void;
64 
68  auto setPressure(double value, std::string units) -> void;
69 
78  auto setAqueousComposition(std::string molalities) -> void;
79 
88  auto setGaseousComposition(std::string molarfractions) -> void;
89 
100  auto setSolidComposition(std::string volumefractions) -> void;
101 
105  auto setAqueousSaturation(double value) -> void;
106 
110  auto setGaseousSaturation(double value) -> void;
111 
114  auto setPorosity(double value) -> void;
115 
133  operator EquilibriumInverseProblem();
134 
135 private:
136  struct Impl;
137 
138  std::unique_ptr<Impl> pimpl;
139 };
140 
141 } // namespace Reaktoro
142 
auto setTemperature(double value, std::string units) -> void
Set the temperature for the equilibrium calculation.
Definition: EquilibriumCompositionProblem.cpp:296
auto operator=(EquilibriumCompositionProblem other) -> EquilibriumCompositionProblem &
Construct a copy of a EquilibriumCompositionProblem instance.
Definition: EquilibriumCompositionProblem.cpp:275
auto setGaseousSaturation(double value) -> void
Set the saturation of the gaseous fluid.
Definition: EquilibriumCompositionProblem.cpp:321
A class to represent a system and its attributes and properties.
Definition: ChemicalSystem.hpp:47
auto setSolidComposition(std::string volumefractions) -> void
Set the volume fractions of the solid phases.
Definition: EquilibriumCompositionProblem.cpp:326
auto setAqueousSaturation(double value) -> void
Set the saturation of the aqueous fluid.
Definition: EquilibriumCompositionProblem.cpp:316
A class used for defining an inverse equilibrium problem.
Definition: EquilibriumInverseProblem.hpp:56
auto system() const -> const ChemicalSystem &
Return the chemical system.
Definition: EquilibriumCompositionProblem.cpp:281
auto setGaseousComposition(std::string molarfractions) -> void
Set the composition of the gaseous phase using molar fractions of compounds.
Definition: EquilibriumCompositionProblem.cpp:311
auto setAqueousComposition(std::string molalities) -> void
Set the composition of the aqueous phase using molalities of compounds.
Definition: EquilibriumCompositionProblem.cpp:306
Provide a computational representation of the Partition of a chemical system.
Definition: Partition.hpp:55
A type that contains the values of a scalar field and its derivatives.
Definition: EquilibriumCompositionProblem.hpp:33
auto setPorosity(double value) -> void
Set the porosity of the solid matrix.
Definition: EquilibriumCompositionProblem.cpp:331
Definition: Units.cpp:38
EquilibriumCompositionProblem()
Construct a default EquilibriumCompositionProblem instance.
Definition: EquilibriumCompositionProblem.cpp:260
auto setPartition(const Partition &partition) -> void
Set the partition of the chemical system.
Definition: EquilibriumCompositionProblem.cpp:291
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
virtual ~EquilibriumCompositionProblem()
Destroy this instance.
Definition: EquilibriumCompositionProblem.cpp:272
auto partition() const -> const Partition &
Return the partition of the chemical system.
Definition: EquilibriumCompositionProblem.cpp:286
auto setPressure(double value, std::string units) -> void
Set the pressure for the equilibrium calculation.
Definition: EquilibriumCompositionProblem.cpp:301