www.mooseframework.org
PorousFlowFluidState.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
46 template <bool is_ad>
48 {
49 public:
51 
52  PorousFlowFluidStateTempl(const InputParameters & parameters);
53 
54 protected:
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 
std::vector< unsigned int > _Zvar
PorousFlow variable number of Z.
virtual void thermophysicalProperties() override
Calculates all required thermophysical properties and derivatives for each phase and fluid component...
typename Moose::GenericType< VariableValue, is_ad > GenericVariableValue
const GenericVariableValue< is_ad > & _gas_porepressure
Porepressure.
const unsigned int _pidx
Index of derivative wrt pressure.
const unsigned int _Tvar
PorousFlow variable number of the temperature.
const MaterialProperty< std::vector< Real > > *const _dtemperature_dvar
Derivative of temperature wrt PorousFlow variables.
const unsigned int _gas_fluid_component
Fluid component number of the gas phase.
const unsigned int _salt_component
Salt component index.
const unsigned int _Xidx
Index of derivative wrt salt mass fraction X.
Compositional flash routines for miscible multiphase flow classes with multiple fluid components...
PorousFlowFluidStateTempl< true > ADPorousFlowFluidState
static InputParameters validParams()
const unsigned int _aqueous_fluid_component
Fluid component number of the aqueous component.
const unsigned int _Zidx
Index of derivative wrt total mass fraction Z.
const unsigned int _Tidx
Index of derivative wrt temperature.
virtual void initQpStatefulProperties() override
Base class for capillary pressure for multiphase flow in porous media.
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) ...
PorousFlowFluidStateTempl< false > PorousFlowFluidState
Fluid state class using a persistent set of primary variables for the mutliphase, multicomponent case...
const PorousFlowFluidStateMultiComponentBase & _fs
FluidState UserObject.
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
std::vector< unsigned int > _Z_varnum
Moose variable number of Z.
const unsigned int _gas_phase_number
Phase number of the gas phase.
const unsigned int _gas_porepressure_varnum
Moose variable number of the gas porepressure.
PorousFlowFluidStateTempl(const InputParameters &parameters)
const unsigned int _pvar
PorousFlow variable number of the gas porepressure.
std::vector< const GenericVariableValue< is_ad > * > _Z
Total mass fraction(s) of the gas component(s) summed over all phases.
virtual void computeQpProperties() override
const GenericVariableValue< is_ad > & _Xnacl
Salt mass fraction (kg/kg)
Fluid state base class using a persistent set of primary variables for multiphase, single and multicomponent cases.
const GenericVariableGradient< is_ad > & _gas_gradp_qp
Gradient of porepressure (only defined at the qps)
const unsigned int _num_Z_vars
Number of coupled total mass fractions. Should be _num_phases - 1.
const unsigned int _aqueous_phase_number
Phase number of the aqueous phase.
const unsigned int _temperature_varnum
Moose variable number of the temperature.
typename Moose::GenericType< VariableGradient, is_ad > GenericVariableGradient
const unsigned int _Xnacl_varnum
Salt mass fraction variable number.
const unsigned int _Xvar
Salt mass fraction PorousFlow variable number.
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 GenericMaterialProperty< RealGradient, is_ad > *const _gradT_qp
Gradient of temperature (only defined at the qps)
const bool _is_Xnacl_nodal
Flag for nodal NaCl mass fraction.