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 27 of file Q2PSaturationDiffusion.h.

Constructor & Destructor Documentation

Q2PSaturationDiffusion::Q2PSaturationDiffusion ( const InputParameters &  parameters)

Definition at line 31 of file Q2PSaturationDiffusion.C.

32  : Kernel(parameters),
33  _density(getUserObject<RichardsDensity>("fluid_density")),
34  _relperm(getUserObject<RichardsRelPerm>("fluid_relperm")),
35  _pp(coupledValue("porepressure_variable")),
36  _pp_var_num(coupled("porepressure_variable")),
37  _viscosity(getParam<Real>("fluid_viscosity")),
38  _permeability(getMaterialProperty<RealTensorValue>("permeability")),
39  _diffusivity(getParam<Real>("diffusivity"))
40 {
41 }
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

Real Q2PSaturationDiffusion::computeQpJacobian ( )
protectedvirtual

Definition at line 51 of file Q2PSaturationDiffusion.C.

52 {
53  Real coef = _diffusivity * _relperm.relperm(_u[_qp]) * _density.density(_pp[_qp]) / _viscosity;
54  Real coefp = _diffusivity * _relperm.drelperm(_u[_qp]) * _density.density(_pp[_qp]) / _viscosity;
55  return coefp * _phi[_j][_qp] * _grad_test[_i][_qp] * (_permeability[_qp] * _grad_u[_qp]) +
56  coef * _grad_test[_i][_qp] * (_permeability[_qp] * _grad_phi[_j][_qp]);
57 }
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
const RichardsDensity & _density
water density
virtual Real relperm(Real seff) const =0
relative permeability as a function of effective saturation This must be over-ridden in your derived ...
const VariableValue & _pp
porepressure at the quadpoints
Real Q2PSaturationDiffusion::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 60 of file Q2PSaturationDiffusion.C.

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

Definition at line 44 of file Q2PSaturationDiffusion.C.

45 {
46  Real coef = _diffusivity * _relperm.relperm(_u[_qp]) * _density.density(_pp[_qp]) / _viscosity;
47  return coef * _grad_test[_i][_qp] * (_permeability[_qp] * _grad_u[_qp]);
48 }
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
const RichardsDensity & _density
water density
virtual Real relperm(Real seff) const =0
relative permeability as a function of effective saturation This must be over-ridden in your derived ...
const VariableValue & _pp
porepressure at the quadpoints

Member Data Documentation

const RichardsDensity& Q2PSaturationDiffusion::_density
protected

water density

Definition at line 40 of file Q2PSaturationDiffusion.h.

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

Real Q2PSaturationDiffusion::_diffusivity
protected
const MaterialProperty<RealTensorValue>& Q2PSaturationDiffusion::_permeability
protected

permeability

Definition at line 55 of file Q2PSaturationDiffusion.h.

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

const VariableValue& Q2PSaturationDiffusion::_pp
protected

porepressure at the quadpoints

Definition at line 46 of file Q2PSaturationDiffusion.h.

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

unsigned int Q2PSaturationDiffusion::_pp_var_num
protected

variable number of the porepressure variable

Definition at line 49 of file Q2PSaturationDiffusion.h.

Referenced by computeQpOffDiagJacobian().

const RichardsRelPerm& Q2PSaturationDiffusion::_relperm
protected

water relative permeability

Definition at line 43 of file Q2PSaturationDiffusion.h.

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

Real Q2PSaturationDiffusion::_viscosity
protected

fluid viscosity

Definition at line 52 of file Q2PSaturationDiffusion.h.

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


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