Reaktoro
A unified framework for modeling chemically reactive systems
PhaseIdentification.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 #include <Reaktoro/Common/ThermoScalar.hpp>
21 #include <Reaktoro/Common/ChemicalScalar.hpp>
22 
23 namespace Reaktoro {
24 
25 // Forward declarations
26 enum class PhaseType;
27 
30 {
31  None,
32  VolumeMethod,
33  IsothermalCompressibilityMethods,
34  GibbsEnergyAndEquationOfStateMethod,
35 };
36 
45  const ThermoScalar& temperature,
46  const ThermoScalar& pressure,
47  const ChemicalScalar& Z,
48  const ChemicalScalar& b) -> PhaseType;
49 
58  const ThermoScalar& temperature,
59  const ThermoScalar& pressure,
60  const ChemicalScalar& Z) -> PhaseType;
61 
77  const ThermoScalar& pressure,
78  const ThermoScalar& temperature,
79  const ChemicalScalar& amix,
80  const ChemicalScalar& bmix,
81  const ChemicalScalar& A,
82  const ChemicalScalar& B,
83  const ChemicalScalar& C,
84  std::vector<ChemicalScalar> Zs,
85  const double epsilon,
86  const double sigma) -> PhaseType;
87 
88 }
auto identifyPhaseUsingIsothermalCompressibility(const ThermoScalar &temperature, const ThermoScalar &pressure, const ChemicalScalar &Z) -> PhaseType
Return a PhaseType that says if the phase is a Liquid or Gas based on Isothermal Compressibility.
Definition: PhaseIdentification.cpp:41
PhaseType
A type to define the possible state of matter of a phase.
Definition: Phase.hpp:34
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto identifyPhaseUsingVolume(const ThermoScalar &temperature, const ThermoScalar &pressure, const ChemicalScalar &Z, const ChemicalScalar &b) -> PhaseType
Return a PhaseType that says if the phase is a Liquid or Gas based on Volume Method.
Definition: PhaseIdentification.cpp:31
PhaseIdentificationMethod
Defines the enumeration of available phase identification methods.
Definition: PhaseIdentification.hpp:30
ChemicalScalarBase< double, RowVector > ChemicalScalar
A type that represents a chemical property and its derivatives.
Definition: ChemicalScalar.hpp:35
ThermoScalarBase< double > ThermoScalar
A type that defines a scalar thermo property.
Definition: ScalarTypes.hpp:40
auto identifyPhaseUsingGibbsEnergyAndEos(const ThermoScalar &pressure, const ThermoScalar &temperature, const ChemicalScalar &amix, const ChemicalScalar &bmix, const ChemicalScalar &A, const ChemicalScalar &B, const ChemicalScalar &C, std::vector< ChemicalScalar > Zs, const double epsilon, const double sigma) -> PhaseType
Return a PhaseType that says if the phase is a Liquid or Gas based on gibbs residual energy and equat...
Definition: PhaseIdentification.cpp:148