Reaktoro  v2.11.0
A unified framework for modeling chemically reactive systems
IonExchangeSurface.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright © 2014-2024 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 // Reaktoro includes
21 #include <Reaktoro/Common/Matrix.hpp>
22 #include <Reaktoro/Common/Types.hpp>
23 #include <Reaktoro/Core/SpeciesList.hpp>
24 
25 namespace Reaktoro {
26 
30 {
33 
36 };
37 
46 {
47 public:
50 
53 
55  auto clone() const -> IonExchangeSurface;
56 
59  auto species(Index idx) const -> const Species&;
60 
62  auto species() const -> const SpeciesList&;
63 
65  auto ze() const -> ArrayXdConstRef;
66 
72 
74  auto state() const -> IonExchangeSurfaceState;
75 
76 private:
77  struct Impl;
78 
79  SharedPtr<Impl> pimpl;
80 };
81 
82 } // namespace Reaktoro
A type used to describe an ion exchange surface.
Definition: IonExchangeSurface.hpp:46
auto state() const -> IonExchangeSurfaceState
Return the state of the aqueous mixture.
IonExchangeSurface()
Construct a default IonExchangeSurface instance.
auto species() const -> const SpeciesList &
Return the exchange species on the surface.
IonExchangeSurface(const SpeciesList &species)
Construct an IonExchangeSurface instance with given species.
auto clone() const -> IonExchangeSurface
Return a deep copy of this IonExchangeSurface object.
auto ze() const -> ArrayXdConstRef
Return the array of exchanger's equivalents numbers (or cation charges) in ion exchange species.
A type used as a collection of species.
Definition: SpeciesList.hpp:29
A type used to represent a chemical species and its attributes.
Definition: Species.hpp:35
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
std::size_t Index
Define a type that represents an index.
Definition: Index.hpp:26
autodiff::real real
The number type used throughout the library.
Definition: Real.hpp:26
Eigen::Ref< const ArrayXd > ArrayXdConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:105
std::shared_ptr< T > SharedPtr
Convenient alias for std::shared_ptr<T>.
Definition: Types.hpp:106
Eigen::Ref< const ArrayXr > ArrayXrConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:89
autodiff::ArrayXreal ArrayXr
Convenient alias to Eigen type.
Definition: Matrix.hpp:87
A type used to describe the state of an ion exchange surface.
Definition: IonExchangeSurface.hpp:30
ArrayXr beta
The equivalent fractions of the exchange species.
Definition: IonExchangeSurface.hpp:32
ArrayXr lng
The natural logarithms of the activity coefficients (calculated during the activity model evaluation)
Definition: IonExchangeSurface.hpp:35