19 params.addParam<
bool>(
20 "compute_density_and_viscosity",
true,
"Compute the fluid density and viscosity");
21 params.addParam<
bool>(
"compute_internal_energy",
true,
"Compute the fluid internal energy");
22 params.addParam<
bool>(
"compute_enthalpy",
true,
"Compute the fluid enthalpy");
23 params.addRequiredParam<UserObjectName>(
"fp",
"The name of the user object for fluid properties");
24 MooseEnum p_unit_choice(
"Pa MPa",
"Pa");
25 params.addParam<MooseEnum>(
"pressure_unit",
27 "The unit of the pressure variable used everywhere in the input file "
28 "except for in the FluidProperties-module objects");
29 MooseEnum time_unit_choice(
"seconds hours days years",
"seconds");
30 params.addParam<MooseEnum>(
"time_unit",
32 "The unit of time used everywhere in the input file except for in the "
33 "FluidProperties-module objects");
34 params.addClassDescription(
"This Material calculates fluid properties at the quadpoints or nodes "
35 "for a single component fluid");
43 _time_unit(getParam<MooseEnum>(
"time_unit").getEnum<
TimeUnitEnum>()),
49 : 3600 * 24 * 365.25),
50 _compute_rho_mu(getParam<bool>(
"compute_density_and_viscosity")),
51 _compute_internal_energy(getParam<bool>(
"compute_internal_energy")),
52 _compute_enthalpy(getParam<bool>(
"compute_enthalpy")),
53 _density(_compute_rho_mu
55 ? &declareProperty<Real>(
"PorousFlow_fluid_phase_density_nodal" + _phase)
56 : &declareProperty<Real>(
"PorousFlow_fluid_phase_density_qp" + _phase))
61 ? &declarePropertyDerivative<Real>(
62 "PorousFlow_fluid_phase_density_nodal" + _phase, _pressure_variable_name)
63 : &declarePropertyDerivative<Real>(
"PorousFlow_fluid_phase_density_qp" + _phase,
64 _pressure_variable_name))
66 _ddensity_dT(_compute_rho_mu
67 ? (_nodal_material ? &declarePropertyDerivative<Real>(
68 "PorousFlow_fluid_phase_density_nodal" + _phase,
69 _temperature_variable_name)
70 : &declarePropertyDerivative<Real>(
71 "PorousFlow_fluid_phase_density_qp" + _phase,
72 _temperature_variable_name))
75 _viscosity(_compute_rho_mu
77 ? &declareProperty<Real>(
"PorousFlow_viscosity_nodal" + _phase)
78 : &declareProperty<Real>(
"PorousFlow_viscosity_qp" + _phase))
80 _dviscosity_dp(_compute_rho_mu
82 ? &declarePropertyDerivative<Real>(
83 "PorousFlow_viscosity_nodal" + _phase, _pressure_variable_name)
84 : &declarePropertyDerivative<Real>(
"PorousFlow_viscosity_qp" + _phase,
85 _pressure_variable_name))
90 ? &declarePropertyDerivative<Real>(
"PorousFlow_viscosity_nodal" + _phase,
91 _temperature_variable_name)
92 : &declarePropertyDerivative<Real>(
"PorousFlow_viscosity_qp" + _phase,
93 _temperature_variable_name))
97 _compute_internal_energy
99 ? &declareProperty<Real>(
"PorousFlow_fluid_phase_internal_energy_nodal" + _phase)
100 : &declareProperty<Real>(
"PorousFlow_fluid_phase_internal_energy_qp" + _phase))
102 _dinternal_energy_dp(_compute_internal_energy
104 ? &declarePropertyDerivative<Real>(
105 "PorousFlow_fluid_phase_internal_energy_nodal" + _phase,
106 _pressure_variable_name)
107 : &declarePropertyDerivative<Real>(
108 "PorousFlow_fluid_phase_internal_energy_qp" + _phase,
109 _pressure_variable_name))
111 _dinternal_energy_dT(_compute_internal_energy
113 ? &declarePropertyDerivative<Real>(
114 "PorousFlow_fluid_phase_internal_energy_nodal" + _phase,
115 _temperature_variable_name)
116 : &declarePropertyDerivative<Real>(
117 "PorousFlow_fluid_phase_internal_energy_qp" + _phase,
118 _temperature_variable_name))
121 _enthalpy(_compute_enthalpy
123 ? &declareProperty<Real>(
"PorousFlow_fluid_phase_enthalpy_nodal" + _phase)
124 : &declareProperty<Real>(
"PorousFlow_fluid_phase_enthalpy_qp" + _phase))
129 ? &declarePropertyDerivative<Real>(
130 "PorousFlow_fluid_phase_enthalpy_nodal" + _phase, _pressure_variable_name)
131 : &declarePropertyDerivative<Real>(
"PorousFlow_fluid_phase_enthalpy_qp" + _phase,
132 _pressure_variable_name))
134 _denthalpy_dT(_compute_enthalpy
135 ? (_nodal_material ? &declarePropertyDerivative<Real>(
136 "PorousFlow_fluid_phase_enthalpy_nodal" + _phase,
137 _temperature_variable_name)
138 : &declarePropertyDerivative<Real>(
139 "PorousFlow_fluid_phase_enthalpy_qp" + _phase,
140 _temperature_variable_name))
169 Real rho, drho_dp, drho_dT, mu, dmu_dp, dmu_dT;
178 (*_density)[_qp] = rho;
180 (*_ddensity_dT)[_qp] = drho_dT;
189 Real e, de_dp, de_dT;
191 (*_internal_energy)[_qp] = e;
193 (*_dinternal_energy_dT)[_qp] = de_dT;
199 Real h, dh_dp, dh_dT;
201 (*_enthalpy)[_qp] = h;
203 (*_denthalpy_dT)[_qp] = dh_dT;