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

Define the Kernel for a PrimaryConvection operator that looks like: cond * grad_pressure * grad_u. More...

#include <PrimaryConvection.h>

Inheritance diagram for PrimaryConvection:
[legend]

Public Member Functions

 PrimaryConvection (const InputParameters &parameters)
 

Protected Member Functions

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

Protected Attributes

const MaterialProperty< Real > & _cond
 Hydraulic conductivity. More...
 
const RealVectorValue _gravity
 Gravity. More...
 
const MaterialProperty< Real > & _density
 Fluid density. More...
 
const VariableGradient & _grad_p
 Pressure gradient. More...
 
const unsigned int _pvar
 Pressure variable number. More...
 

Detailed Description

Define the Kernel for a PrimaryConvection operator that looks like: cond * grad_pressure * grad_u.

Definition at line 25 of file PrimaryConvection.h.

Constructor & Destructor Documentation

◆ PrimaryConvection()

PrimaryConvection::PrimaryConvection ( const InputParameters &  parameters)

Definition at line 26 of file PrimaryConvection.C.

27  : DerivativeMaterialInterface<Kernel>(parameters),
28  _cond(getMaterialProperty<Real>("conductivity")),
29  _gravity(getParam<RealVectorValue>("gravity")),
30  _density(getDefaultMaterialProperty<Real>("density")),
31  _grad_p(coupledGradient("p")),
32  _pvar(coupled("p"))
33 
34 {
35 }
const VariableGradient & _grad_p
Pressure gradient.
const RealVectorValue _gravity
Gravity.
const MaterialProperty< Real > & _cond
Hydraulic conductivity.
const unsigned int _pvar
Pressure variable number.
const MaterialProperty< Real > & _density
Fluid density.

Member Function Documentation

◆ computeQpJacobian()

Real PrimaryConvection::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 46 of file PrimaryConvection.C.

47 {
48  RealVectorValue darcy_vel = -_cond[_qp] * (_grad_p[_qp] - _density[_qp] * _gravity);
49 
50  return _test[_i][_qp] * (darcy_vel * _grad_phi[_j][_qp]);
51 }
const VariableGradient & _grad_p
Pressure gradient.
const RealVectorValue _gravity
Gravity.
const MaterialProperty< Real > & _cond
Hydraulic conductivity.
const MaterialProperty< Real > & _density
Fluid density.

◆ computeQpOffDiagJacobian()

Real PrimaryConvection::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 54 of file PrimaryConvection.C.

55 {
56  if (jvar == _pvar)
57  {
58  RealVectorValue ddarcy_vel_dp = -_cond[_qp] * _grad_phi[_j][_qp];
59  return _test[_i][_qp] * (ddarcy_vel_dp * _grad_u[_qp]);
60  }
61  else
62  return 0.0;
63 }
const MaterialProperty< Real > & _cond
Hydraulic conductivity.
const unsigned int _pvar
Pressure variable number.

◆ computeQpResidual()

Real PrimaryConvection::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 38 of file PrimaryConvection.C.

39 {
40  RealVectorValue darcy_vel = -_cond[_qp] * (_grad_p[_qp] - _density[_qp] * _gravity);
41 
42  return _test[_i][_qp] * (darcy_vel * _grad_u[_qp]);
43 }
const VariableGradient & _grad_p
Pressure gradient.
const RealVectorValue _gravity
Gravity.
const MaterialProperty< Real > & _cond
Hydraulic conductivity.
const MaterialProperty< Real > & _density
Fluid density.

Member Data Documentation

◆ _cond

const MaterialProperty<Real>& PrimaryConvection::_cond
protected

Hydraulic conductivity.

Definition at line 36 of file PrimaryConvection.h.

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

◆ _density

const MaterialProperty<Real>& PrimaryConvection::_density
protected

Fluid density.

Definition at line 42 of file PrimaryConvection.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _grad_p

const VariableGradient& PrimaryConvection::_grad_p
protected

Pressure gradient.

Definition at line 45 of file PrimaryConvection.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _gravity

const RealVectorValue PrimaryConvection::_gravity
protected

Gravity.

Definition at line 39 of file PrimaryConvection.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _pvar

const unsigned int PrimaryConvection::_pvar
protected

Pressure variable number.

Definition at line 48 of file PrimaryConvection.h.

Referenced by computeQpOffDiagJacobian().


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