20 MooseEnum coupling_type(
"Hydro ThermoHydro HydroMechanical ThermoHydroMechanical",
"Hydro");
23 "The type of simulation. For simulations involving Mechanical " 24 "deformations, you will need to supply the correct Biot coefficient. " 25 "For simulations involving Thermal flows, you will need an associated " 26 "ConstantThermalExpansionCoefficient Material");
28 "biot_coefficient", 1.0,
"biot_coefficient>=0 & biot_coefficient<=1",
"Biot coefficient");
29 params.
addParam<
bool>(
"multiply_by_density",
31 "If true, then this Kernel is the time derivative of the fluid " 32 "mass. If false, then this Kernel is the derivative of the " 33 "fluid volume (which is common in poro-mechanics)");
35 "PorousFlowDictator",
"The UserObject that holds the list of PorousFlow variable names.");
36 params.
addClassDescription(
"Fully-saturated version of the single-component, single-phase fluid " 37 "mass derivative wrt time");
45 _var_is_porflow_var(_dictator.isPorousFlowVariable(_var.number())),
46 _multiply_by_density(getParam<bool>(
"multiply_by_density")),
52 _biot_coefficient(getParam<
Real>(
"biot_coefficient")),
53 _biot_modulus(getMaterialProperty<
Real>(
"PorousFlow_constant_biot_modulus_qp")),
54 _thermal_coeff(_includes_thermal ? &getMaterialProperty<
Real>(
55 "PorousFlow_constant_thermal_expansion_coefficient_qp")
57 _fluid_density(_multiply_by_density ? &getMaterialProperty<
std::vector<
Real>>(
58 "PorousFlow_fluid_phase_density_qp")
60 _dfluid_density_dvar(_multiply_by_density
61 ? &getMaterialProperty<
std::vector<
std::vector<
Real>>>(
62 "dPorousFlow_fluid_phase_density_qp_dvar")
64 _pp(getMaterialProperty<
std::vector<
Real>>(
"PorousFlow_porepressure_qp")),
65 _pp_old(getMaterialPropertyOld<
std::vector<
Real>>(
"PorousFlow_porepressure_qp")),
67 getMaterialProperty<
std::vector<
std::vector<
Real>>>(
"dPorousFlow_porepressure_qp_dvar")),
68 _temperature(_includes_thermal ? &getMaterialProperty<
Real>(
"PorousFlow_temperature_qp")
70 _temperature_old(_includes_thermal ? &getMaterialPropertyOld<
Real>(
"PorousFlow_temperature_qp")
72 _dtemperature_dvar(_includes_thermal ? &getMaterialProperty<
std::vector<
Real>>(
73 "dPorousFlow_temperature_qp_dvar")
75 _strain_rate(_includes_mechanical
76 ? &getMaterialProperty<
Real>(
"PorousFlow_volumetric_strain_rate_qp")
78 _dstrain_rate_dvar(_includes_mechanical ? &getMaterialProperty<
std::vector<
RealGradient>>(
79 "dPorousFlow_volumetric_strain_rate_qp_dvar")
83 mooseError(
"PorousFlowFullySaturatedMassTimeDerivative is only applicable to single-phase, " 84 "single-component fluid-flow problems. The Dictator proclaims that you have more " 85 "than one phase or more than one fluid component. The Dictator does not take such " 92 const unsigned phase = 0;
95 volume -= (*_thermal_coeff)[
_qp] * ((*_temperature)[
_qp] - (*_temperature_old)[
_qp]) /
_dt;
124 const unsigned phase = 0;
129 volume -= (*_thermal_coeff)[
_qp] * ((*_temperature)[
_qp] - (*_temperature_old)[
_qp]) /
_dt;
130 dvolume -= (*_thermal_coeff)[
_qp] * (*_dtemperature_dvar)[
_qp][pvar] /
_dt *
_phi[
_j][
_qp];
138 return _test[
_i][
_qp] * ((*_fluid_density)[
_qp][phase] * dvolume +
const bool _var_is_porflow_var
Whether the Variable for this Kernel is a PorousFlow variable.
const MaterialProperty< std::vector< Real > > & _pp
Quadpoint pore pressure in each phase.
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 MaterialProperty< Real > & _biot_modulus
Constant Biot modulus.
const bool _includes_thermal
Whether thermal contributions should be added to the residual.
const VariablePhiGradient & _grad_phi
virtual Real computeQpJacobian() override
unsigned int numComponents() const
The number of fluid components.
const bool _includes_mechanical
Whether mechanical contributions should be added to the residual.
Time derivative of fluid mass suitable for fully-saturated, single-phase, single-component simulation...
registerMooseObject("PorousFlowApp", PorousFlowFullySaturatedMassTimeDerivative)
const VariableTestValue & _test
Real computeQpJac(unsigned int pvar)
Jacobian contribution for the PorousFlow variable pvar.
unsigned int numPhases() const
The number of fluid phases.
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dvar
Derivative of porepressure in each phase wrt the PorousFlow variables.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const Real _biot_coefficient
Biot coefficient (used in simulations involving Mechanical deformations)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
const bool _multiply_by_density
If true then the Kernel is the time derivative of the fluid mass, otherwise it is the derivative of t...
CouplingTypeEnum
Determines whether mechanical and/or thermal contributions should be added to the residual...
void mooseError(Args &&... args) const
static InputParameters validParams()
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.
PorousFlowFullySaturatedMassTimeDerivative(const InputParameters ¶meters)
virtual Real computeQpResidual() override
const MaterialProperty< std::vector< Real > > & _pp_old
Old value of quadpoint pore pressure in each phase.
const VariablePhiValue & _phi
static InputParameters validParams()