www.mooseframework.org
LayeredSideFluxAverage.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 
15 #include "LayeredSideFluxAverage.h"
16 
17 template <>
20 {
22  params.addRequiredParam<std::string>(
23  "diffusivity",
24  "The name of the diffusivity material property that will be used in the flux computation.");
25  return params;
26 }
27 
29  : LayeredSideAverage(parameters),
30  _diffusivity(parameters.get<std::string>("diffusivity")),
31  _diffusion_coef(getMaterialProperty<Real>(_diffusivity))
32 {
33 }
34 
35 Real
37 {
38  return -_diffusion_coef[_qp] * _grad_u[_qp] * _normals[_qp];
39 }
const MaterialProperty< Real > & _diffusion_coef
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE 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...
This UserObject computes side averages of a variable storing partial sums for the specified number of...
LayeredSideFluxAverage(const InputParameters &parameters)
const MooseArray< Point > & _normals
const VariableGradient & _grad_u
Holds the solution gradient at the current quadrature points.
virtual Real computeQpIntegral() override
InputParameters validParams< LayeredSideFluxAverage >()
InputParameters validParams< LayeredSideIntegral >()