https://mooseframework.inl.gov
PorousFlowFluidStateMultiComponentBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
13 
19 {
20 public:
22 
24 
29  unsigned int aqueousComponentIndex() const { return _aqueous_fluid_component; };
30 
35  unsigned int gasComponentIndex() const { return _gas_fluid_component; };
36 
41  unsigned int saltComponentIndex() const { return _salt_component; };
42 
51  void phaseState(Real Zi, Real Xi, Real Yi, FluidStatePhaseEnum & phase_state) const;
52 
64  virtual void thermophysicalProperties(Real pressure,
65  Real temperature,
66  Real Xnacl,
67  Real Z,
68  unsigned int qp,
69  std::vector<FluidStateProperties> & fsp) const = 0;
70 
71  virtual void thermophysicalProperties(const ADReal & pressure,
72  const ADReal & temperature,
73  const ADReal & Xnacl,
74  const ADReal & Z,
75  unsigned int qp,
76  std::vector<FluidStateProperties> & fsp) const = 0;
77 
89  virtual Real totalMassFraction(
90  Real pressure, Real temperature, Real Xnacl, Real saturation, unsigned int qp) const = 0;
91 
92  unsigned int getPressureIndex() const { return _pidx; };
93  unsigned int getTemperatureIndex() const { return _Tidx; };
94  unsigned int getZIndex() const { return _Zidx; };
95  unsigned int getXIndex() const { return _Xidx; };
96 
97 protected:
99  const unsigned int _aqueous_fluid_component;
101  unsigned int _gas_fluid_component;
103  const unsigned int _salt_component;
105  const unsigned int _pidx;
107  const unsigned int _Zidx;
109  const unsigned int _Tidx;
111  const unsigned int _Xidx;
112 };
const unsigned int _aqueous_fluid_component
Fluid component number of the aqueous component.
const unsigned int _salt_component
Salt component index.
unsigned int _gas_fluid_component
Fluid component number of the gas phase.
const unsigned int _Tidx
Index of derivative wrt temperature.
Compositional flash routines for miscible multiphase flow classes with multiple fluid components...
static const std::string temperature
Definition: NS.h:59
DualNumber< Real, DNDerivativeType, true > ADReal
PorousFlowFluidStateMultiComponentBase(const InputParameters &parameters)
unsigned int gasComponentIndex() const
The index of the gas fluid component.
virtual void thermophysicalProperties(Real pressure, Real temperature, Real Xnacl, Real Z, unsigned int qp, std::vector< FluidStateProperties > &fsp) const =0
Determines the complete thermophysical state of the system for a given set of primary variables...
const unsigned int _pidx
Index of derivative wrt pressure.
FluidStatePhaseEnum
Phase state enum.
virtual Real totalMassFraction(Real pressure, Real temperature, Real Xnacl, Real saturation, unsigned int qp) const =0
Total mass fraction of fluid component summed over all phases in the two-phase state for a specified ...
unsigned int saltComponentIndex() const
The index of the salt component.
static const std::string Z
Definition: NS.h:169
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void phaseState(Real Zi, Real Xi, Real Yi, FluidStatePhaseEnum &phase_state) const
Determines the phase state gven the total mass fraction and equilibrium mass fractions.
Compositional flash routines for miscible multiphase flow classes with multiple fluid components...
static const std::string pressure
Definition: NS.h:56
const unsigned int _Zidx
Index of derivative wrt total mass fraction Z.
const InputParameters & parameters() const
const unsigned int _Xidx
Index of derivative wrt salt mass fraction X.
unsigned int aqueousComponentIndex() const
The index of the aqueous fluid component.