www.mooseframework.org
DiffusionFluxAux.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 "DiffusionFluxAux.h"
11 
13 
14 template <>
17 {
19  MooseEnum component("x y z");
20  params.addClassDescription("Compute components of flux vector for diffusion problems "
21  "$(\\vv{J} = -D \\nabla C)$.");
22  params.addRequiredParam<MooseEnum>("component", component, "The desired component of flux.");
23  params.addRequiredCoupledVar("diffusion_variable", "The name of the variable");
24  params.addRequiredParam<MaterialPropertyName>(
25  "diffusivity",
26  "The name of the diffusivity material property that will be used in the flux computation.");
27  return params;
28 }
29 
31  : AuxKernel(parameters),
32  _component(getParam<MooseEnum>("component")),
33  _grad_u(coupledGradient("diffusion_variable")),
34  _diffusion_coef(getMaterialProperty<Real>("diffusivity"))
35 {
36 }
37 
38 Real
40 {
42 }
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)
registerMooseObject("MooseApp", DiffusionFluxAux)
InputParameters validParams< AuxKernel >()
Definition: AuxKernel.C:25
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
virtual Real computeValue()
Compute and return the value of the aux variable.
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.
Auxiliary kernel responsible for computing the components of the flux vector in diffusion problems...
unsigned int _qp
Quadrature point index.
Definition: AuxKernel.h:219
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...
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:33
InputParameters validParams< DiffusionFluxAux >()
const VariableGradient & _grad_u
Holds the solution gradient at the current quadrature points.