https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
20public:
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
97protected:
99 const unsigned int _aqueous_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};
DualNumber< Real, DNDerivativeType, true > ADReal
FluidStatePhaseEnum
Phase state enum.
const InputParameters & parameters() const
Compositional flash routines for miscible multiphase flow classes with multiple fluid components.
Compositional flash routines for miscible multiphase flow classes with multiple fluid components.
const unsigned int _salt_component
Salt component index.
const unsigned int _Xidx
Index of derivative wrt salt mass fraction X.
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 _gas_fluid_component
Fluid component number of the gas phase.
unsigned int aqueousComponentIndex() const
The index of the aqueous fluid component.
unsigned int saltComponentIndex() const
The index of the salt component.
const unsigned int _pidx
Index of derivative wrt pressure.
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 _Tidx
Index of derivative wrt temperature.
virtual void thermophysicalProperties(const ADReal &pressure, const ADReal &temperature, const ADReal &Xnacl, const ADReal &Z, unsigned int qp, std::vector< FluidStateProperties > &fsp) const =0
const unsigned int _Zidx
Index of derivative wrt total mass fraction Z.
unsigned int gasComponentIndex() const
The index of the gas fluid component.
const unsigned int _aqueous_fluid_component
Fluid component number of the aqueous component.
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.