www.mooseframework.org
DarcyFlux.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 
8 #include "DarcyFlux.h"
9 #include "Material.h"
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<Kernel>();
16  params.addRequiredParam<RealVectorValue>(
17  "fluid_weight",
18  "Fluid weight (gravity*density) as a vector pointing downwards (usually "
19  "measured in kg.m^-2.s^-2 = Pa/m). Eg '0 0 -10000'");
20  params.addRequiredParam<Real>("fluid_viscosity",
21  "Fluid dynamic viscosity (usually measured in Pa.s)");
22  params.addClassDescription("Darcy flux. nabla_i (k_ij/mu (nabla_j P - w_j)), where k_ij is the "
23  "permeability tensor, mu is the fluid viscosity, P is the fluid "
24  "pressure, and w_j is the fluid weight");
25  return params;
26 }
27 
28 DarcyFlux::DarcyFlux(const InputParameters & parameters)
29  : Kernel(parameters),
30  _fluid_weight(getParam<RealVectorValue>("fluid_weight")),
31  _fluid_viscosity(getParam<Real>("fluid_viscosity")),
32  _permeability(getMaterialProperty<RealTensorValue>("permeability"))
33 {
34 }
35 
36 Real
38 {
39  return _grad_test[_i][_qp] * (_permeability[_qp] * (_grad_u[_qp] - _fluid_weight)) /
41 }
42 
43 Real
45 {
46  return _grad_test[_i][_qp] * (_permeability[_qp] * _grad_phi[_j][_qp]) / _fluid_viscosity;
47 }
InputParameters validParams< DarcyFlux >()
Definition: DarcyFlux.C:13
DarcyFlux(const InputParameters &parameters)
Definition: DarcyFlux.C:28
const MaterialProperty< RealTensorValue > & _permeability
Material permeability.
Definition: DarcyFlux.h:40
virtual Real computeQpJacobian()
Definition: DarcyFlux.C:44
Real _fluid_viscosity
fluid dynamic viscosity
Definition: DarcyFlux.h:37
RealVectorValue _fluid_weight
fluid weight (gravity*density) as a vector pointing downwards, eg &#39;0 0 -10000&#39;
Definition: DarcyFlux.h:34
virtual Real computeQpResidual()
Definition: DarcyFlux.C:37