Reaktoro  v2.11.0
A unified framework for modeling chemically reactive systems
ThermoProps.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive phases.
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/Core/ChemicalSystem.hpp>
23 #include <Reaktoro/Core/ThermoPropsPhase.hpp>
24 
25 namespace Reaktoro {
26 
29 {
30 public:
32  explicit ThermoProps(const ChemicalSystem& system);
33 
35  ThermoProps(const ThermoProps& other);
36 
39 
42 
46  auto update(const real& T, const real& P) -> void;
47 
52  auto update(const real& T, const real& P, Wrt<real&> wrtvar) -> void;
53 
55  auto system() const -> const ChemicalSystem&;
56 
59 
61  auto temperature() const -> const real&;
62 
64  auto pressure() const -> const real&;
65 
68 
71 
74 
77 
80 
83 
86 
89 
92 
95 
96 private:
97  struct Impl;
98 
99  Ptr<Impl> pimpl;
100 };
101 
102 } // namespace Reaktoro
The class used to represent a chemical system and its attributes and properties.
Definition: ChemicalSystem.hpp:70
The base type for standard thermodynamic properties of a phase and its species.
Definition: ThermoPropsPhase.hpp:114
The standard thermodynamic properties of the species in a chemical system.
Definition: ThermoProps.hpp:29
auto speciesStandardVolumesT() const -> ArrayXrConstRef
Return the temperature derivative of the standard partial molar volumes of the species in the system ...
auto phaseProps(Index idx) const -> ThermoPropsPhaseConstRef
Return the standard thermodynamic properties of a phase with given index.
auto speciesStandardInternalEnergies() const -> ArrayXr
Return the standard partial molar internal energies of formation of the species in the system (in J/m...
auto speciesStandardHeatCapacitiesConstP() const -> ArrayXrConstRef
Return the standard partial molar isobaric heat capacities of the species in the system (in J/(mol*K)...
auto speciesStandardEntropies() const -> ArrayXr
Return the standard partial molar entropies of formation of the species in the system (in J/(mol*K)).
auto update(const real &T, const real &P, Wrt< real & > wrtvar) -> void
Update the standard thermodynamic properties of the species in the chemical system.
auto speciesStandardGibbsEnergies() const -> ArrayXrConstRef
Return the standard partial molar Gibbs energies of formation of the species in the system (in J/mol)...
auto speciesStandardEnthalpies() const -> ArrayXrConstRef
Return the standard partial molar enthalpies of formation of the species in the system (in J/mol).
auto speciesStandardVolumes() const -> ArrayXrConstRef
Return the standard partial molar volumes of the species in the system (in m3/mol).
auto update(const real &T, const real &P) -> void
Update the standard thermodynamic properties of the species in the chemical system.
auto operator=(ThermoProps other) -> ThermoProps &
Assign a ThermoProps object to this.
~ThermoProps()
Destroy this ThermoProps object.
auto pressure() const -> const real &
Return the pressure of the system (in Pa).
ThermoProps(const ChemicalSystem &system)
Construct a ThermoProps object.
auto temperature() const -> const real &
Return the temperature of the system (in K).
auto speciesStandardVolumesP() const -> ArrayXrConstRef
Return the pressure derivative of the standard partial molar volumes of the species in the system (in...
auto speciesStandardHelmholtzEnergies() const -> ArrayXr
Return the standard partial molar Helmholtz energies of formation of the species in the system (in J/...
ThermoProps(const ThermoProps &other)
Construct a copy of a ThermoProps object.
auto speciesStandardHeatCapacitiesConstV() const -> ArrayXrConstRef
Return the standard partial molar isochoric heat capacities of the species in the system (in J/(mol*K...
auto system() const -> const ChemicalSystem &
Return the chemical system associated with these standard thermodynamic properties.
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
std::unique_ptr< T > Ptr
Convenient alias for std::unique_ptr<T>.
Definition: Types.hpp:102
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