Reaktoro
A unified framework for modeling chemically reactive systems
AqueousSpecies.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 <string>
23 
24 // Reaktoro includes
25 #include <Reaktoro/Core/Species.hpp>
26 #include <Reaktoro/Thermodynamics/Species/ThermoData.hpp>
27 
28 namespace Reaktoro {
29 
31 class AqueousSpecies : public Species
32 {
33 public:
36 
38  AqueousSpecies(const Species& species);
39 
41  auto setCharge(double value) -> void;
42 
46  auto setDissociation(const std::map<std::string, double>& dissociation) -> void;
47 
49  auto setThermoData(const AqueousSpeciesThermoData& thermo) -> void;
50 
52  auto charge() const -> double;
53 
55  auto dissociation() const -> const std::map<std::string, double>&;
56 
58  auto thermoData() const -> const AqueousSpeciesThermoData&;
59 
60 private:
61  struct Impl;
62 
63  std::shared_ptr<Impl> pimpl;
64 };
65 
66 } // namespace Reaktoro
auto setCharge(double value) -> void
Set the charge of the aqueous species.
Definition: AqueousSpecies.cpp:42
A type for storing the thermodynamic data of an aqueous species.
Definition: ThermoData.hpp:224
auto dissociation() const -> const std::map< std::string, double > &
Return the dissociation of the aqueous species.
Definition: AqueousSpecies.cpp:62
auto setDissociation(const std::map< std::string, double > &dissociation) -> void
Set the dissociation of a neutral aqueous species into charged species.
Definition: AqueousSpecies.cpp:47
auto setThermoData(const AqueousSpeciesThermoData &thermo) -> void
Set the thermodynamic data of the aqueous species.
Definition: AqueousSpecies.cpp:52
A type to represent an aqueous species.
Definition: AqueousSpecies.hpp:32
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto thermoData() const -> const AqueousSpeciesThermoData &
Return the thermodynamic data of the aqueous species.
Definition: AqueousSpecies.cpp:67
A type used to describe a species and its attributes.
Definition: Species.hpp:42
AqueousSpecies()
Construct a default AqueousSpecies instance.
Definition: AqueousSpecies.cpp:34
auto charge() const -> double
Return the electrical charge of the aqueous species.
Definition: AqueousSpecies.cpp:57