17 MooseEnum unit_choice(
"Kelvin=0 Celsius=1",
"Kelvin");
19 "temperature_unit", unit_choice,
"The unit of the temperature variable");
23 "The unit of the pressure variable used everywhere in the input file " 24 "except for in the FluidProperties-module objects");
25 MooseEnum time_unit_choice(
"seconds hours days years",
"seconds");
28 "The unit of time used everywhere in the input file except for in the " 29 "FluidProperties-module objects");
31 "compute_density_and_viscosity",
true,
"Compute the fluid density and viscosity");
32 params.
addParam<
bool>(
"compute_internal_energy",
true,
"Compute the fluid internal energy");
33 params.
addParam<
bool>(
"compute_enthalpy",
true,
"Compute the fluid enthalpy");
34 params.
addPrivateParam<std::string>(
"pf_material_type",
"fluid_properties");
46 ? getGenericMaterialProperty<
std::vector<
Real>, is_ad>(
"PorousFlow_porepressure_nodal")
47 : getGenericMaterialProperty<
std::vector<
Real>, is_ad>(
"PorousFlow_porepressure_qp")),
48 _temperature(_nodal_material
49 ? getGenericMaterialProperty<
Real, is_ad>(
"PorousFlow_temperature_nodal")
50 : getGenericMaterialProperty<
Real, is_ad>(
"PorousFlow_temperature_qp")),
51 _t_c2k(getParam<
MooseEnum>(
"temperature_unit") == 0 ? 0.0 : 273.15),
57 _time_to_seconds(_time_unit ==
TimeUnitEnum::seconds ? 1.0
60 : 3600 * 24 * 365.25),
61 _compute_rho_mu(this->template getParam<bool>(
"compute_density_and_viscosity")),
62 _compute_internal_energy(this->template getParam<bool>(
"compute_internal_energy")),
63 _compute_enthalpy(this->template getParam<bool>(
"compute_enthalpy")),
64 _density(_compute_rho_mu
65 ? (_nodal_material ? &this->template declareGenericProperty<
Real, is_ad>(
66 "PorousFlow_fluid_phase_density_nodal" + _phase)
67 : &this->template declareGenericProperty<
Real, is_ad>(
68 "PorousFlow_fluid_phase_density_qp" + _phase))
71 (_compute_rho_mu && !is_ad)
73 ? &this->template declarePropertyDerivative<
Real>(
74 "PorousFlow_fluid_phase_density_nodal" + _phase, _pressure_variable_name)
75 : &this->template declarePropertyDerivative<
Real>(
76 "PorousFlow_fluid_phase_density_qp" + _phase, _pressure_variable_name))
78 _ddensity_dT((_compute_rho_mu && !is_ad)
79 ? (_nodal_material ? &this->template declarePropertyDerivative<
Real>(
80 "PorousFlow_fluid_phase_density_nodal" + _phase,
81 _temperature_variable_name)
82 : &this->template declarePropertyDerivative<
Real>(
83 "PorousFlow_fluid_phase_density_qp" + _phase,
84 _temperature_variable_name))
87 _viscosity(_compute_rho_mu
88 ? (_nodal_material ? &this->template declareGenericProperty<
Real, is_ad>(
89 "PorousFlow_viscosity_nodal" + _phase)
90 : &this->template declareGenericProperty<
Real, is_ad>(
91 "PorousFlow_viscosity_qp" + _phase))
93 _dviscosity_dp((_compute_rho_mu && !is_ad)
95 ? &this->template declarePropertyDerivative<
Real>(
96 "PorousFlow_viscosity_nodal" + _phase, _pressure_variable_name)
97 : &this->template declarePropertyDerivative<
Real>(
98 "PorousFlow_viscosity_qp" + _phase, _pressure_variable_name))
101 (_compute_rho_mu && !is_ad)
103 ? &this->template declarePropertyDerivative<
Real>(
104 "PorousFlow_viscosity_nodal" + _phase, _temperature_variable_name)
105 : &this->template declarePropertyDerivative<
Real>(
106 "PorousFlow_viscosity_qp" + _phase, _temperature_variable_name))
109 _internal_energy(_compute_internal_energy
111 ? &this->template declareGenericProperty<
Real, is_ad>(
112 "PorousFlow_fluid_phase_internal_energy_nodal" + _phase)
113 : &this->template declareGenericProperty<
Real, is_ad>(
114 "PorousFlow_fluid_phase_internal_energy_qp" + _phase))
116 _dinternal_energy_dp((_compute_internal_energy && !is_ad)
118 ? &this->template declarePropertyDerivative<
Real>(
119 "PorousFlow_fluid_phase_internal_energy_nodal" + _phase,
120 _pressure_variable_name)
121 : &this->template declarePropertyDerivative<
Real>(
122 "PorousFlow_fluid_phase_internal_energy_qp" + _phase,
123 _pressure_variable_name))
125 _dinternal_energy_dT((_compute_internal_energy && !is_ad)
127 ? &this->template declarePropertyDerivative<
Real>(
128 "PorousFlow_fluid_phase_internal_energy_nodal" + _phase,
129 _temperature_variable_name)
130 : &this->template declarePropertyDerivative<
Real>(
131 "PorousFlow_fluid_phase_internal_energy_qp" + _phase,
132 _temperature_variable_name))
135 _enthalpy(_compute_enthalpy
136 ? (_nodal_material ? &this->template declareGenericProperty<
Real, is_ad>(
137 "PorousFlow_fluid_phase_enthalpy_nodal" + _phase)
138 : &this->template declareGenericProperty<
Real, is_ad>(
139 "PorousFlow_fluid_phase_enthalpy_qp" + _phase))
142 (_compute_enthalpy && !is_ad)
144 ? &this->template declarePropertyDerivative<
Real>(
145 "PorousFlow_fluid_phase_enthalpy_nodal" + _phase, _pressure_variable_name)
146 : &this->template declarePropertyDerivative<
Real>(
147 "PorousFlow_fluid_phase_enthalpy_qp" + _phase, _pressure_variable_name))
149 _denthalpy_dT((_compute_enthalpy && !is_ad)
150 ? (_nodal_material ? &this->template declarePropertyDerivative<
Real>(
151 "PorousFlow_fluid_phase_enthalpy_nodal" + _phase,
152 _temperature_variable_name)
153 : &this->template declarePropertyDerivative<
Real>(
154 "PorousFlow_fluid_phase_enthalpy_qp" + _phase,
155 _temperature_variable_name))
160 template <
bool is_ad>
164 mooseError(
"computeQpProperties() must be overriden in materials derived from " 165 "PorousFlowFluidPropertiesBase");
static InputParameters validParams()
PressureUnitEnum
Unit used for porepressure.
void mooseError(Args &&... args)
static InputParameters validParams()
Base class for fluid properties materials.
Base class for all PorousFlow materials that provide phase-dependent properties.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void computeQpProperties() override
TimeUnitEnum
Unit used for time.
PorousFlowFluidPropertiesBaseTempl(const InputParameters ¶meters)