www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PorousFlowBasicAdvection Class Reference

Kernel = grad(test) * darcy_velocity * u. More...

#include <PorousFlowBasicAdvection.h>

Inheritance diagram for PorousFlowBasicAdvection:
[legend]

Public Member Functions

 PorousFlowBasicAdvection (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual () override
 
virtual Real computeQpJacobian () override
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 

Protected Attributes

const PorousFlowDictator_dictator
 Holds info on the Porous Flow variables. More...
 
const unsigned _ph
 Phase of Darcy velocity. More...
 
const MaterialProperty< std::vector< RealVectorValue > > & _darcy_velocity
 _darcy_velocity[_qp][ph](j) = j^th component of the Darcy velocity of phase ph More...
 
const MaterialProperty< std::vector< std::vector< RealVectorValue > > > & _ddarcy_velocity_dvar
 _ddarcy_velocity_dvar[_qp][ph][v](j) = d(j^th component of the Darcy velocity of phase ph)/d(PorousFlow variable v) More...
 
const MaterialProperty< std::vector< std::vector< std::vector< RealVectorValue > > > > & _ddarcy_velocity_dgradvar
 _ddarcy_velocity_dgradvar[_qp][ph][j][v](k) = d(k^th component of the Darcy velocity of phase ph)/d(j^th component of grad(PorousFlow variable v)) More...
 

Detailed Description

Kernel = grad(test) * darcy_velocity * u.

Definition at line 24 of file PorousFlowBasicAdvection.h.

Constructor & Destructor Documentation

◆ PorousFlowBasicAdvection()

PorousFlowBasicAdvection::PorousFlowBasicAdvection ( const InputParameters &  parameters)

Definition at line 27 of file PorousFlowBasicAdvection.C.

28  : Kernel(parameters),
29  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
30  _ph(getParam<unsigned int>("phase")),
32  getMaterialProperty<std::vector<RealVectorValue>>("PorousFlow_darcy_velocity_qp")),
33  _ddarcy_velocity_dvar(getMaterialProperty<std::vector<std::vector<RealVectorValue>>>(
34  "dPorousFlow_darcy_velocity_qp_dvar")),
36  getMaterialProperty<std::vector<std::vector<std::vector<RealVectorValue>>>>(
37  "dPorousFlow_darcy_velocity_qp_dgradvar"))
38 {
39  if (_ph >= _dictator.numPhases())
40  paramError("phase",
41  "The Dictator proclaims that the maximum phase index in this simulation is ",
42  _dictator.numPhases() - 1,
43  " whereas you have used ",
44  _ph,
45  ". Remember that indexing starts at 0. The Dictator is watching you, to "
46  "ensure your wellbeing.");
47 }
const MaterialProperty< std::vector< std::vector< RealVectorValue > > > & _ddarcy_velocity_dvar
_ddarcy_velocity_dvar[_qp][ph][v](j) = d(j^th component of the Darcy velocity of phase ph)/d(PorousFl...
const unsigned _ph
Phase of Darcy velocity.
unsigned int numPhases() const
The number of fluid phases.
const MaterialProperty< std::vector< std::vector< std::vector< RealVectorValue > > > > & _ddarcy_velocity_dgradvar
_ddarcy_velocity_dgradvar[_qp][ph][j][v](k) = d(k^th component of the Darcy velocity of phase ph)/d(j...
const PorousFlowDictator & _dictator
Holds info on the Porous Flow variables.
const MaterialProperty< std::vector< RealVectorValue > > & _darcy_velocity
_darcy_velocity[_qp][ph](j) = j^th component of the Darcy velocity of phase ph

Member Function Documentation

◆ computeQpJacobian()

Real PorousFlowBasicAdvection::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 56 of file PorousFlowBasicAdvection.C.

57 {
58  const Real result = -_grad_test[_i][_qp] * _darcy_velocity[_qp][_ph] * _phi[_j][_qp];
59  return result + computeQpOffDiagJacobian(_var.number());
60 }
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const unsigned _ph
Phase of Darcy velocity.
const MaterialProperty< std::vector< RealVectorValue > > & _darcy_velocity
_darcy_velocity[_qp][ph](j) = j^th component of the Darcy velocity of phase ph

◆ computeQpOffDiagJacobian()

Real PorousFlowBasicAdvection::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 63 of file PorousFlowBasicAdvection.C.

Referenced by computeQpJacobian().

64 {
66  return 0.0;
67 
68  const unsigned pvar = _dictator.porousFlowVariableNum(jvar);
69  Real result =
70  -_grad_test[_i][_qp] * _ddarcy_velocity_dvar[_qp][_ph][pvar] * _phi[_j][_qp] * _u[_qp];
71  for (unsigned j = 0; j < LIBMESH_DIM; ++j)
72  result -= _grad_test[_i][_qp] *
73  (_ddarcy_velocity_dgradvar[_qp][_ph][j][pvar] * _grad_phi[_j][_qp](j)) * _u[_qp];
74 
75  return result;
76 }
const MaterialProperty< std::vector< std::vector< RealVectorValue > > > & _ddarcy_velocity_dvar
_ddarcy_velocity_dvar[_qp][ph][v](j) = d(j^th component of the Darcy velocity of phase ph)/d(PorousFl...
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
const unsigned _ph
Phase of Darcy velocity.
const MaterialProperty< std::vector< std::vector< std::vector< RealVectorValue > > > > & _ddarcy_velocity_dgradvar
_ddarcy_velocity_dgradvar[_qp][ph][j][v](k) = d(k^th component of the Darcy velocity of phase ph)/d(j...
const PorousFlowDictator & _dictator
Holds info on the Porous Flow variables.
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.

◆ computeQpResidual()

Real PorousFlowBasicAdvection::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 50 of file PorousFlowBasicAdvection.C.

51 {
52  return -_grad_test[_i][_qp] * _darcy_velocity[_qp][_ph] * _u[_qp];
53 }
const unsigned _ph
Phase of Darcy velocity.
const MaterialProperty< std::vector< RealVectorValue > > & _darcy_velocity
_darcy_velocity[_qp][ph](j) = j^th component of the Darcy velocity of phase ph

Member Data Documentation

◆ _darcy_velocity

const MaterialProperty<std::vector<RealVectorValue> >& PorousFlowBasicAdvection::_darcy_velocity
protected

_darcy_velocity[_qp][ph](j) = j^th component of the Darcy velocity of phase ph

Definition at line 41 of file PorousFlowBasicAdvection.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _ddarcy_velocity_dgradvar

const MaterialProperty<std::vector<std::vector<std::vector<RealVectorValue> > > >& PorousFlowBasicAdvection::_ddarcy_velocity_dgradvar
protected

_ddarcy_velocity_dgradvar[_qp][ph][j][v](k) = d(k^th component of the Darcy velocity of phase ph)/d(j^th component of grad(PorousFlow variable v))

Definition at line 55 of file PorousFlowBasicAdvection.h.

Referenced by computeQpOffDiagJacobian().

◆ _ddarcy_velocity_dvar

const MaterialProperty<std::vector<std::vector<RealVectorValue> > >& PorousFlowBasicAdvection::_ddarcy_velocity_dvar
protected

_ddarcy_velocity_dvar[_qp][ph][v](j) = d(j^th component of the Darcy velocity of phase ph)/d(PorousFlow variable v)

Definition at line 47 of file PorousFlowBasicAdvection.h.

Referenced by computeQpOffDiagJacobian().

◆ _dictator

const PorousFlowDictator& PorousFlowBasicAdvection::_dictator
protected

Holds info on the Porous Flow variables.

Definition at line 35 of file PorousFlowBasicAdvection.h.

Referenced by computeQpOffDiagJacobian(), and PorousFlowBasicAdvection().

◆ _ph

const unsigned PorousFlowBasicAdvection::_ph
protected

Phase of Darcy velocity.

Definition at line 38 of file PorousFlowBasicAdvection.h.

Referenced by computeQpJacobian(), computeQpOffDiagJacobian(), computeQpResidual(), and PorousFlowBasicAdvection().


The documentation for this class was generated from the following files: