Reaktoro 
A unified framework for modeling chemically reactive systems
PhaseChemicalModel.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 <functional>
22 
23 // Reaktoro includes
24 #include <Reaktoro/Common/ChemicalScalar.hpp>
25 #include <Reaktoro/Common/ChemicalVector.hpp>
26 
27 namespace Reaktoro {
28 
31 {
34 
36  explicit PhaseChemicalModelResult(unsigned nspecies);
37 
39  auto resize(unsigned nspecies) -> void;
40 
42  unsigned num_species = 0;
43 
46 
49 
52 
55 
58 
61 
64 
67 };
68 
70 using PhaseChemicalModel = std::function<PhaseChemicalModelResult(double, double, const Vector&)>;
71 
72 } // namespace Reaktoro
ThermoVector ln_activity_constants
The natural log of the activity constants of the species.
Definition: PhaseChemicalModel.hpp:48
unsigned num_species
The number of species in the phase.
Definition: PhaseChemicalModel.hpp:42
ChemicalScalar residual_molar_heat_capacity_cp
The residual molar isobaric heat capacity of the phase w.r.t. to its ideal state (in units of J/(mol*...
Definition: PhaseChemicalModel.hpp:63
The result of the chemical model function that calculates the chemical properties of a phase...
Definition: PhaseChemicalModel.hpp:30
ChemicalScalar molar_volume
The molar volume of the phase (in units of m3/mol).
Definition: PhaseChemicalModel.hpp:54
ChemicalScalar residual_molar_gibbs_energy
The residual molar Gibbs energy of the phase w.r.t. to its ideal state (in units of J/mol)...
Definition: PhaseChemicalModel.hpp:57
auto resize(unsigned nspecies) -> void
Resize this PhaseChemicalModelResult with a given number of species.
Definition: PhaseChemicalModel.cpp:36
std::function< PhaseChemicalModelResult(double, double, const Vector &)> PhaseChemicalModel
The signature of the chemical model function that calculates the chemical properties of a phase...
Definition: PhaseChemicalModel.hpp:70
ChemicalVector ln_activity_coefficients
The natural log of the activity coefficients of the species.
Definition: PhaseChemicalModel.hpp:45
ChemicalVector ln_activities
The natural log of the activities of the species.
Definition: PhaseChemicalModel.hpp:51
ChemicalScalar residual_molar_heat_capacity_cv
The residual molar isochoric heat capacity of the phase w.r.t. to its ideal state (in units of J/(mol...
Definition: PhaseChemicalModel.hpp:66
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
PhaseChemicalModelResult()
Construct a default PhaseChemicalModelResult instance.
Definition: PhaseChemicalModel.cpp:22
ChemicalScalar residual_molar_enthalpy
The residual molar enthalpy of the phase w.r.t. to its ideal state (in units of J/mol).
Definition: PhaseChemicalModel.hpp:60