www.mooseframework.org
DiffusionFluxAux.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 "DiffusionFluxAux.h"
15 
16 template <>
19 {
21  MooseEnum component("x y z");
22  params.addClassDescription("Compute components of flux vector for diffusion problems "
23  "$(\\vv{J} = -D \\nabla C)$.");
24  params.addRequiredParam<MooseEnum>("component", component, "The desired component of flux.");
25  params.addRequiredCoupledVar("diffusion_variable", "The name of the variable");
26  params.addRequiredParam<MaterialPropertyName>(
27  "diffusivity",
28  "The name of the diffusivity material property that will be used in the flux computation.");
29  return params;
30 }
31 
33  : AuxKernel(parameters),
34  _component(getParam<MooseEnum>("component")),
35  _grad_u(coupledGradient("diffusion_variable")),
36  _diffusion_coef(getMaterialProperty<Real>("diffusivity"))
37 {
38 }
39 
40 Real
42 {
44 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const MaterialProperty< Real > & _diffusion_coef
Holds the diffusivity from the material system.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
DiffusionFluxAux(const InputParameters &parameters)
InputParameters validParams< AuxKernel >()
Definition: AuxKernel.C:30
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
unsigned int _qp
Quadrature point index.
Definition: AuxKernel.h:192
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:51
virtual Real computeValue()
int _component
Will hold 0, 1, or 2 corresponding to x, y, or z.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
InputParameters validParams< DiffusionFluxAux >()
const VariableGradient & _grad_u
Holds the solution gradient at the current quadrature points.