www.mooseframework.org
DarcyFluxComponent.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 #include "DarcyFluxComponent.h"
15 
16 template <>
17 InputParameters
19 {
20  MooseEnum component("x=0 y=1 z=2");
21  InputParameters params = validParams<AuxKernel>();
22  params.addRequiredParam<RealVectorValue>(
23  "fluid_weight",
24  "Fluid weight (gravity*density) as a vector pointing downwards (usually "
25  "measured in kg.m^-2.s^-2 = Pa/m). Eg '0 0 -10000'");
26  params.addRequiredParam<Real>("fluid_viscosity",
27  "Fluid dynamic viscosity (usually measured in Pa.s)");
28  params.addClassDescription("Darcy flux (in m^3.s^-1.m^-2, or m.s^-1) -(k_ij/mu (nabla_j P - "
29  "w_j)), where k_ij is the permeability tensor, mu is the fluid "
30  "viscosity, P is the fluid pressure, and w_j is the fluid weight. If "
31  "velocity_scaling is used then -(k_ij/mu (nabla_j P - "
32  "w_j))/velocity_scaling is returned");
33  params.addParam<MooseEnum>("component", component, "The component of the Darcy flux to return");
34  params.addParam<Real>(
35  "velocity_scaling",
36  1,
37  "Scale the result by (1/velocity_scaling). Usually velocity_scaling = porosity.");
38  params.addRequiredCoupledVar("porepressure", "The variable representing the porepressure");
39  return params;
40 }
41 
42 DarcyFluxComponent::DarcyFluxComponent(const InputParameters & parameters)
43  : AuxKernel(parameters),
44  _grad_pp(coupledGradient("porepressure")),
45  _fluid_weight(getParam<RealVectorValue>("fluid_weight")),
46  _fluid_viscosity(getParam<Real>("fluid_viscosity")),
47  _poro_recip(1.0 / getParam<Real>("velocity_scaling")),
48  _permeability(getMaterialProperty<RealTensorValue>("permeability")),
49  _component(getParam<MooseEnum>("component"))
50 {
51 }
52 
53 Real
55 {
56  return -_poro_recip *
58 }
virtual Real computeValue()
const VariableGradient & _grad_pp
gradient of the pressure
DarcyFluxComponent(const InputParameters &parameters)
const MaterialProperty< RealTensorValue > & _permeability
Material permeability.
Real component(const SymmTensor &symm_tensor, unsigned int index)
unsigned int _component
Desired component.
Real _fluid_viscosity
fluid dynamic viscosity
InputParameters validParams< DarcyFluxComponent >()
RealVectorValue _fluid_weight
fluid weight (gravity*density) as a vector pointing downwards, eg &#39;0 0 -10000&#39;
Real _poro_recip
(1/velocity_scaling)