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-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 <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
A type used to describe a species and its attributes.
Definition: Species.hpp:41
A type to represent an aqueous species.
Definition: AqueousSpecies.hpp:31
auto dissociation() const -> const std::map< std::string, double > &
Return the dissociation of the aqueous species.
Definition: AqueousSpecies.cpp:62
auto charge() const -> double
Return the electrical charge of the aqueous species.
Definition: AqueousSpecies.cpp:57
auto thermoData() const -> const AqueousSpeciesThermoData &
Return the thermodynamic data of the aqueous species.
Definition: AqueousSpecies.cpp:67
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
A type for storing the thermodynamic data of an aqueous species.
Definition: ThermoData.hpp:230
AqueousSpecies()
Construct a default AqueousSpecies instance.
Definition: AqueousSpecies.cpp:34
auto setThermoData(const AqueousSpeciesThermoData &thermo) -> void
Set the thermodynamic data of the aqueous species.
Definition: AqueousSpecies.cpp:52
auto setCharge(double value) -> void
Set the charge of the aqueous species.
Definition: AqueousSpecies.cpp:42
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24