www.mooseframework.org
DarcyFluxPressure.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "DarcyFluxPressure.h"
11 
12 registerMooseObject("ChemicalReactionsApp", DarcyFluxPressure);
13 
16 {
18  RealVectorValue g(0, 0, 0);
19  params.addParam<RealVectorValue>("gravity", g, "Gravity vector (default is (0, 0, 0))");
20  params.addClassDescription(
21  "Darcy flux: - cond * (Grad P - rho * g) where cond is the hydraulic conductivity, P is "
22  "fluid pressure, rho is fluid density and g is gravity");
23  return params;
24 }
25 
27  : DerivativeMaterialInterface<Kernel>(parameters),
28  _cond(getMaterialProperty<Real>("conductivity")),
29  _gravity(getParam<RealVectorValue>("gravity")),
30  _density(getDefaultMaterialProperty<Real>("density"))
31 {
32 }
33 
34 Real
36 {
37  return _grad_test[_i][_qp] * _cond[_qp] * (_grad_u[_qp] - _density[_qp] * _gravity);
38 }
39 
40 Real
42 {
43  return _grad_test[_i][_qp] * _cond[_qp] * _grad_phi[_j][_qp];
44 }
Darcy flux: - cond * (Grad P - rho * g) where cond is the hydraulic conductivity, P is fluid pressure...
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
registerMooseObject("ChemicalReactionsApp", DarcyFluxPressure)
const RealVectorValue _gravity
Gravity.
const MaterialProperty< Real > & _density
Fluid density.
DarcyFluxPressure(const InputParameters &parameters)
virtual Real computeQpJacobian() override
static InputParameters validParams()
virtual Real computeQpResidual() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const MaterialProperty< Real > & _cond
Hydraulic conductivity.