Go to the documentation of this file.
39 using Kernel::computeOffDiagJacobian;
42 virtual Real
darcyQp(
unsigned int ph)
const;
53 virtual Real
mobility(
unsigned nodenum,
unsigned phase)
const;
61 virtual Real
dmobility(
unsigned nodenum,
unsigned phase,
unsigned pvar)
const;
114 const MaterialProperty<std::vector<Real>> &
_pp;
117 const MaterialProperty<std::vector<RealGradient>> &
_grad_p;
123 const MaterialProperty<std::vector<std::vector<RealGradient>>> &
_dgrad_p_dvar;
174 std::unordered_map<unsigned, std::vector<std::vector<unsigned>>>
_num_upwinds;
virtual void computeOffDiagJacobian(MooseVariableFEBase &jvar) override
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const unsigned _full_upwind_threshold
If the number of upwind-downwind swaps is less than this amount then full upwinding is used.
const MaterialProperty< std::vector< std::vector< Real > > > & _dgrad_p_dgrad_var
Derivative of Grad porepressure in each phase wrt grad(PorousFlow variables)
void quickUpwind(JacRes res_or_jac, unsigned int ph, unsigned int pvar)
Calculate the residual or Jacobian using the nodal mobilities, but without conserving fluid mass.
enum PorousFlowDarcyBase::FallbackEnum _fallback_scheme
const MaterialProperty< std::vector< RealGradient > > & _grad_p
Gradient of the pore pressure in each phase.
const MaterialProperty< std::vector< Real > > & _fluid_viscosity
Viscosity of each component in each phase.
const MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_density_qp_dvar
Derivative of the fluid density for each phase wrt PorousFlow variables (at the qp)
const bool _perm_derivs
Flag to check whether permeabiity derivatives are non-zero.
const MaterialProperty< std::vector< Real > > & _fluid_density_node
Fluid density for each phase (at the node)
std::unordered_map< unsigned, std::vector< std::vector< unsigned > > > _num_upwinds
Number of nonlinear iterations (in this timestep and this element) that a node is an upwind node for ...
virtual void timestepSetup() override
const MaterialProperty< RealTensorValue > & _permeability
Permeability of porous material.
const MaterialProperty< std::vector< RealTensorValue > > & _dpermeability_dvar
d(permeabiity)/d(PorousFlow variable)
InputParameters validParams< PorousFlowDarcyBase >()
std::vector< std::vector< std::vector< Real > > > _jacobian
Derivative of _proto_flux with respect to nodal variables.
const MaterialProperty< std::vector< std::vector< RealGradient > > > & _dgrad_p_dvar
Derivative of Grad porepressure in each phase wrt PorousFlow variables.
virtual Real mobility(unsigned nodenum, unsigned phase) const
The mobility of the fluid.
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
const MaterialProperty< std::vector< Real > > & _pp
Nodal pore pressure in each phase.
void fullyUpwind(JacRes res_or_jac, unsigned int ph, unsigned int pvar)
Calculate the residual or Jacobian using full upwinding.
std::unordered_map< unsigned, std::vector< std::vector< unsigned > > > _num_downwinds
Number of nonlinear iterations (in this timestep and this element) that a node is an downwind node fo...
const MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_viscosity_dvar
Derivative of the fluid viscosity for each phase wrt PorousFlow variables.
const MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_density_node_dvar
Derivative of the fluid density for each phase wrt PorousFlow variables (at the node)
void harmonicMean(JacRes res_or_jac, unsigned int ph, unsigned int pvar)
Calculate the residual or Jacobian by using the harmonic mean of the nodal mobilities for the entire ...
virtual Real darcyQp(unsigned int ph) const
The Darcy part of the flux (this is the non-upwinded part)
virtual Real computeQpResidual() override
virtual Real darcyQpJacobian(unsigned int jvar, unsigned int ph) const
Jacobian of the Darcy part of the flux.
const unsigned int _num_phases
The number of fluid phases.
virtual void computeJacobian() override
virtual void computeResidual() override
void computeResidualAndJacobian(JacRes res_or_jac, unsigned int jvar)
Computation of the residual and Jacobian.
const RealVectorValue _gravity
Gravity. Defaults to 9.81 m/s^2.
const MaterialProperty< std::vector< Real > > & _fluid_density_qp
Fluid density for each phase (at the qp)
PorousFlowDarcyBase(const InputParameters ¶meters)
virtual Real dmobility(unsigned nodenum, unsigned phase, unsigned pvar) const
The derivative of mobility with respect to PorousFlow variable pvar.
FallbackEnum
If full upwinding is failing due to nodes swapping between upwind and downwind in successive nonlinea...
std::vector< std::vector< Real > > _proto_flux
The Darcy flux.
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dpermeability_dgradvar
d(permeabiity)/d(grad(PorousFlow variable))