Go to the documentation of this file.
20 params.addRequiredCoupledVar(
"phase0_porepressure",
21 "Variable that is the porepressure of phase "
22 "0 (eg, the water phase). It will be <= "
23 "phase1_porepressure.");
24 params.addRequiredCoupledVar(
"phase1_porepressure",
25 "Variable that is the porepressure of phase 1 (eg, the gas phase)");
26 params.addRequiredParam<UserObjectName>(
"capillary_pressure",
27 "Name of the UserObject defining the capillary pressure");
28 params.addClassDescription(
"This Material calculates the 2 porepressures and the 2 saturations "
29 "in a 2-phase situation, and derivatives of these with "
30 "respect to the PorousFlowVariables");
37 _phase0_porepressure(_nodal_material ? coupledDofValues(
"phase0_porepressure")
38 : coupledValue(
"phase0_porepressure")),
39 _phase0_gradp_qp(coupledGradient(
"phase0_porepressure")),
40 _phase0_porepressure_varnum(coupled(
"phase0_porepressure")),
41 _p0var(_dictator.isPorousFlowVariable(_phase0_porepressure_varnum)
42 ? _dictator.porousFlowVariableNum(_phase0_porepressure_varnum)
45 _phase1_porepressure(_nodal_material ? coupledDofValues(
"phase1_porepressure")
46 : coupledValue(
"phase1_porepressure")),
47 _phase1_gradp_qp(coupledGradient(
"phase1_porepressure")),
48 _phase1_porepressure_varnum(coupled(
"phase1_porepressure")),
49 _p1var(_dictator.isPorousFlowVariable(_phase1_porepressure_varnum)
50 ? _dictator.porousFlowVariableNum(_phase1_porepressure_varnum)
55 mooseError(
"The Dictator announces that the number of phases is ",
56 _dictator.numPhases(),
57 " whereas PorousFlow2PhasePP can only be used for 2-phase simulation. When you "
58 "have an efficient government, you have a dictatorship.");
81 (*_grads_qp)[_qp][0] = ds * ((*_gradp_qp)[_qp][0] - (*_gradp_qp)[_qp][1]);
82 (*_grads_qp)[_qp][1] = -(*_grads_qp)[_qp][0];
91 (*_dgradp_qp_dgradv)[_qp][0][
_p0var] = 1.0;
97 (*_dgradp_qp_dgradv)[_qp][1][
_p1var] = 1.0;
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;
Real dSaturation(Real pc, unsigned qp=0) const
Derivative of saturation wrt capillary pressure.
InputParameters validParams< PorousFlow2PhasePP >()
virtual void computeQpProperties() override
const unsigned int _phase0_porepressure_varnum
Moose variable number of the phase0 porepressure.
const unsigned int _p1var
PorousFlow variable number of the phase1 porepressure.
const unsigned int _phase1_porepressure_varnum
Moose variable number of the phase1 porepressure.
const VariableValue & _phase0_porepressure
Nodal or quadpoint value of porepressure of the zero phase (eg, the water phase)
Base class for capillary pressure for multiphase flow in porous media.
virtual void initQpStatefulProperties() override
const VariableGradient & _phase1_gradp_qp
Gradient(phase1_porepressure) at the qps.
const unsigned int _num_phases
Number of phases.
const VariableValue & _phase1_porepressure
Nodal or quadpoint value of porepressure of the one phase (eg, the gas phase)
Real buildQpPPSS()
Assemble std::vectors of porepressure and saturation at the nodes and quadpoints, and return the capi...
Base class for thermophysical variable materials, which assemble materials for primary variables such...
const VariableGradient & _phase0_gradp_qp
Gradient(phase0_porepressure) at the qps.
const PorousFlowCapillaryPressure & _pc_uo
Capillary pressure UserObject.
MaterialProperty< std::vector< Real > > & _porepressure
Computed nodal or quadpoint values of porepressure of the phases.
MaterialProperty< std::vector< std::vector< Real > > > & _dporepressure_dvar
d(porepressure)/d(PorousFlow variable)
virtual void computeQpProperties() override
Base material designed to calculate fluid phase porepressure and saturation for the two-phase situati...
const unsigned int _p0var
PorousFlow variable number of the phase0 porepressure.
Real d2Saturation(Real pc, unsigned qp=0) const
Second derivative of saturation wrt capillary pressure.
PorousFlow2PhasePP(const InputParameters ¶meters)
virtual void initQpStatefulProperties() override
MaterialProperty< std::vector< Real > > & _saturation
Computed nodal or qp saturation of the phases.
Real saturation(Real pc, unsigned qp=0) const
Saturation as a function of capillary pressure.
MaterialProperty< std::vector< std::vector< Real > > > & _dsaturation_dvar
d(saturation)/d(PorousFlow variable)
registerMooseObject("PorousFlowApp", PorousFlow2PhasePP)
InputParameters validParams< PorousFlowVariableBase >()