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-2018 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 <memory>
22 #include <string>
23 #include <vector>
24 
25 // Reaktoro includes
26 #include <Reaktoro/Core/Phase.hpp>
27 #include <Reaktoro/Thermodynamics/Activity/AqueousActivityModel.hpp>
28 
29 namespace Reaktoro {
30 
31 // Forward declarations
32 class AqueousMixture;
33 class DebyeHuckelParams;
34 
36 class AqueousPhase : public Phase
37 {
38 public:
40  AqueousPhase();
41 
43  explicit AqueousPhase(const AqueousMixture& mixture);
44 
51  auto setInterpolationPoints(const std::vector<double>& temperatures, const std::vector<double>& pressures) -> AqueousPhase&;
52 
55 
61 
64 
71 
76  auto setActivityModel(std::string species, const AqueousActivityModel& activity) -> AqueousPhase&;
77 
80  auto setActivityModelIdeal(std::string species) -> AqueousPhase&;
81 
85  auto setActivityModelSetschenow(std::string species, double b) -> AqueousPhase&;
86 
89 
92 
95 
97  auto mixture() const -> const AqueousMixture&;
98 
99 private:
100  struct Impl;
101 
102  std::shared_ptr<Impl> pimpl;
103 };
104 
105 } // namespace Reaktoro
auto setActivityModel(std::string species, const AqueousActivityModel &activity) -> AqueousPhase &
Set the activity model of a species.
Definition: AqueousPhase.cpp:162
auto setActivityModelDuanSunCO2() -> AqueousPhase &
Set the activity model of CO2(aq) to be the one of Duan and Sun (2003).
Definition: AqueousPhase.cpp:189
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 setActivityModelDrummondCO2() -> AqueousPhase &
Set the activity model of CO2(aq) to be the one of Drummond (1981).
Definition: AqueousPhase.cpp:198
auto setActivityModelRumpfCO2() -> AqueousPhase &
Set the activity model of CO2(aq) to be the one of Rumpf et al. (1994).
Definition: AqueousPhase.cpp:207
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:119
AqueousPhase()
Construct a default AqueousPhase instance.
Definition: AqueousPhase.cpp:96
auto setChemicalModelIdeal() -> AqueousPhase &
Set the chemical model of the phase with the ideal aqueous solution equation of state.
Definition: AqueousPhase.cpp:125
A type used to describe an aqueous phase.
Definition: AqueousPhase.hpp:37
A class used to define the parameters in the Debye–Hückel activity model for aqueous mixtures.
Definition: AqueousChemicalModelDebyeHuckel.hpp:114
auto setChemicalModelPitzerHMW() -> AqueousPhase &
Set the chemical model of the phase with the Pitzer equation of state.
Definition: AqueousPhase.cpp:154
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
A type used to describe an aqueous mixture.
Definition: AqueousMixture.hpp:60
auto setActivityModelIdeal(std::string species) -> AqueousPhase &
Set the activity model of the species to be the ideal one.
Definition: AqueousPhase.cpp:171
A type used to define a phase and its attributes.
Definition: Phase.hpp:42
auto setChemicalModelDebyeHuckel() -> AqueousPhase &
Set the chemical model of the phase with the Debye-Huckel equation of state.
Definition: AqueousPhase.cpp:133
auto setChemicalModelHKF() -> AqueousPhase &
}
Definition: AqueousPhase.cpp:146
auto mixture() const -> const AqueousMixture &
Return the AqueousMixture instance.
Definition: AqueousPhase.cpp:216
auto setActivityModelSetschenow(std::string species, double b) -> AqueousPhase &
Set the activity model of the species to be the Setschenow one.
Definition: AqueousPhase.cpp:180
auto species() const -> const std::vector< Species > &
Return the species of the phase.
Definition: Phase.cpp:134