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

Diffusive Kernel that models nonzero capillary pressure in Q2P models The Variable of this Kernel should be the saturation. More...

#include <Q2PSaturationDiffusion.h>

Inheritance diagram for Q2PSaturationDiffusion:
[legend]

Public Member Functions

 Q2PSaturationDiffusion (const InputParameters &parameters)
 

Protected Member Functions

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

Protected Attributes

const RichardsDensity_density
 water density More...
 
const RichardsRelPerm_relperm
 water relative permeability More...
 
const VariableValue & _pp
 porepressure at the quadpoints More...
 
unsigned int _pp_var_num
 variable number of the porepressure variable More...
 
Real _viscosity
 fluid viscosity More...
 
const MaterialProperty< RealTensorValue > & _permeability
 permeability More...
 
Real _diffusivity
 

Detailed Description

Diffusive Kernel that models nonzero capillary pressure in Q2P models The Variable of this Kernel should be the saturation.

Definition at line 29 of file Q2PSaturationDiffusion.h.

Constructor & Destructor Documentation

◆ Q2PSaturationDiffusion()

Q2PSaturationDiffusion::Q2PSaturationDiffusion ( const InputParameters &  parameters)

Definition at line 35 of file Q2PSaturationDiffusion.C.

36  : Kernel(parameters),
37  _density(getUserObject<RichardsDensity>("fluid_density")),
38  _relperm(getUserObject<RichardsRelPerm>("fluid_relperm")),
39  _pp(coupledValue("porepressure_variable")),
40  _pp_var_num(coupled("porepressure_variable")),
41  _viscosity(getParam<Real>("fluid_viscosity")),
42  _permeability(getMaterialProperty<RealTensorValue>("permeability")),
43  _diffusivity(getParam<Real>("diffusivity"))
44 {
45 }
Real _viscosity
fluid viscosity
const RichardsRelPerm & _relperm
water relative permeability
const MaterialProperty< RealTensorValue > & _permeability
permeability
const RichardsDensity & _density
water density
unsigned int _pp_var_num
variable number of the porepressure variable
const VariableValue & _pp
porepressure at the quadpoints

Member Function Documentation

◆ computeQpJacobian()

Real Q2PSaturationDiffusion::computeQpJacobian ( )
protectedvirtual

Definition at line 55 of file Q2PSaturationDiffusion.C.

56 {
57  Real coef = _diffusivity * _relperm.relperm(_u[_qp]) * _density.density(_pp[_qp]) / _viscosity;
58  Real coefp = _diffusivity * _relperm.drelperm(_u[_qp]) * _density.density(_pp[_qp]) / _viscosity;
59  return coefp * _phi[_j][_qp] * _grad_test[_i][_qp] * (_permeability[_qp] * _grad_u[_qp]) +
60  coef * _grad_test[_i][_qp] * (_permeability[_qp] * _grad_phi[_j][_qp]);
61 }
virtual Real drelperm(Real seff) const =0
derivative of relative permeability wrt effective saturation This must be over-ridden in your derived...
Real _viscosity
fluid viscosity
const RichardsRelPerm & _relperm
water relative permeability
virtual Real density(Real p) const =0
fluid density as a function of porepressure This must be over-ridden in derived classes to provide an...
const MaterialProperty< RealTensorValue > & _permeability
permeability
virtual Real relperm(Real seff) const =0
relative permeability as a function of effective saturation This must be over-ridden in your derived ...
const RichardsDensity & _density
water density
const VariableValue & _pp
porepressure at the quadpoints

◆ computeQpOffDiagJacobian()

Real Q2PSaturationDiffusion::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 64 of file Q2PSaturationDiffusion.C.

65 {
66  if (jvar != _pp_var_num)
67  return 0.0;
68  Real coefp = _diffusivity * _relperm.relperm(_u[_qp]) * _density.ddensity(_pp[_qp]) / _viscosity;
69  return coefp * _phi[_j][_qp] * (_grad_test[_i][_qp] * (_permeability[_qp] * _grad_u[_qp]));
70 }
virtual Real ddensity(Real p) const =0
derivative of fluid density wrt porepressure This must be over-ridden in derived classes to provide a...
Real _viscosity
fluid viscosity
const RichardsRelPerm & _relperm
water relative permeability
const MaterialProperty< RealTensorValue > & _permeability
permeability
virtual Real relperm(Real seff) const =0
relative permeability as a function of effective saturation This must be over-ridden in your derived ...
const RichardsDensity & _density
water density
unsigned int _pp_var_num
variable number of the porepressure variable
const VariableValue & _pp
porepressure at the quadpoints

◆ computeQpResidual()

Real Q2PSaturationDiffusion::computeQpResidual ( )
protectedvirtual

Definition at line 48 of file Q2PSaturationDiffusion.C.

49 {
50  Real coef = _diffusivity * _relperm.relperm(_u[_qp]) * _density.density(_pp[_qp]) / _viscosity;
51  return coef * _grad_test[_i][_qp] * (_permeability[_qp] * _grad_u[_qp]);
52 }
Real _viscosity
fluid viscosity
const RichardsRelPerm & _relperm
water relative permeability
virtual Real density(Real p) const =0
fluid density as a function of porepressure This must be over-ridden in derived classes to provide an...
const MaterialProperty< RealTensorValue > & _permeability
permeability
virtual Real relperm(Real seff) const =0
relative permeability as a function of effective saturation This must be over-ridden in your derived ...
const RichardsDensity & _density
water density
const VariableValue & _pp
porepressure at the quadpoints

Member Data Documentation

◆ _density

const RichardsDensity& Q2PSaturationDiffusion::_density
protected

water density

Definition at line 42 of file Q2PSaturationDiffusion.h.

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

◆ _diffusivity

Real Q2PSaturationDiffusion::_diffusivity
protected

◆ _permeability

const MaterialProperty<RealTensorValue>& Q2PSaturationDiffusion::_permeability
protected

permeability

Definition at line 57 of file Q2PSaturationDiffusion.h.

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

◆ _pp

const VariableValue& Q2PSaturationDiffusion::_pp
protected

porepressure at the quadpoints

Definition at line 48 of file Q2PSaturationDiffusion.h.

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

◆ _pp_var_num

unsigned int Q2PSaturationDiffusion::_pp_var_num
protected

variable number of the porepressure variable

Definition at line 51 of file Q2PSaturationDiffusion.h.

Referenced by computeQpOffDiagJacobian().

◆ _relperm

const RichardsRelPerm& Q2PSaturationDiffusion::_relperm
protected

water relative permeability

Definition at line 45 of file Q2PSaturationDiffusion.h.

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

◆ _viscosity

Real Q2PSaturationDiffusion::_viscosity
protected

fluid viscosity

Definition at line 54 of file Q2PSaturationDiffusion.h.

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


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