Reaktoro
A unified framework for modeling chemically reactive systems
ThermoProperties.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 // Reaktoro includes
21 #include <Reaktoro/Common/ThermoScalar.hpp>
22 #include <Reaktoro/Common/ThermoVector.hpp>
23 #include <Reaktoro/Core/ChemicalSystem.hpp>
24 #include <Reaktoro/Thermodynamics/Models/ThermoModel.hpp>
25 
26 namespace Reaktoro {
27 
30 {
31 public:
34 
36  ThermoProperties(const ChemicalSystem& system);
37 
41  auto update(double T, double P) -> void;
42 
44  auto temperature() const -> Temperature;
45 
47  auto pressure() const -> Pressure;
48 
51 
54 
57 
60 
63 
66 
69 
72 
73 private:
75  ChemicalSystem system;
76 
78  Index num_species = 0;
79 
81  Index num_phases = 0;
82 
84  ThermoModelResult tres;
85 
87  Temperature T;
88 
90  Pressure P;
91 };
92 
93 } // namespace Reaktoro
auto standardPartialMolarInternalEnergies() const -> ThermoVector
Return the standard partial molar internal energies of the species (in units of J/mol).
Definition: ThermoProperties.cpp:79
auto standardPartialMolarHeatCapacitiesConstV() const -> ThermoVector
Return the standard partial molar isochoric heat capacities of the species (in units of J/(mol*K)).
Definition: ThermoProperties.cpp:98
A class to represent a system and its attributes and properties.
Definition: ChemicalSystem.hpp:38
auto standardPartialMolarEntropies() const -> ThermoVector
Return the standard partial molar entropies of the species (in units of J/(mol*K)).
Definition: ThermoProperties.cpp:72
ThermoVectorBase< Vector, Vector, Vector > ThermoVector
A type that defines a vector of thermodynamic properties.
Definition: ScalarTypes.hpp:41
A type that describes pressure in units of Pa.
Definition: ThermoScalar.hpp:194
auto standardPartialMolarGibbsEnergies() const -> ThermoVector
Return the standard partial molar Gibbs energies of the species (in units of J/mol).
Definition: ThermoProperties.cpp:57
auto standardPartialMolarVolumes() const -> ThermoVector
Return the standard partial molar volumes of the species (in units of m3/mol).
Definition: ThermoProperties.cpp:67
auto standardPartialMolarHelmholtzEnergies() const -> ThermoVector
Return the standard partial molar Helmholtz energies of the species (in units of J/mol).
Definition: ThermoProperties.cpp:86
The result of a thermodynamic model function that calculates standard thermodynamic properties of spe...
Definition: ThermoModel.hpp:30
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto standardPartialMolarEnthalpies() const -> ThermoVector
Return the standard partial molar enthalpies of the species (in units of J/mol).
Definition: ThermoProperties.cpp:62
A type that describes temperature in units of K.
Definition: ThermoScalar.hpp:177
auto pressure() const -> Pressure
Return the pressure of the phase (in units of Pa).
Definition: ThermoProperties.cpp:52
auto update(double T, double P) -> void
Update the thermodynamic properties of the chemical system.
Definition: ThermoProperties.cpp:30
auto standardPartialMolarHeatCapacitiesConstP() const -> ThermoVector
Return the standard partial molar isobaric heat capacities of the species (in units of J/(mol*K)).
Definition: ThermoProperties.cpp:93
A class used for calculating standard thermodynamic properties of species in a chemical system.
Definition: ThermoProperties.hpp:30
std::size_t Index
Define a type that represents an index.
Definition: Index.hpp:26
auto temperature() const -> Temperature
Return the temperature of the phase (in units of K).
Definition: ThermoProperties.cpp:47
ThermoProperties()
Construct a default ThermoProperties instance.
Definition: ThermoProperties.cpp:22