www.mooseframework.org
PorousFlowFluidStateSingleComponent.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 
12 #include "PorousFlowVariableBase.h"
14 
17 
18 template <>
20 
32 {
33 public:
34  PorousFlowFluidStateSingleComponent(const InputParameters & parameters);
35 
36 protected:
37  virtual void initQpStatefulProperties() override;
38  virtual void computeQpProperties() override;
39 
41  void setMaterialVectorSize() const;
42 
47  virtual void thermophysicalProperties();
48 
50  const VariableValue & _liquid_porepressure;
52  const VariableGradient & _liquid_gradp_qp;
54  const unsigned int _liquid_porepressure_varnum;
56  const unsigned int _pvar;
58  const VariableValue & _enthalpy;
60  const VariableGradient & _gradh_qp;
62  const unsigned int _enthalpy_varnum;
64  const unsigned int _hvar;
68  const unsigned int _aqueous_phase_number;
70  const unsigned int _gas_phase_number;
72  MaterialProperty<Real> & _temperature;
74  MaterialProperty<RealGradient> * _grad_temperature_qp;
76  MaterialProperty<std::vector<Real>> & _dtemperature_dvar;
78  MaterialProperty<std::vector<Real>> * const _dgrad_temperature_dgradv;
80  MaterialProperty<std::vector<RealGradient>> * const _dgrad_temperature_dv;
82  MaterialProperty<std::vector<std::vector<Real>>> & _mass_frac;
84  MaterialProperty<std::vector<std::vector<RealGradient>>> * _grad_mass_frac_qp;
86  MaterialProperty<std::vector<std::vector<std::vector<Real>>>> & _dmass_frac_dvar;
88  MaterialProperty<std::vector<Real>> & _fluid_density;
90  MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_density_dvar;
92  MaterialProperty<std::vector<Real>> & _fluid_viscosity;
94  MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_viscosity_dvar;
96  MaterialProperty<std::vector<Real>> & _fluid_enthalpy;
98  MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_enthalpy_dvar;
100  MaterialProperty<std::vector<Real>> & _fluid_internal_energy;
102  MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_internal_energy_dvar;
104  const Real _T_c2k;
108  std::vector<FluidStateProperties> _fsp;
114  const unsigned int _pidx;
116  const unsigned int _hidx;
117 };
PorousFlowFluidStateSingleComponent::_phase_state
FluidStatePhaseEnum _phase_state
FluidStatePhaseEnum.
Definition: PorousFlowFluidStateSingleComponent.h:110
PorousFlowFluidStateSingleComponent::_pidx
const unsigned int _pidx
Index of derivative wrt pressure.
Definition: PorousFlowFluidStateSingleComponent.h:114
PorousFlowFluidStateSingleComponent::_fluid_viscosity
MaterialProperty< std::vector< Real > > & _fluid_viscosity
Viscosity of each phase.
Definition: PorousFlowFluidStateSingleComponent.h:92
PorousFlowFluidStateSingleComponent::_dfluid_viscosity_dvar
MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_viscosity_dvar
Derivative of the fluid viscosity for each phase wrt PorousFlow variables.
Definition: PorousFlowFluidStateSingleComponent.h:94
PorousFlowFluidStateSingleComponent::_T_c2k
const Real _T_c2k
Conversion from degrees Celsius to degrees Kelvin.
Definition: PorousFlowFluidStateSingleComponent.h:104
PorousFlowFluidStateSingleComponent::_dgrad_temperature_dgradv
MaterialProperty< std::vector< Real > > *const _dgrad_temperature_dgradv
d(grad temperature)/d(grad PorousFlow variable) at the quadpoints
Definition: PorousFlowFluidStateSingleComponent.h:78
PorousFlowFluidStateSingleComponent::_liquid_porepressure_varnum
const unsigned int _liquid_porepressure_varnum
Moose variable number of the porepressure.
Definition: PorousFlowFluidStateSingleComponent.h:54
PorousFlowFluidStateSingleComponent::_fsp
std::vector< FluidStateProperties > _fsp
FluidStateProperties data structure.
Definition: PorousFlowFluidStateSingleComponent.h:108
FluidStatePhaseEnum
FluidStatePhaseEnum
Phase state enum.
Definition: PorousFlowFluidStateBase.h:18
PorousFlowCapillaryPressure
Base class for capillary pressure for multiphase flow in porous media.
Definition: PorousFlowCapillaryPressure.h:39
PorousFlowFluidStateSingleComponent::thermophysicalProperties
virtual void thermophysicalProperties()
Calculates all required thermophysical properties and derivatives for each phase and fluid component.
Definition: PorousFlowFluidStateSingleComponent.C:136
PorousFlowFluidStateSingleComponent::_dmass_frac_dvar
MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _dmass_frac_dvar
Derivative of the mass fraction matrix with respect to the Porous Flow variables.
Definition: PorousFlowFluidStateSingleComponent.h:86
PorousFlowFluidStateSingleComponent::initQpStatefulProperties
virtual void initQpStatefulProperties() override
Definition: PorousFlowFluidStateSingleComponent.C:143
PorousFlowFluidStateSingleComponent::_pvar
const unsigned int _pvar
PorousFlow variable number of the porepressure.
Definition: PorousFlowFluidStateSingleComponent.h:56
PorousFlowFluidStateSingleComponent::_is_initqp
bool _is_initqp
Flag to indicate whether to calculate stateful properties.
Definition: PorousFlowFluidStateSingleComponent.h:106
PorousFlowFluidStateSingleComponent::_fluid_internal_energy
MaterialProperty< std::vector< Real > > & _fluid_internal_energy
Internal energy of each phase.
Definition: PorousFlowFluidStateSingleComponent.h:100
PorousFlowFluidStateSingleComponent::PorousFlowFluidStateSingleComponent
PorousFlowFluidStateSingleComponent(const InputParameters &parameters)
Definition: PorousFlowFluidStateSingleComponent.C:35
PorousFlowFluidStateSingleComponent::_temperature
MaterialProperty< Real > & _temperature
Temperature.
Definition: PorousFlowFluidStateSingleComponent.h:72
PorousFlowFluidStateSingleComponentBase
Base class for miscible multiphase flow classes with a single fluid component using a pressure and en...
Definition: PorousFlowFluidStateSingleComponentBase.h:23
PorousFlowFluidStateSingleComponent::computeQpProperties
virtual void computeQpProperties() override
Definition: PorousFlowFluidStateSingleComponent.C:176
PorousFlowVariableBase
Base class for thermophysical variable materials, which assemble materials for primary variables such...
Definition: PorousFlowVariableBase.h:25
PorousFlowFluidStateSingleComponent::_dfluid_enthalpy_dvar
MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_enthalpy_dvar
Derivative of the fluid enthalpy for each phase wrt PorousFlow variables.
Definition: PorousFlowFluidStateSingleComponent.h:98
PorousFlowFluidStateSingleComponent::_liquid_gradp_qp
const VariableGradient & _liquid_gradp_qp
Gradient of porepressure (only defined at the qps)
Definition: PorousFlowFluidStateSingleComponent.h:52
PorousFlowFluidStateSingleComponent::_pc
const PorousFlowCapillaryPressure & _pc
Capillary pressure UserObject.
Definition: PorousFlowFluidStateSingleComponent.h:112
PorousFlowFluidStateSingleComponent::_dgrad_temperature_dv
MaterialProperty< std::vector< RealGradient > > *const _dgrad_temperature_dv
d(grad temperature)/d(PorousFlow variable) at the quadpoints
Definition: PorousFlowFluidStateSingleComponent.h:80
PorousFlowFluidStateSingleComponent::_enthalpy_varnum
const unsigned int _enthalpy_varnum
Moose variable number of the enthalpy.
Definition: PorousFlowFluidStateSingleComponent.h:62
PorousFlowFluidStateSingleComponent::_fs
const PorousFlowFluidStateSingleComponentBase & _fs
FluidState UserObject.
Definition: PorousFlowFluidStateSingleComponent.h:66
PorousFlowFluidStateSingleComponent::_dtemperature_dvar
MaterialProperty< std::vector< Real > > & _dtemperature_dvar
Derivative of temperature wrt PorousFlow variables.
Definition: PorousFlowFluidStateSingleComponent.h:76
PorousFlowFluidStateSingleComponentBase.h
PorousFlowFluidStateSingleComponent::_aqueous_phase_number
const unsigned int _aqueous_phase_number
Phase number of the aqueous phase.
Definition: PorousFlowFluidStateSingleComponent.h:68
PorousFlowFluidStateSingleComponent::_dfluid_density_dvar
MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_density_dvar
Derivative of the fluid density for each phase wrt PorousFlow variables.
Definition: PorousFlowFluidStateSingleComponent.h:90
PorousFlowFluidStateSingleComponent::_enthalpy
const VariableValue & _enthalpy
Enthalpy.
Definition: PorousFlowFluidStateSingleComponent.h:58
PorousFlowFluidStateSingleComponent::_gas_phase_number
const unsigned int _gas_phase_number
Phase number of the gas phase.
Definition: PorousFlowFluidStateSingleComponent.h:70
PorousFlowFluidStateSingleComponent::_hidx
const unsigned int _hidx
Index of derivative wrt enthalpy.
Definition: PorousFlowFluidStateSingleComponent.h:116
validParams< PorousFlowFluidStateSingleComponent >
InputParameters validParams< PorousFlowFluidStateSingleComponent >()
Definition: PorousFlowFluidStateSingleComponent.C:17
PorousFlowFluidStateSingleComponent::_dfluid_internal_energy_dvar
MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_internal_energy_dvar
Derivative of the fluid internal energy for each phase wrt PorousFlow variables.
Definition: PorousFlowFluidStateSingleComponent.h:102
PorousFlowFluidStateSingleComponent::_fluid_enthalpy
MaterialProperty< std::vector< Real > > & _fluid_enthalpy
Enthalpy of each phase.
Definition: PorousFlowFluidStateSingleComponent.h:96
PorousFlowFluidStateSingleComponent::_gradh_qp
const VariableGradient & _gradh_qp
Gradient of enthalpy (only defined at the qps)
Definition: PorousFlowFluidStateSingleComponent.h:60
PorousFlowFluidStateSingleComponent::_hvar
const unsigned int _hvar
PorousFlow variable number of the enthalpy.
Definition: PorousFlowFluidStateSingleComponent.h:64
PorousFlowFluidStateSingleComponent::setMaterialVectorSize
void setMaterialVectorSize() const
Size material property vectors and initialise with zeros.
Definition: PorousFlowFluidStateSingleComponent.C:341
PorousFlowFluidStateSingleComponent::_mass_frac
MaterialProperty< std::vector< std::vector< Real > > > & _mass_frac
Mass fraction matrix.
Definition: PorousFlowFluidStateSingleComponent.h:82
PorousFlowVariableBase.h
PorousFlowFluidStateSingleComponent::_grad_temperature_qp
MaterialProperty< RealGradient > * _grad_temperature_qp
Gradient of temperature (only defined at the qps)
Definition: PorousFlowFluidStateSingleComponent.h:74
PorousFlowFluidStateSingleComponent::_liquid_porepressure
const VariableValue & _liquid_porepressure
Porepressure.
Definition: PorousFlowFluidStateSingleComponent.h:50
PorousFlowFluidStateSingleComponent
Fluid state class using a persistent set of primary variables for the mutliphase, single component ca...
Definition: PorousFlowFluidStateSingleComponent.h:31
PorousFlowFluidStateSingleComponent::_grad_mass_frac_qp
MaterialProperty< std::vector< std::vector< RealGradient > > > * _grad_mass_frac_qp
Gradient of the mass fraction matrix (only defined at the qps)
Definition: PorousFlowFluidStateSingleComponent.h:84
PorousFlowFluidStateSingleComponent::_fluid_density
MaterialProperty< std::vector< Real > > & _fluid_density
Fluid density of each phase.
Definition: PorousFlowFluidStateSingleComponent.h:88