Reaktoro
A unified framework for modeling chemically reactive systems
ChemicalProperty.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 <functional>
22 
23 // Reaktoro includes
24 #include <Reaktoro/Common/ChemicalScalar.hpp>
25 
26 namespace Reaktoro {
27 
28 // Forward declarations
29 class ChemicalProperties;
30 class ChemicalSystem;
31 class ReactionEquation;
32 
35 
38 namespace ChemicalProperty {
39 
43 
47 auto pH(const ChemicalSystem& system) -> ChemicalPropertyFunction;
48 
53 auto pE(const ChemicalSystem& system) -> ChemicalPropertyFunction;
54 
66 auto pE(const ChemicalSystem& system, const ReactionEquation& reaction) -> ChemicalPropertyFunction;
67 
72 auto Eh(const ChemicalSystem& system) -> ChemicalPropertyFunction;
73 
85 auto Eh(const ChemicalSystem& system, const ReactionEquation& reaction) -> ChemicalPropertyFunction;
86 
97 
98 } // namespace ChemicalProperty
99 } // namespace Reaktoro
A class to represent a system and its attributes and properties.
Definition: ChemicalSystem.hpp:38
auto Eh(const ChemicalSystem &system) -> ChemicalPropertyFunction
Return the reduction potential of the system (in units of V).
Definition: ChemicalProperty.cpp:238
Define a type that describes the equation of a reaction.
Definition: ReactionEquation.hpp:36
auto ionicStrength(const ChemicalSystem &system) -> ChemicalPropertyFunction
Return the ionic strength of the aqueous phase.
Definition: ChemicalProperty.cpp:49
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto pH(const ChemicalSystem &system) -> ChemicalPropertyFunction
Return the pH of the system.
Definition: ChemicalProperty.cpp:85
auto pE(const ChemicalSystem &system) -> ChemicalPropertyFunction
Return the pE of the system.
Definition: ChemicalProperty.cpp:104
A class for querying thermodynamic and chemical properties of a chemical system.
Definition: ChemicalProperties.hpp:33
std::function< ChemicalScalar(const ChemicalProperties &)> ChemicalPropertyFunction
The signature of a function that calculates a single chemical property.
Definition: ChemicalProperty.hpp:34
ChemicalScalarBase< double, RowVector > ChemicalScalar
A type that represents a chemical property and its derivatives.
Definition: ChemicalScalar.hpp:35
auto alkalinity(const ChemicalSystem &system) -> ChemicalPropertyFunction
Return the total alkalinity of the aqueous phase (in units of eq/L).
Definition: ChemicalProperty.cpp:269