19 "Variable that is the porepressure of phase 0. This is assumed to " 20 "be the liquid phase. It will be <= phase1_porepressure.");
22 "Variable that is the porepressure of phase 1 (the gas phase)");
24 "liquid_phase", 0,
"Phase number of the liquid phase (more precisely, the phase of phase0)");
26 "This Material is used for 2-phase situations. It calculates the 2 saturations given the 2 " 27 "porepressures, assuming the capillary pressure is hysteretic. Derivatives of these " 28 "quantities are also computed");
34 _pc(_nodal_material ? declareProperty<
Real>(
"PorousFlow_hysteretic_capillary_pressure_nodal")
35 : declareProperty<
Real>(
"PorousFlow_hysteretic_capillary_pressure_qp")),
36 _phase0_porepressure(_nodal_material ? coupledDofValues(
"phase0_porepressure")
37 : coupledValue(
"phase0_porepressure")),
38 _phase0_gradp_qp(coupledGradient(
"phase0_porepressure")),
39 _phase0_porepressure_varnum(coupled(
"phase0_porepressure")),
40 _p0var(_dictator.isPorousFlowVariable(_phase0_porepressure_varnum)
41 ? _dictator.porousFlowVariableNum(_phase0_porepressure_varnum)
44 _phase1_porepressure(_nodal_material ? coupledDofValues(
"phase1_porepressure")
45 : coupledValue(
"phase1_porepressure")),
46 _phase1_gradp_qp(coupledGradient(
"phase1_porepressure")),
47 _phase1_porepressure_varnum(coupled(
"phase1_porepressure")),
48 _p1var(_dictator.isPorousFlowVariable(_phase1_porepressure_varnum)
49 ? _dictator.porousFlowVariableNum(_phase1_porepressure_varnum)
53 mooseError(
"The Dictator announces that the number of phases is ",
54 _dictator.numPhases(),
55 " whereas PorousFlow2PhaseHysPP can only be used for 2-phase simulation. When you " 56 "have efficient government, you have dictatorship.");
80 (*_grads_qp)[_qp][0] = ds * ((*_gradp_qp)[_qp][1] - (*_gradp_qp)[_qp][0]);
81 (*_grads_qp)[_qp][1] = -(*_grads_qp)[_qp][0];
88 (*_dporepressure_dvar)[_qp][0][
_p0var] = 1.0;
90 (*_dgradp_qp_dgradv)[_qp][0][
_p0var] = 1.0;
94 (*_dporepressure_dvar)[_qp][1][
_p1var] = 1.0;
96 (*_dgradp_qp_dgradv)[_qp][1][
_p1var] = 1.0;
101 (*_dsaturation_dvar)[_qp][0][
_p0var] = -ds;
102 (*_dsaturation_dvar)[_qp][1][
_p0var] = ds;
106 (*_dsaturation_dvar)[_qp][0][
_p1var] = ds;
107 (*_dsaturation_dvar)[_qp][1][
_p1var] = -ds;
111 if (!_nodal_material)
116 (*_dgrads_qp_dgradv)[_qp][0][
_p0var] = -ds;
118 (*_dgrads_qp_dgradv)[_qp][1][
_p0var] = ds;
123 (*_dgrads_qp_dgradv)[_qp][0][
_p1var] = ds;
125 (*_dgrads_qp_dgradv)[_qp][1][
_p1var] = -ds;
virtual void initQpStatefulProperties() override
const VariableGradient & _phase0_gradp_qp
Gradient(phase0_porepressure) at the qps.
virtual void initQpStatefulProperties() override
void mooseError(Args &&... args)
PorousFlow2PhaseHysPP(const InputParameters ¶meters)
Material designed to calculate the 2 porepressures and 2 saturations, as well as derivatives of them...
GenericMaterialProperty< std::vector< Real >, is_ad > & _porepressure
Computed nodal or quadpoint values of porepressure of the phases.
registerMooseObject("PorousFlowApp", PorousFlow2PhaseHysPP)
static InputParameters validParams()
virtual void computeQpProperties() override
const unsigned int _phase0_porepressure_varnum
Moose variable number of the phase0 porepressure.
virtual void computeQpProperties() override
Real dliquidSaturationQp(Real pc) const
const VariableValue & _phase1_porepressure
Nodal or quadpoint value of porepressure of the one phase (eg, the gas phase)
static InputParameters validParams()
const VariableGradient & _phase1_gradp_qp
Gradient(phase1_porepressure) at the qps.
Real d2liquidSaturationQp(Real pc) const
Base material designed to calculate and store quantities relevant for hysteretic capillary pressure c...
void buildQpPPSS()
Assemble std::vectors of porepressure and saturation at the nodes and quadpoints. ...
Real liquidSaturationQp(Real pc) const
const unsigned int _num_phases
Number of phases.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned int _phase1_porepressure_varnum
Moose variable number of the phase1 porepressure.
MaterialProperty< Real > & _pc
Computed nodal or quadpoint values of capillary pressure.
const VariableValue & _phase0_porepressure
Nodal or quadpoint value of porepressure of the zero phase (eg, the water phase)
GenericMaterialProperty< std::vector< Real >, is_ad > & _saturation
Computed nodal or qp saturation of the phases.
const unsigned int _p0var
PorousFlow variable number of the phase0 porepressure.
const unsigned int _p1var
PorousFlow variable number of the phase1 porepressure.