21 params.
addRequiredParam<UserObjectName>(
"fp",
"The name of the user object for fluid properties");
24 "This Material calculates fluid properties for a multicomponent fluid");
32 _ddensity_dX(_compute_rho_mu
33 ? (_nodal_material ? &this->template declarePropertyDerivative<
Real>(
34 "PorousFlow_fluid_phase_density_nodal" + _phase,
35 _mass_fraction_variable_name)
36 : &this->template declarePropertyDerivative<
Real>(
37 "PorousFlow_fluid_phase_density_qp" + _phase,
38 _mass_fraction_variable_name))
43 ? &this->template declarePropertyDerivative<
Real>(
44 "PorousFlow_viscosity_nodal" + _phase, _mass_fraction_variable_name)
45 : &this->template declarePropertyDerivative<
Real>(
46 "PorousFlow_viscosity_qp" + _phase, _mass_fraction_variable_name))
48 _dinternal_energy_dX(_compute_internal_energy
50 ? &this->template declarePropertyDerivative<
Real>(
51 "PorousFlow_fluid_phase_internal_energy_nodal" + _phase,
52 _mass_fraction_variable_name)
53 : &this->template declarePropertyDerivative<
Real>(
54 "PorousFlow_fluid_phase_internal_energy_qp" + _phase,
55 _mass_fraction_variable_name))
57 _denthalpy_dX(_compute_enthalpy
58 ? (_nodal_material ? &this->template declarePropertyDerivative<
Real>(
59 "PorousFlow_fluid_phase_enthalpy_nodal" + _phase,
60 _mass_fraction_variable_name)
61 : &this->template declarePropertyDerivative<
Real>(
62 "PorousFlow_fluid_phase_enthalpy_qp" + _phase,
63 _mass_fraction_variable_name))
66 _is_X_nodal(isCoupled(
"x") ? getFieldVar(
"x", 0)->isNodal() : false),
67 _X(_nodal_material && _is_X_nodal ? this->template coupledGenericDofValue<is_ad>(
"x")
68 : this->template coupledGenericValue<is_ad>(
"x"))
77 (*_density)[_qp] = _fp.rho_from_p_T_X(
78 _porepressure[_qp][_phase_num] * _pressure_to_Pascals, _temperature[_qp] + _t_c2k, _X[_qp]);
80 if (_compute_internal_energy)
81 (*_internal_energy)[_qp] = _fp.e_from_p_T_X(
82 _porepressure[_qp][_phase_num] * _pressure_to_Pascals, _temperature[_qp] + _t_c2k, _X[_qp]);
84 if (_compute_enthalpy)
85 (*_enthalpy)[_qp] = _fp.h_from_p_T_X(
86 _porepressure[_qp][_phase_num] * _pressure_to_Pascals, _temperature[_qp] + _t_c2k, _X[_qp]);
100 _fp.rho_from_p_T_X(_porepressure[_qp][_phase_num] * _pressure_to_Pascals, Tk, _X[_qp]);
102 _fp.mu_from_p_T_X(_porepressure[_qp][_phase_num] * _pressure_to_Pascals, Tk, _X[_qp]) /
103 _pressure_to_Pascals / _time_to_seconds;
108 Real rho, drho_dp, drho_dT, drho_dx;
110 _pressure_to_Pascals,
117 (*_density)[_qp] =
rho;
118 (*_ddensity_dp)[_qp] = drho_dp * _pressure_to_Pascals;
119 (*_ddensity_dT)[_qp] = drho_dT;
120 (*_ddensity_dX)[_qp] = drho_dx;
123 Real mu, dmu_dp, dmu_dT, dmu_dx;
125 _pressure_to_Pascals,
132 (*_viscosity)[_qp] =
mu / _pressure_to_Pascals / _time_to_seconds;
133 (*_dviscosity_dp)[_qp] = dmu_dp / _time_to_seconds;
134 (*_dviscosity_dT)[_qp] = dmu_dT / _pressure_to_Pascals / _time_to_seconds;
135 (*_dviscosity_dX)[_qp] = dmu_dx / _pressure_to_Pascals / _time_to_seconds;
140 if (_compute_internal_energy)
143 (*_internal_energy)[_qp] =
144 _fp.e_from_p_T_X(_porepressure[_qp][_phase_num] * _pressure_to_Pascals, Tk, _X[_qp]);
147 Real e, de_dp, de_dT, de_dx;
149 _pressure_to_Pascals,
156 (*_internal_energy)[_qp] = e;
157 (*_dinternal_energy_dp)[_qp] = de_dp * _pressure_to_Pascals;
158 (*_dinternal_energy_dT)[_qp] = de_dT;
159 (*_dinternal_energy_dX)[_qp] = de_dx;
164 if (_compute_enthalpy)
168 _fp.h_from_p_T_X(_porepressure[_qp][_phase_num] * _pressure_to_Pascals, Tk, _X[_qp]);
171 Real h, dh_dp, dh_dT, dh_dx;
173 _pressure_to_Pascals,
180 (*_enthalpy)[_qp] = h;
181 (*_denthalpy_dp)[_qp] = dh_dp * _pressure_to_Pascals;
182 (*_denthalpy_dT)[_qp] = dh_dT;
183 (*_denthalpy_dX)[_qp] = dh_dx;
Moose::GenericType< Real, is_ad > GenericReal
static InputParameters validParams()
Base class for fluid properties materials.
PorousFlowMultiComponentFluidTempl(const InputParameters ¶meters)
virtual void computeQpProperties() override
static InputParameters validParams()
registerMooseObject("PorousFlowApp", PorousFlowMultiComponentFluid)
virtual void initQpStatefulProperties() override
Common class for multiple component fluid properties using a pressure and temperature formulation...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
General multicomponent fluid material.