Reaktoro  v2.9.4
A unified framework for modeling chemically reactive systems
PorousRockState.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright © 2014-2022 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/Types.hpp>
22 #include <Reaktoro/Core/ChemicalState.hpp>
23 
24 namespace Reaktoro {
25 
26 // Forward declarations
27 class ChemicalProps;
28 class ChemicalSystem;
29 class ChemicalState;
30 
31 // TODO: Implement PorousRockState class in the PorousMedia extension.
32 
36 {
37 public:
42 
45 
47  virtual ~PorousRockState();
48 
51 
53  auto setPorosity(real value) -> void;
54 
56  auto setVolumeFractionAmongFluids(Index iphase, real value) -> void;
57 
59  auto setVolumeFractionAmongFluids(String phasename, real value) -> void;
60 
62  auto setVolumeFractionAmongSolids(Index iphase, real value) -> void;
63 
65  auto setVolumeFractionAmongSolids(String phasename, real value) -> void;
66 
68  auto equilibrate() -> void;
69 
70 private:
71  struct Impl;
72 
73  std::unique_ptr<Impl> pimpl;
74 };
75 
77 auto operator<<(std::ostream& out, const PorousRockState& state) -> std::ostream&;
78 
79 } // namespace Reaktoro
The chemical state of a chemical system.
Definition: ChemicalState.hpp:41
auto system() const -> ChemicalSystem const &
Return the underlying chemical system for this chemical state.
The class used to represent a chemical system and its attributes and properties.
Definition: ChemicalSystem.hpp:70
The chemical state of a porous rock system filled with fluids.
Definition: PorousRockState.hpp:36
PorousRockState(const PorousRockState &other)
Construct a copy of a PorousRockState instance.
auto operator=(PorousRockState other) -> PorousRockState &
Assign a PorousRockState instance to this instance.
auto setPorosity(real value) -> void
Set the porosity of the rock system.
virtual ~PorousRockState()
Destroy this PorousRockState instance.
auto equilibrate() -> void
Perform an equilibrium calculation of the porous rock system.
auto setVolumeFractionAmongSolids(Index iphase, real value) -> void
Set the volume fraction of the solid phase with given index among all other solid phases.
auto setVolumeFractionAmongFluids(String phasename, real value) -> void
Set the volume fraction of the fluid phase with given named among all other fluid phases.
auto setVolumeFractionAmongSolids(String phasename, real value) -> void
Set the volume fraction of the solid phase with given named among all other solid phases.
auto setVolumeFractionAmongFluids(Index iphase, real value) -> void
Set the volume fraction of the fluid phase with given index among all other fluid phases.
PorousRockState(const ChemicalSystem &system)
Construct a PorousRockState instance with standard conditions.
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
std::string String
Convenient alias for std::string.
Definition: Types.hpp:52
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
auto operator<<(std::ostream &out, AggregateState option) -> std::ostream &
Output an AggregateState value.