20 params.
addParam<
bool>(
"strain_at_nearest_qp",
22 "When calculating nodal porosity that depends on strain, use the strain at " 23 "the nearest quadpoint. This adds a small extra computational burden, and " 24 "is not necessary for simulations involving only linear lagrange elements. " 25 " If you set this to true, you will also want to set the same parameter to " 26 "true for related Kernels and Materials");
28 "PorousFlowDictator",
"The UserObject that holds the list of PorousFlow variable names.");
29 params.
set<
bool>(
"use_displaced_mesh") =
false;
32 "energy-density is lumped to the nodes");
40 _var_is_porflow_var(_dictator.isPorousFlowVariable(_var.number())),
41 _num_phases(_dictator.numPhases()),
42 _fluid_present(_num_phases > 0),
43 _strain_at_nearest_qp(getParam<bool>(
"strain_at_nearest_qp")),
44 _porosity(getMaterialProperty<
Real>(
"PorousFlow_porosity_nodal")),
45 _dporosity_dvar(getMaterialProperty<
std::vector<
Real>>(
"dPorousFlow_porosity_nodal_dvar")),
47 getMaterialProperty<
std::vector<
RealGradient>>(
"dPorousFlow_porosity_nodal_dgradvar")),
48 _nearest_qp(_strain_at_nearest_qp
49 ? &getMaterialProperty<unsigned
int>(
"PorousFlow_nearestqp_nodal")
51 _rock_energy_nodal(getMaterialProperty<
Real>(
"PorousFlow_matrix_internal_energy_nodal")),
52 _drock_energy_nodal_dvar(
53 getMaterialProperty<
std::vector<
Real>>(
"dPorousFlow_matrix_internal_energy_nodal_dvar")),
54 _fluid_density(_fluid_present ? &getMaterialProperty<
std::vector<
Real>>(
55 "PorousFlow_fluid_phase_density_nodal")
57 _dfluid_density_dvar(_fluid_present ? &getMaterialProperty<
std::vector<
std::vector<
Real>>>(
58 "dPorousFlow_fluid_phase_density_nodal_dvar")
60 _fluid_saturation_nodal(
61 _fluid_present ? &getMaterialProperty<
std::vector<
Real>>(
"PorousFlow_saturation_nodal")
63 _dfluid_saturation_nodal_dvar(_fluid_present
64 ? &getMaterialProperty<
std::vector<
std::vector<
Real>>>(
65 "dPorousFlow_saturation_nodal_dvar")
67 _energy_nodal(_fluid_present ? &getMaterialProperty<
std::vector<
Real>>(
68 "PorousFlow_fluid_phase_internal_energy_nodal")
70 _denergy_nodal_dvar(_fluid_present ? &getMaterialProperty<
std::vector<
std::vector<
Real>>>(
71 "dPorousFlow_fluid_phase_internal_energy_nodal_dvar")
73 _strain_rate_qp(getMaterialProperty<
Real>(
"PorousFlow_volumetric_strain_rate_qp")),
75 "dPorousFlow_volumetric_strain_rate_qp_dvar"))
139 denergy += (*_dfluid_density_dvar)[
_i][ph][pvar] * (*_fluid_saturation_nodal)[
_i][ph] *
141 denergy += (*_fluid_density)[
_i][ph] * (*_dfluid_saturation_nodal_dvar)[
_i][ph][pvar] *
143 denergy += (*_fluid_density)[
_i][ph] * (*_fluid_saturation_nodal)[
_i][ph] *
145 denergy += (*_fluid_density)[
_i][ph] * (*_fluid_saturation_nodal)[
_i][ph] *
Real computedVolQpJac(unsigned int jvar)
Derivative of volumetric-strain part of the residual with respect to the Variable with variable numbe...
Real computedEnergyQpJac(unsigned int jvar)
Derivative of energy part of the residual with respect to the Variable with variable number jvar...
Kernel = energy_density * d(volumetric_strain)/dt which is lumped to the nodes.
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(PorousFlow variable)
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
unsigned int number() const
const VariablePhiGradient & _grad_phi
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
virtual Real computeQpResidual() override
const MaterialProperty< std::vector< Real > > *const _fluid_density
Nodal fluid density.
registerMooseObject("PorousFlowApp", PorousFlowHeatVolumetricExpansion)
virtual Real computeQpJacobian() override
PorousFlowHeatVolumetricExpansion(const InputParameters ¶meters)
const VariableTestValue & _test
const MaterialProperty< Real > & _strain_rate_qp
Strain rate.
const MaterialProperty< Real > & _porosity
Porosity.
const MaterialProperty< std::vector< Real > > & _drock_energy_nodal_dvar
d(nodal rock energy density)/d(PorousFlow variable)
const MaterialProperty< std::vector< RealGradient > > & _dstrain_rate_qp_dvar
d(strain rate)/d(PorousFlow variable)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< Real > & _rock_energy_nodal
Nodal rock energy density.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
static InputParameters validParams()
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable)
const unsigned int _num_phases
Number of fluid phases.
static InputParameters validParams()
void ErrorVector unsigned int
const bool _strain_at_nearest_qp
Whether the porosity uses the volumetric strain at the closest quadpoint.