https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowFluidState.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
14
16
46template <bool is_ad>
48{
49public:
51
53
54protected:
55 virtual void initQpStatefulProperties() override;
56 virtual void computeQpProperties() override;
57 virtual void thermophysicalProperties() override;
58
64 const unsigned int _gas_porepressure_varnum;
66 const unsigned int _pvar;
68 std::vector<const GenericVariableValue<is_ad> *> _Z;
70 std::vector<const GenericVariableGradient<is_ad> *> _gradZ_qp;
72 std::vector<unsigned int> _Z_varnum;
74 std::vector<unsigned int> _Zvar;
76 const unsigned int _num_Z_vars;
78 const bool _is_Xnacl_nodal;
84 const unsigned int _Xnacl_varnum;
86 const unsigned int _Xvar;
90 const unsigned int _aqueous_phase_number;
92 const unsigned int _gas_phase_number;
94 const unsigned int _aqueous_fluid_component;
96 const unsigned int _gas_fluid_component;
98 const unsigned int _salt_component;
106 const unsigned int _temperature_varnum;
108 const unsigned int _Tvar;
110 const unsigned int _pidx;
112 const unsigned int _Tidx;
114 const unsigned int _Zidx;
116 const unsigned int _Xidx;
117
118#if (is_ad)
120#else
122#endif
123};
124
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
Moose::GenericType< VariableGradient, is_ad > GenericVariableGradient
PorousFlowFluidStateTempl< true > ADPorousFlowFluidState
PorousFlowFluidStateTempl< false > PorousFlowFluidState
Base class for capillary pressure for multiphase flow in porous media.
Fluid state base class using a persistent set of primary variables for multiphase,...
Compositional flash routines for miscible multiphase flow classes with multiple fluid components.
Fluid state class using a persistent set of primary variables for the mutliphase, multicomponent case...
std::vector< const GenericVariableGradient< is_ad > * > _gradZ_qp
Gradient(s) of total mass fraction(s) of the gas component(s) (only defined at the qps)
const unsigned int _Tidx
Index of derivative wrt temperature.
const unsigned int _salt_component
Salt component index.
virtual void computeQpProperties() override
const unsigned int _Zidx
Index of derivative wrt total mass fraction Z.
const GenericVariableValue< is_ad > & _gas_porepressure
Porepressure.
const MaterialProperty< std::vector< Real > > *const _dtemperature_dvar
Derivative of temperature wrt PorousFlow variables.
const unsigned int _aqueous_phase_number
Phase number of the aqueous phase.
const GenericMaterialProperty< RealGradient, is_ad > *const _gradT_qp
Gradient of temperature (only defined at the qps)
std::vector< unsigned int > _Zvar
PorousFlow variable number of Z.
const PorousFlowFluidStateMultiComponentBase & _fs
FluidState UserObject.
const unsigned int _Tvar
PorousFlow variable number of the temperature.
const unsigned int _gas_phase_number
Phase number of the gas phase.
const unsigned int _pvar
PorousFlow variable number of the gas porepressure.
const GenericVariableGradient< is_ad > & _grad_Xnacl_qp
Gradient of salt mass fraction (only defined at the qps)
const GenericMaterialProperty< Real, is_ad > & _temperature
Temperature.
const unsigned int _gas_porepressure_varnum
Moose variable number of the gas porepressure.
const unsigned int _Xidx
Index of derivative wrt salt mass fraction X.
virtual void initQpStatefulProperties() override
const unsigned int _num_Z_vars
Number of coupled total mass fractions. Should be _num_phases - 1.
const GenericVariableValue< is_ad > & _Xnacl
Salt mass fraction (kg/kg)
const unsigned int _aqueous_fluid_component
Fluid component number of the aqueous component.
const unsigned int _Xnacl_varnum
Salt mass fraction variable number.
const GenericVariableGradient< is_ad > & _gas_gradp_qp
Gradient of porepressure (only defined at the qps)
std::vector< unsigned int > _Z_varnum
Moose variable number of Z.
static InputParameters validParams()
const unsigned int _pidx
Index of derivative wrt pressure.
const unsigned int _gas_fluid_component
Fluid component number of the gas phase.
const bool _is_Xnacl_nodal
Flag for nodal NaCl mass fraction.
std::vector< const GenericVariableValue< is_ad > * > _Z
Total mass fraction(s) of the gas component(s) summed over all phases.
const unsigned int _temperature_varnum
Moose variable number of the temperature.
virtual void thermophysicalProperties() override
Calculates all required thermophysical properties and derivatives for each phase and fluid component.
const unsigned int _Xvar
Salt mass fraction PorousFlow variable number.