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

Applies a fluid sink to the boundary. More...

#include <RichardsHalfGaussianSink.h>

Inheritance diagram for RichardsHalfGaussianSink:
[legend]

Public Member Functions

 RichardsHalfGaussianSink (const InputParameters &parameters)
 

Protected Member Functions

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

Protected Attributes

Real _maximum
 maximum of the Gaussian sink More...
 
Real _sd
 standard deviation of the Gaussian sink More...
 
Real _centre
 centre of the Gaussian sink More...
 
const Function & _m_func
 multiplying function: all fluxes will be multiplied by this More...
 
const RichardsVarNames_richards_name_UO
 holds info regarding the names of the Richards variables and methods for extracting values of these variables More...
 
unsigned int _pvar
 the index of this variable in the list of Richards variables held by _richards_name_UO. More...
 
const MaterialProperty< std::vector< Real > > & _pp
 porepressure (or porepressure vector for multiphase problems) More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
 d(porepressure_i)/dvariable_j More...
 

Detailed Description

Applies a fluid sink to the boundary.

The sink has strength _maximum*exp(-(0.5*(p - c)/_sd)^2)*_m_func for p<c _maximum*_m_func for p>=c This is typically used for modelling evapotranspiration from the top of a groundwater model

Definition at line 29 of file RichardsHalfGaussianSink.h.

Constructor & Destructor Documentation

◆ RichardsHalfGaussianSink()

RichardsHalfGaussianSink::RichardsHalfGaussianSink ( const InputParameters &  parameters)

Definition at line 50 of file RichardsHalfGaussianSink.C.

51  : IntegratedBC(parameters),
52  _maximum(getParam<Real>("max")),
53  _sd(getParam<Real>("sd")),
54  _centre(getParam<Real>("centre")),
55  _m_func(getFunction("multiplying_fcn")),
56  _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
58  _pp(getMaterialProperty<std::vector<Real>>("porepressure")),
59  _dpp_dv(getMaterialProperty<std::vector<std::vector<Real>>>("dporepressure_dv"))
60 {
61 }

Member Function Documentation

◆ computeQpJacobian()

Real RichardsHalfGaussianSink::computeQpJacobian ( )
protectedvirtual

Definition at line 76 of file RichardsHalfGaussianSink.C.

77 {
78  if (_pp[_qp][_pvar] >= _centre)
79  return 0.0;
80 
81  const Real test_fcn_f = _test[_i][_qp] * _m_func.value(_t, _q_point[_qp]);
82  return -test_fcn_f * _maximum * (_pp[_qp][_pvar] - _centre) / Utility::pow<2>(_sd) *
83  std::exp(-0.5 * Utility::pow<2>((_pp[_qp][_pvar] - _centre) / _sd)) * _phi[_j][_qp] *
84  _dpp_dv[_qp][_pvar][_pvar];
85 }

◆ computeQpOffDiagJacobian()

Real RichardsHalfGaussianSink::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 88 of file RichardsHalfGaussianSink.C.

89 {
91  return 0.0;
92 
93  if (_pp[_qp][_pvar] >= _centre)
94  return 0.0;
95 
96  const Real test_fcn_f = _test[_i][_qp] * _m_func.value(_t, _q_point[_qp]);
97  const unsigned int dvar = _richards_name_UO.richards_var_num(jvar);
98  return -test_fcn_f * _maximum * (_pp[_qp][_pvar] - _centre) / Utility::pow<2>(_sd) *
99  std::exp(-0.5 * Utility::pow<2>((_pp[_qp][_pvar] - _centre) / _sd)) * _phi[_j][_qp] *
100  _dpp_dv[_qp][_pvar][dvar];
101 }

◆ computeQpResidual()

Real RichardsHalfGaussianSink::computeQpResidual ( )
protectedvirtual

Definition at line 64 of file RichardsHalfGaussianSink.C.

65 {
66  const Real test_fcn_f = _test[_i][_qp] * _m_func.value(_t, _q_point[_qp]);
67 
68  if (_pp[_qp][_pvar] >= _centre)
69  return test_fcn_f * _maximum;
70 
71  return test_fcn_f * _maximum *
72  std::exp(-0.5 * Utility::pow<2>((_pp[_qp][_pvar] - _centre) / _sd));
73 }

Member Data Documentation

◆ _centre

Real RichardsHalfGaussianSink::_centre
protected

centre of the Gaussian sink

Definition at line 48 of file RichardsHalfGaussianSink.h.

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

◆ _dpp_dv

const MaterialProperty<std::vector<std::vector<Real> > >& RichardsHalfGaussianSink::_dpp_dv
protected

d(porepressure_i)/dvariable_j

Definition at line 72 of file RichardsHalfGaussianSink.h.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

◆ _m_func

const Function& RichardsHalfGaussianSink::_m_func
protected

multiplying function: all fluxes will be multiplied by this

Definition at line 51 of file RichardsHalfGaussianSink.h.

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

◆ _maximum

Real RichardsHalfGaussianSink::_maximum
protected

maximum of the Gaussian sink

Definition at line 42 of file RichardsHalfGaussianSink.h.

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

◆ _pp

const MaterialProperty<std::vector<Real> >& RichardsHalfGaussianSink::_pp
protected

porepressure (or porepressure vector for multiphase problems)

Definition at line 69 of file RichardsHalfGaussianSink.h.

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

◆ _pvar

unsigned int RichardsHalfGaussianSink::_pvar
protected

the index of this variable in the list of Richards variables held by _richards_name_UO.

Eg if richards_vars = 'pwater pgas poil' in the _richards_name_UO and this kernel has variable = pgas, then _pvar = 1 This is used to index correctly into _viscosity, _seff, etc

Definition at line 66 of file RichardsHalfGaussianSink.h.

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

◆ _richards_name_UO

const RichardsVarNames& RichardsHalfGaussianSink::_richards_name_UO
protected

holds info regarding the names of the Richards variables and methods for extracting values of these variables

Definition at line 57 of file RichardsHalfGaussianSink.h.

Referenced by computeQpOffDiagJacobian().

◆ _sd

Real RichardsHalfGaussianSink::_sd
protected

standard deviation of the Gaussian sink

Definition at line 45 of file RichardsHalfGaussianSink.h.

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


The documentation for this class was generated from the following files:
RichardsHalfGaussianSink::_pp
const MaterialProperty< std::vector< Real > > & _pp
porepressure (or porepressure vector for multiphase problems)
Definition: RichardsHalfGaussianSink.h:69
RichardsVarNames::richards_var_num
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
Definition: RichardsVarNames.C:99
RichardsHalfGaussianSink::_dpp_dv
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/dvariable_j
Definition: RichardsHalfGaussianSink.h:72
RichardsHalfGaussianSink::_maximum
Real _maximum
maximum of the Gaussian sink
Definition: RichardsHalfGaussianSink.h:42
RichardsHalfGaussianSink::_pvar
unsigned int _pvar
the index of this variable in the list of Richards variables held by _richards_name_UO.
Definition: RichardsHalfGaussianSink.h:66
RichardsHalfGaussianSink::_m_func
const Function & _m_func
multiplying function: all fluxes will be multiplied by this
Definition: RichardsHalfGaussianSink.h:51
RichardsHalfGaussianSink::_centre
Real _centre
centre of the Gaussian sink
Definition: RichardsHalfGaussianSink.h:48
RichardsHalfGaussianSink::_sd
Real _sd
standard deviation of the Gaussian sink
Definition: RichardsHalfGaussianSink.h:45
RichardsVarNames::not_richards_var
bool not_richards_var(unsigned int moose_var_num) const
returns true if moose_var_num is not a richards var
Definition: RichardsVarNames.C:109
RichardsHalfGaussianSink::_richards_name_UO
const RichardsVarNames & _richards_name_UO
holds info regarding the names of the Richards variables and methods for extracting values of these v...
Definition: RichardsHalfGaussianSink.h:57