Reaktoro
A unified framework for modeling chemically reactive systems
AqueousChemicalModelDebyeHuckel.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 <map>
22 #include <memory>
23 
24 // Reaktoro includes
25 #include <Reaktoro/Thermodynamics/Models/PhaseChemicalModel.hpp>
26 
27 namespace Reaktoro {
28 
29 // Forward declarations
30 class AqueousMixture;
31 class DebyeHuckelParams;
32 
38 auto aqueousChemicalModelDebyeHuckel(const AqueousMixture& mixture, const DebyeHuckelParams& params) -> PhaseChemicalModel;
39 
114 {
115 public:
118 
121  auto aiondefault(double value) -> void;
122 
124  auto aiondefault() const -> double;
125 
129  auto aion(std::string name, double value) -> void;
130 
133  auto aion(const std::map<std::string, double>& pairs) -> void;
134 
140  auto aion(double value) -> void;
141 
144  auto aion(std::string name) const -> double;
145 
148  auto biondefault(double value) -> void;
149 
151  auto biondefault() const -> double;
152 
156  auto bion(std::string name, double value) -> void;
157 
160  auto bion(const std::map<std::string, double>& pairs) -> void;
161 
167  auto bion(double value) -> void;
168 
171  auto bion(std::string name) const -> double;
172 
175  auto bneutraldefault(double value) -> void;
176 
178  auto bneutraldefault() const -> double;
179 
183  auto bneutral(std::string name, double value) -> void;
184 
187  auto bneutral(const std::map<std::string, double>& pairs) -> void;
188 
194  auto bneutral(double value) -> void;
195 
201  auto bneutral(std::string name) const -> double;
202 
215  auto setLimitingLaw() -> void;
216 
248  auto setKielland1937() -> void;
249 
295  auto setWATEQ4F() -> void;
296 
356  auto setPHREEQC() -> void;
357 
358 private:
359  struct Impl;
360 
361  std::shared_ptr<Impl> pimpl;
362 };
363 
364 } // namespace Reaktoro
auto bion(std::string name, double value) -> void
Set the value of the Debye–Hückel parameter b of a given ionic species.
Definition: AqueousChemicalModelDebyeHuckel.cpp:269
auto biondefault() const -> double
Return the default Debye–Hückel parameter b to be used for ionic species lacking such data.
Definition: AqueousChemicalModelDebyeHuckel.cpp:264
DebyeHuckelParams()
Construct a default DebyeHuckelParams instance.
Definition: AqueousChemicalModelDebyeHuckel.cpp:219
auto setLimitingLaw() -> void
Set the Debye–Hückel limiting law model for the ionic species.
Definition: AqueousChemicalModelDebyeHuckel.cpp:327
A class used to define the parameters in the Debye–Hückel activity model for aqueous mixtures.
Definition: AqueousChemicalModelDebyeHuckel.hpp:114
auto setPHREEQC() -> void
Set the Debye–Hückel parameters å and b of the species according to PHREEQC v3.
Definition: AqueousChemicalModelDebyeHuckel.cpp:344
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto aqueousChemicalModelDebyeHuckel(const AqueousMixture &mixture, const DebyeHuckelParams &params) -> PhaseChemicalModel
Return an equation of state for an aqueous phase based on the Debye–Hückel activity model.
Definition: AqueousChemicalModelDebyeHuckel.cpp:36
auto bneutral(std::string name, double value) -> void
Set the value of the b parameter of a given neutral species.
Definition: AqueousChemicalModelDebyeHuckel.cpp:303
auto setKielland1937() -> void
Set the ion-size parameters å according to the values given in Kielland (1937).
Definition: AqueousChemicalModelDebyeHuckel.cpp:333
std::function< void(PhaseChemicalModelResult &, Temperature, Pressure, VectorConstRef)> PhaseChemicalModel
The signature of the chemical model function that calculates the chemical properties of the species i...
Definition: PhaseChemicalModel.hpp:66
auto aiondefault() const -> double
Return the default ion-size parameter value to be used for ionic species lacking such data.
Definition: AqueousChemicalModelDebyeHuckel.cpp:230
auto aion(std::string name, double value) -> void
Set the ion-size parameter value of a given ionic species (in units of Å).
Definition: AqueousChemicalModelDebyeHuckel.cpp:235
auto setWATEQ4F() -> void
Set the Debye–Hückel parameters å and b of the ionic species according to WATEQ4F .
Definition: AqueousChemicalModelDebyeHuckel.cpp:338
auto bneutraldefault() const -> double
Return the default value of the b parameter to be used neutral species lacking such data.
Definition: AqueousChemicalModelDebyeHuckel.cpp:298