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...
 
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 28 of file RichardsHalfGaussianSink.h.

Constructor & Destructor Documentation

RichardsHalfGaussianSink::RichardsHalfGaussianSink ( const InputParameters &  parameters)

Definition at line 46 of file RichardsHalfGaussianSink.C.

47  : IntegratedBC(parameters),
48  _maximum(getParam<Real>("max")),
49  _sd(getParam<Real>("sd")),
50  _centre(getParam<Real>("centre")),
51  _m_func(getFunction("multiplying_fcn")),
52  _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
54  _pp(getMaterialProperty<std::vector<Real>>("porepressure")),
55  _dpp_dv(getMaterialProperty<std::vector<std::vector<Real>>>("dporepressure_dv"))
56 {
57 }
Real _maximum
maximum of the Gaussian sink
const MaterialProperty< std::vector< Real > > & _pp
porepressure (or porepressure vector for multiphase problems)
Real _sd
standard deviation of the Gaussian sink
const RichardsVarNames & _richards_name_UO
holds info regarding the names of the Richards variables and methods for extracting values of these v...
Function & _m_func
multiplying function: all fluxes will be multiplied by this
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/dvariable_j
unsigned int _pvar
the index of this variable in the list of Richards variables held by _richards_name_UO.
Real _centre
centre of the Gaussian sink
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number

Member Function Documentation

Real RichardsHalfGaussianSink::computeQpJacobian ( )
protectedvirtual

Definition at line 72 of file RichardsHalfGaussianSink.C.

73 {
74  if (_pp[_qp][_pvar] >= _centre)
75  return 0.0;
76 
77  const Real test_fcn_f = _test[_i][_qp] * _m_func.value(_t, _q_point[_qp]);
78  return -test_fcn_f * _maximum * (_pp[_qp][_pvar] - _centre) / Utility::pow<2>(_sd) *
79  std::exp(-0.5 * Utility::pow<2>((_pp[_qp][_pvar] - _centre) / _sd)) * _phi[_j][_qp] *
80  _dpp_dv[_qp][_pvar][_pvar];
81 }
Real _maximum
maximum of the Gaussian sink
const MaterialProperty< std::vector< Real > > & _pp
porepressure (or porepressure vector for multiphase problems)
Real _sd
standard deviation of the Gaussian sink
Function & _m_func
multiplying function: all fluxes will be multiplied by this
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/dvariable_j
unsigned int _pvar
the index of this variable in the list of Richards variables held by _richards_name_UO.
Real _centre
centre of the Gaussian sink
Real RichardsHalfGaussianSink::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 84 of file RichardsHalfGaussianSink.C.

85 {
87  return 0.0;
88 
89  if (_pp[_qp][_pvar] >= _centre)
90  return 0.0;
91 
92  const Real test_fcn_f = _test[_i][_qp] * _m_func.value(_t, _q_point[_qp]);
93  const unsigned int dvar = _richards_name_UO.richards_var_num(jvar);
94  return -test_fcn_f * _maximum * (_pp[_qp][_pvar] - _centre) / Utility::pow<2>(_sd) *
95  std::exp(-0.5 * Utility::pow<2>((_pp[_qp][_pvar] - _centre) / _sd)) * _phi[_j][_qp] *
96  _dpp_dv[_qp][_pvar][dvar];
97 }
Real _maximum
maximum of the Gaussian sink
const MaterialProperty< std::vector< Real > > & _pp
porepressure (or porepressure vector for multiphase problems)
Real _sd
standard deviation of the Gaussian sink
const RichardsVarNames & _richards_name_UO
holds info regarding the names of the Richards variables and methods for extracting values of these v...
bool not_richards_var(unsigned int moose_var_num) const
returns true if moose_var_num is not a richards var
Function & _m_func
multiplying function: all fluxes will be multiplied by this
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/dvariable_j
unsigned int _pvar
the index of this variable in the list of Richards variables held by _richards_name_UO.
Real _centre
centre of the Gaussian sink
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
Real RichardsHalfGaussianSink::computeQpResidual ( )
protectedvirtual

Definition at line 60 of file RichardsHalfGaussianSink.C.

61 {
62  const Real test_fcn_f = _test[_i][_qp] * _m_func.value(_t, _q_point[_qp]);
63 
64  if (_pp[_qp][_pvar] >= _centre)
65  return test_fcn_f * _maximum;
66 
67  return test_fcn_f * _maximum *
68  std::exp(-0.5 * Utility::pow<2>((_pp[_qp][_pvar] - _centre) / _sd));
69 }
Real _maximum
maximum of the Gaussian sink
const MaterialProperty< std::vector< Real > > & _pp
porepressure (or porepressure vector for multiphase problems)
Real _sd
standard deviation of the Gaussian sink
Function & _m_func
multiplying function: all fluxes will be multiplied by this
unsigned int _pvar
the index of this variable in the list of Richards variables held by _richards_name_UO.
Real _centre
centre of the Gaussian sink

Member Data Documentation

Real RichardsHalfGaussianSink::_centre
protected

centre of the Gaussian sink

Definition at line 47 of file RichardsHalfGaussianSink.h.

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

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

d(porepressure_i)/dvariable_j

Definition at line 71 of file RichardsHalfGaussianSink.h.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

Function& RichardsHalfGaussianSink::_m_func
protected

multiplying function: all fluxes will be multiplied by this

Definition at line 50 of file RichardsHalfGaussianSink.h.

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

Real RichardsHalfGaussianSink::_maximum
protected

maximum of the Gaussian sink

Definition at line 41 of file RichardsHalfGaussianSink.h.

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

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

porepressure (or porepressure vector for multiphase problems)

Definition at line 68 of file RichardsHalfGaussianSink.h.

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

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 65 of file RichardsHalfGaussianSink.h.

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

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 56 of file RichardsHalfGaussianSink.h.

Referenced by computeQpOffDiagJacobian().

Real RichardsHalfGaussianSink::_sd
protected

standard deviation of the Gaussian sink

Definition at line 44 of file RichardsHalfGaussianSink.h.

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


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