https://mooseframework.inl.gov
DarcyFluxComponent.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 "DarcyFluxComponent.h"
11 
13 
16 {
17  MooseEnum component("x=0 y=1 z=2");
20  "fluid_weight",
21  "Fluid weight (gravity*density) as a vector pointing downwards (usually "
22  "measured in kg.m^-2.s^-2 = Pa/m). Eg '0 0 -10000'");
23  params.addRequiredParam<Real>("fluid_viscosity",
24  "Fluid dynamic viscosity (usually measured in Pa.s)");
25  params.addClassDescription("Darcy flux (in m^3.s^-1.m^-2, or m.s^-1) -(k_ij/mu (nabla_j P - "
26  "w_j)), where k_ij is the permeability tensor, mu is the fluid "
27  "viscosity, P is the fluid pressure, and w_j is the fluid weight. If "
28  "velocity_scaling is used then -(k_ij/mu (nabla_j P - "
29  "w_j))/velocity_scaling is returned");
30  params.addParam<MooseEnum>("component", component, "The component of the Darcy flux to return");
31  params.addParam<Real>(
32  "velocity_scaling",
33  1,
34  "Scale the result by (1/velocity_scaling). Usually velocity_scaling = porosity.");
35  params.addRequiredCoupledVar("porepressure", "The variable representing the porepressure");
36  return params;
37 }
38 
40  : AuxKernel(parameters),
41  _grad_pp(coupledGradient("porepressure")),
42  _fluid_weight(getParam<RealVectorValue>("fluid_weight")),
43  _fluid_viscosity(getParam<Real>("fluid_viscosity")),
44  _poro_recip(1.0 / getParam<Real>("velocity_scaling")),
45  _permeability(getMaterialProperty<RealTensorValue>("permeability")),
46  _component(getParam<MooseEnum>("component"))
47 {
48 }
49 
50 Real
52 {
53  return -_poro_recip *
55 }
virtual Real computeValue()
const VariableGradient & _grad_pp
gradient of the pressure
DarcyFluxComponent(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const MaterialProperty< RealTensorValue > & _permeability
Material permeability.
registerMooseObject("RichardsApp", DarcyFluxComponent)
static const std::string component
Definition: NS.h:153
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _component
Desired component.
TensorValue< Real > RealTensorValue
Real _fluid_viscosity
fluid dynamic viscosity
static InputParameters validParams()
Computes a component of the Darcy flux: -k_ij/mu (nabla_j P - w_j) where k_ij is the permeability ten...
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
RealVectorValue _fluid_weight
fluid weight (gravity*density) as a vector pointing downwards, eg &#39;0 0 -10000&#39;
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Real _poro_recip
(1/velocity_scaling)