https://mooseframework.inl.gov
PorousFlowFluidPropertiesBase.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 
12 #include "PorousFlowMaterialBase.h"
13 #include "PorousFlowDictator.h"
14 
19 template <bool is_ad>
21 {
22 public:
24 
26 
27 protected:
28  virtual void computeQpProperties() override;
29 
32 
35 
37  const Real _t_c2k;
38 
40  const Real _R;
41 
43  const enum class PressureUnitEnum { Pa, MPa } _p_unit;
44 
47 
49  const enum class TimeUnitEnum { seconds, hours, days, years } _time_unit;
50 
53 
55  const bool _compute_rho_mu;
56 
59 
61  const bool _compute_enthalpy;
62 
65 
68 
71 
74 
77 
80 
83 
86 
89 
92 
95 
98 };
99 
100 #define usingPorousFlowFluidPropertiesMembers \
101  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_nodal_material; \
102  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_phase; \
103  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_phase_num; \
104  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_porepressure; \
105  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_pressure_variable_name; \
106  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_qp; \
107  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_t_c2k; \
108  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_temperature; \
109  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_temperature_variable_name; \
110  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_mass_fraction_variable_name; \
111  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_compute_rho_mu; \
112  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_compute_internal_energy; \
113  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_compute_enthalpy; \
114  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_pressure_to_Pascals; \
115  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_time_to_seconds; \
116  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_density; \
117  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_ddensity_dp; \
118  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_ddensity_dT; \
119  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_viscosity; \
120  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_dviscosity_dp; \
121  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_dviscosity_dT; \
122  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_internal_energy; \
123  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_dinternal_energy_dp; \
124  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_dinternal_energy_dT; \
125  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_enthalpy; \
126  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_denthalpy_dp; \
127  using PorousFlowFluidPropertiesBaseTempl<is_ad>::_denthalpy_dT; \
128  using Coupleable::getFieldVar; \
129  using Coupleable::isCoupled
130 
const Real _R
Universal gas constant.
const bool _compute_internal_energy
If true, this Material will compute internal energy and its derivatives.
const Real _pressure_to_Pascals
convert porepressure to Pascals by multiplying by this quantity
GenericMaterialProperty< Real, is_ad > *const _viscosity
Fluid phase viscosity at the nodes.
PorousFlowFluidPropertiesBaseTempl< false > PorousFlowFluidPropertiesBase
Base class for fluid properties materials.
GenericMaterialProperty< Real, is_ad > *const _density
Fluid phase density at the qps or nodes.
const Real _time_to_seconds
convert time to seconds by multiplying by this quantity
MaterialProperty< Real > *const _denthalpy_dp
Derivative of fluid enthalpy wrt phase pore pressure at the qps or nodes.
MaterialProperty< Real > *const _ddensity_dT
Derivative of fluid density wrt temperature at the qps or nodes.
MaterialProperty< Real > *const _dviscosity_dT
Derivative of fluid phase viscosity wrt temperature at the nodes.
MaterialProperty< Real > *const _ddensity_dp
Derivative of fluid density wrt phase pore pressure at the qps or nodes.
const Real _t_c2k
Conversion from degrees Celsius to degrees Kelvin.
Base class for all PorousFlow materials that provide phase-dependent properties.
GenericMaterialProperty< Real, is_ad > *const _enthalpy
Fluid phase enthalpy at the qps or nodes.
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
const GenericMaterialProperty< Real, is_ad > & _temperature
Fluid temperature at the nodes or quadpoints.
GenericMaterialProperty< Real, is_ad > *const _internal_energy
Fluid phase internal_energy at the qps or nodes.
const bool _compute_enthalpy
If true, this Material will compute enthalpy and its derivatives.
MaterialProperty< Real > *const _dinternal_energy_dp
Derivative of fluid internal_energy wrt phase pore pressure at the qps or nodes.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MaterialProperty< Real > *const _dviscosity_dp
Derivative of fluid phase viscosity wrt pressure at the nodes.
const GenericMaterialProperty< std::vector< Real >, is_ad > & _porepressure
Pore pressure at the nodes or quadpoints.
enum PorousFlowFluidPropertiesBaseTempl::TimeUnitEnum _time_unit
PorousFlowFluidPropertiesBaseTempl< true > ADPorousFlowFluidPropertiesBase
MaterialProperty< Real > *const _dinternal_energy_dT
Derivative of fluid internal_energy wrt temperature at the qps or nodes.
const bool _compute_rho_mu
If true, this Material will compute density and viscosity, and their derivatives. ...
MaterialProperty< Real > *const _denthalpy_dT
Derivative of fluid enthalpy wrt temperature at the qps or nodes.
PorousFlowFluidPropertiesBaseTempl(const InputParameters &parameters)
enum PorousFlowFluidPropertiesBaseTempl::PressureUnitEnum _p_unit