Reaktoro  v2.9.4
A unified framework for modeling chemically reactive systems
PorousRockState Class Reference

The chemical state of a porous rock system filled with fluids. More...

#include <PorousRockState.hpp>

Collaboration diagram for PorousRockState:
[legend]

Public Member Functions

 PorousRockState (const ChemicalSystem &system)
 Construct a PorousRockState instance with standard conditions. More...
 
 PorousRockState (const PorousRockState &other)
 Construct a copy of a PorousRockState instance.
 
virtual ~PorousRockState ()
 Destroy this 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.
 
auto setVolumeFractionAmongFluids (Index iphase, real value) -> void
 Set the volume fraction of the fluid phase with given index among all other fluid 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 (Index iphase, real value) -> void
 Set the volume fraction of the solid phase with given index among all other solid 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 equilibrate () -> void
 Perform an equilibrium calculation of the porous rock system.
 
- Public Member Functions inherited from ChemicalState
 ChemicalState (ChemicalSystem const &system)
 Construct a ChemicalState instance with standard conditions. More...
 
 ChemicalState (ChemicalState const &other)
 Construct a copy of a ChemicalState instance.
 
virtual ~ChemicalState ()
 Destroy this ChemicalState instance.
 
auto operator= (ChemicalState other) -> ChemicalState &
 Assign a ChemicalState instance to this instance.
 
auto setTemperature (real const &value) -> void
 Set the temperature of the chemical state. More...
 
auto setTemperature (real value, Chars unit) -> void
 Set the temperature of the chemical state with given unit. More...
 
auto temperature (real const &value) -> void
 Set the temperature of the chemical state. More...
 
auto temperature (real value, Chars unit) -> void
 Set the temperature of the chemical state with given unit. More...
 
auto temperature () const -> real
 Return the temperature in the chemical state (in K).
 
auto setPressure (real const &value) -> void
 Set the pressure of the chemical state. More...
 
auto setPressure (real value, Chars unit) -> void
 Set the pressure of the chemical state with given unit. More...
 
auto pressure (real const &value) -> void
 Set the pressure of the chemical state. More...
 
auto pressure (real value, Chars unit) -> void
 Set the pressure of the chemical state with given unit. More...
 
auto pressure () const -> real
 Return the pressure in the chemical state (in Pa).
 
auto setSpeciesAmounts (real const &value) -> void
 Set the amounts of all species in the chemical state to a common value (in mol).
 
auto setSpeciesAmounts (ArrayXrConstRef const &n) -> void
 Set the amounts of the species in the chemical state with given array (in mol).
 
auto setSpeciesAmounts (ArrayXdConstRef const &n) -> void
 Set the amounts of the species in the chemical state with given array (in mol).
 
auto setSpeciesAmount (Index ispecies, real const &amount) -> void
 Set the amount of a specific species in the system (in mol). More...
 
auto setSpeciesAmount (StringOrIndex const &species, real amount, Chars unit) -> void
 Set the amount of a specific species in the system. More...
 
auto setSpeciesMass (StringOrIndex const &species, real mass, Chars unit) -> void
 Set the mass of a specific species in the system. More...
 
auto set (StringOrIndex const &species, real value, Chars unit) -> void
 Set the amount or mass of a chemical species in the chemical state. More...
 
auto add (StringOrIndex const &species, real value, Chars unit) -> void
 Add a specified amount or mass of a chemical species in the chemical state. More...
 
auto speciesAmounts () const -> ArrayXrConstRef
 Return the amounts of the species in the chemical state (in mol).
 
auto speciesAmountsInPhase (StringOrIndex const &phase) const -> ArrayXrConstRef
 Return the amounts of the species from a phase in the chemical state (in mol). More...
 
auto speciesAmount (StringOrIndex const &species) const -> real
 Return the amount of a species in the chemical state (in mol). More...
 
auto speciesMass (StringOrIndex const &species) const -> real
 Return the mass of a species in the chemical state (in kg). More...
 
auto componentAmounts () const -> ArrayXr
 Return the amounts of the conservative components (elements and charge) in the chemical state (in mol).
 
auto elementAmounts () const -> ArrayXr
 Return the amounts of the elements in the chemical state (in mol).
 
auto charge () const -> real
 Return the electric charge in the chemical state (in mol).
 
auto scaleSpeciesAmounts (real const &scalar) -> void
 Scale the amounts of every species by a given factor. More...
 
auto scaleSpeciesAmounts (real const &scalar, Indices const &indices) -> void
 Scale the amounts of the species with given indices. More...
 
auto scaleSpeciesAmountsInPhase (StringOrIndex const &phase, real const &scalar) -> void
 Scale the amounts of the species in a phase by a given factor. More...
 
auto scaleAmount (real amount, Chars unit) -> void
 Scale the amount of the system to a new value. More...
 
auto scalePhaseAmount (StringOrIndex const &phase, real amount, Chars unit) -> void
 Scale the amount of a phase to a new value. More...
 
auto scaleFluidAmount (real amount, Chars unit) -> void
 Scale the total amount of fluids in the system to a new value. More...
 
auto scaleSolidAmount (real amount, Chars unit) -> void
 Scale the total amount of solids in the system to a new value. More...
 
auto scaleMass (real mass, Chars unit) -> void
 Scale the mass of the system to a new value. More...
 
auto scalePhaseMass (StringOrIndex const &phase, real mass, Chars unit) -> void
 Scale the mass of a phase to a new value. More...
 
auto scaleFluidMass (real mass, Chars unit) -> void
 Scale the total mass of fluids in the system to a new value. More...
 
auto scaleSolidMass (real mass, Chars unit) -> void
 Scale the total mass of solids in the system to a new value. More...
 
auto scaleVolume (real volume, Chars unit) -> void
 Scale the volume of the system to a new value. More...
 
auto scalePhaseVolume (StringOrIndex const &phase, real volume, Chars unit) -> void
 Scale the volume of a phase to a new value. More...
 
auto scaleFluidVolume (real volume, Chars unit) -> void
 Scale the total volume of fluids in the system to a new value. More...
 
auto scaleSolidVolume (real volume, Chars unit) -> void
 Scale the total volume of solids in the system to a new value. More...
 
auto update (real const &T, real const &P, ArrayXrConstRef const &n) -> void
 Update the chemical state and properties of the system. More...
 
auto updateIdeal (real const &T, real const &P, ArrayXrConstRef const &n) -> void
 Update the chemical state and properties of the system using ideal activity models. More...
 
auto system () const -> ChemicalSystem const &
 Return the underlying chemical system for this chemical state.
 
auto props () const -> ChemicalProps const &
 Return the chemical properties of the system. More...
 
auto props () -> ChemicalProps &
 Return the chemical properties of the system. More...
 
auto equilibrium () const -> Equilibrium const &
 Return the equilibrium properties of a calculated chemical equilibrium state.
 
auto equilibrium () -> Equilibrium &
 Return the equilibrium properties of a calculated chemical equilibrium state.
 
auto output (std::ostream &out) const -> void
 Output this ChemicalState instance to a stream.
 
auto output (String const &filename) const -> void
 Output this ChemicalState instance to a file.
 

Detailed Description

The chemical state of a porous rock system filled with fluids.

Constructor & Destructor Documentation

◆ PorousRockState()

PorousRockState ( const ChemicalSystem system)
explicit

Construct a PorousRockState instance with standard conditions.

This constructor creates an instance of PorousRockState with temperature 25 °C, pressure 1 bar, and zero mole amounts for the species.


The documentation for this class was generated from the following file: