Reaktoro 
A unified framework for modeling chemically reactive systems
AqueousPhase.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 <memory>
23 
24 // Reaktoro includes
25 #include <Reaktoro/Core/Phase.hpp>
26 #include <Reaktoro/Thermodynamics/Activity/AqueousActivityModel.hpp>
27 
28 namespace Reaktoro {
29 
30 // Forward declarations
31 class AqueousMixture;
32 class DebyeHuckelParams;
33 
35 class AqueousPhase : public Phase
36 {
37 public:
39  AqueousPhase();
40 
42  explicit AqueousPhase(const AqueousMixture& mixture);
43 
50  auto setInterpolationPoints(const std::vector<double>& temperatures, const std::vector<double>& pressures) -> AqueousPhase&;
51 
54 
60 
63 
70 
75  auto setActivityModel(std::string species, const AqueousActivityModel& activity) -> AqueousPhase&;
76 
79  auto setActivityModelIdeal(std::string species) -> AqueousPhase&;
80 
84  auto setActivityModelSetschenow(std::string species, double b) -> AqueousPhase&;
85 
88 
91 
94 
96  auto mixture() const -> const AqueousMixture&;
97 
98 private:
99  struct Impl;
100 
101  std::shared_ptr<Impl> pimpl;
102 };
103 
104 } // namespace Reaktoro
A type used to define a phase and its attributes.
Definition: Phase.hpp:45
auto setActivityModelIdeal(std::string species) -> AqueousPhase &
Set the activity model of the species to be the ideal one.
Definition: AqueousPhase.cpp:167
auto setActivityModel(std::string species, const AqueousActivityModel &activity) -> AqueousPhase &
Set the activity model of a species.
Definition: AqueousPhase.cpp:158
auto species() const -> const std::vector< Species > &
Return the species of the phase.
Definition: Phase.cpp:115
auto setActivityModelDrummondCO2() -> AqueousPhase &
Set the activity model of CO2(aq) to be the one of Drummond (1981).
Definition: AqueousPhase.cpp:194
auto setChemicalModelHKF() -> AqueousPhase &
}
Definition: AqueousPhase.cpp:142
A class used to define the parameters in the Debye–Hückel activity model for aqueous mixtures...
Definition: AqueousChemicalModelDebyeHuckel.hpp:113
auto setChemicalModelIdeal() -> AqueousPhase &
Set the chemical model of the phase with the ideal aqueous solution equation of state.
Definition: AqueousPhase.cpp:121
auto setActivityModelSetschenow(std::string species, double b) -> AqueousPhase &
Set the activity model of the species to be the Setschenow one.
Definition: AqueousPhase.cpp:176
auto setActivityModelRumpfCO2() -> AqueousPhase &
Set the activity model of CO2(aq) to be the one of Rumpf et al. (1994).
Definition: AqueousPhase.cpp:203
std::function< ChemicalScalar(const AqueousMixtureState &)> AqueousActivityModel
The signature of a function that calculates the ln activity coefficient of a neutral aqueous species...
Definition: AqueousActivityModel.hpp:34
auto mixture() const -> const AqueousMixture &
Return the AqueousMixture instance.
Definition: AqueousPhase.cpp:212
auto setActivityModelDuanSunCO2() -> AqueousPhase &
Set the activity model of CO2(aq) to be the one of Duan and Sun (2003).
Definition: AqueousPhase.cpp:185
auto setChemicalModelPitzerHMW() -> AqueousPhase &
Set the chemical model of the phase with the Pitzer equation of state.
Definition: AqueousPhase.cpp:150
auto setInterpolationPoints(const std::vector< double > &temperatures, const std::vector< double > &pressures) -> AqueousPhase &
Set the temperature and pressure interpolation points for calculation of water density and water diel...
Definition: AqueousPhase.cpp:115
A type used to describe an aqueous phase.
Definition: AqueousPhase.hpp:35
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
AqueousPhase()
Construct a default AqueousPhase instance.
Definition: AqueousPhase.cpp:95
auto setChemicalModelDebyeHuckel() -> AqueousPhase &
Set the chemical model of the phase with the Debye-Huckel equation of state.
Definition: AqueousPhase.cpp:129
A type used to describe an aqueous mixture.
Definition: AqueousMixture.hpp:59