www.mooseframework.org
DarcyFluxPressure.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "DarcyFluxPressure.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<Kernel>();
14  RealVectorValue g(0, 0, 0);
15  params.addParam<RealVectorValue>("gravity", g, "Gravity vector (default is (0, 0, 0))");
16  params.addClassDescription("");
17  return params;
18 }
19 
20 DarcyFluxPressure::DarcyFluxPressure(const InputParameters & parameters)
21  : DerivativeMaterialInterface<Kernel>(parameters),
22  _cond(getMaterialProperty<Real>("conductivity")),
23  _gravity(getParam<RealVectorValue>("gravity")),
24  _density(getDefaultMaterialProperty<Real>("density"))
25 {
26 }
27 
28 Real
30 {
31  return _grad_test[_i][_qp] * _cond[_qp] * (_grad_u[_qp] - _density[_qp] * _gravity);
32 }
33 
34 Real
36 {
37  return _grad_test[_i][_qp] * _cond[_qp] * _grad_phi[_j][_qp];
38 }
InputParameters validParams< DarcyFluxPressure >()
const RealVectorValue _gravity
Gravity.
const MaterialProperty< Real > & _density
Fluid density.
DarcyFluxPressure(const InputParameters &parameters)
virtual Real computeQpJacobian() override
virtual Real computeQpResidual() override
const MaterialProperty< Real > & _cond
Hydraulic conductivity.