Reaktoro
A unified framework for modeling chemically reactive systems
FluidPhase.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 <memory>
22 
23 // Reaktoro includes
24 #include <Reaktoro/Core/Phase.hpp>
25 #include <Reaktoro/Thermodynamics/EOS/CubicEOS.hpp>
26 
27 namespace Reaktoro {
28 
29 // Forward declarations
30 class FluidMixture;
31 
33 class FluidPhase : public Phase
34 {
35 public:
37  FluidPhase(const std::string& name, PhaseType type);
38 
42  explicit FluidPhase(const FluidMixture& mixture, const std::string& name, PhaseType type);
43 
48 
53 
58 
63 
68 
78 
87 
97 
99  auto mixture() const -> const FluidMixture&;
100 
102  auto mixture()->FluidMixture&;
103 
104 private:
105  struct Impl;
106 
107  std::shared_ptr<Impl> pimpl;
108 };
109 
110 } // namespace Reaktoro
auto setChemicalModelSoaveRedlichKwong() -> FluidPhase &
Set the chemical model of the phase with the Soave-Redlich-Kwong equation of state.
Definition: FluidPhase.cpp:86
auto mixture() const -> const FluidMixture &
Return a const reference of the FluidMixture instance.
Definition: FluidPhase.cpp:122
auto setChemicalModelRedlichKwong() -> FluidPhase &
Set the chemical model of the phase with the Redlich-Kwong equation of state.
Definition: FluidPhase.cpp:79
Parameters to be passed to the Cubic Equation of State.
Definition: CubicEOS.hpp:69
auto setChemicalModelCubicEOS(CubicEOS::Params params={}) -> FluidPhase &
Set the chemical model of the phase with a Cubic equation of state.
Definition: FluidPhase.cpp:101
auto setChemicalModelPengRobinson(CubicEOS::Params params={}) -> FluidPhase &
Set the chemical model of the phase with the Peng-Robinson equation of state.
Definition: FluidPhase.cpp:93
auto setChemicalModelVanDerWaals() -> FluidPhase &
Set the chemical model of the phase with the van der Waals equation of state.
Definition: FluidPhase.cpp:72
PhaseType
A type to define the possible state of matter of a phase.
Definition: Phase.hpp:34
Class that defines a fluid (gaseous or liquid) phase.
Definition: FluidPhase.hpp:34
auto name() const -> std::string
Return the name of the phase.
Definition: Phase.cpp:114
Provides a computational representation of a fluid (gaseous or liquid) mixture.
Definition: FluidMixture.hpp:38
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto setChemicalModelSpycherReed() -> FluidPhase &
Set the chemical model of the phase with the Spycher and Reed (1988) equation of state.
Definition: FluidPhase.cpp:115
A type used to define a phase and its attributes.
Definition: Phase.hpp:42
FluidPhase(const std::string &name, PhaseType type)
Construct an FluidPhase instance with given name and PhaseType.
Definition: FluidPhase.cpp:47
auto setChemicalModelSpycherPruessEnnis() -> FluidPhase &
Set the chemical model of the phase with the Spycher et al.
Definition: FluidPhase.cpp:108
auto type() const -> PhaseType
Return the type of the phase.
Definition: Phase.cpp:119
auto setChemicalModelIdeal() -> FluidPhase &
Set the chemical model of the phase with the ideal gas equation of state.
Definition: FluidPhase.cpp:64