https://mooseframework.inl.gov
AxisymmetricCenterlineAverageValue.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 
11 #include "libmesh/quadrature.h"
12 
14 
17 {
19  params.addClassDescription("Computes the average value of a variable on a "
20  "sideset located along the centerline of an "
21  "axisymmetric model.");
22 
23  return params;
24 }
25 
27  const InputParameters & parameters)
28  : SideAverageValue(parameters)
29 {
30 }
31 
32 // NOTE: We do not account for the coordinate system transformation here
33 // (using _coord) because we want to average a variable over the centerline
34 // of a cylinder. If we weight by _coord, we get 0 / 0.
35 Real
37 {
38  return _current_side_elem->volume();
39 }
40 
41 Real
43 {
44  Real sum = 0;
45  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
46  sum += _JxW[_qp] * computeQpIntegral();
47  return sum;
48 }
AxisymmetricCenterlineAverageValue(const InputParameters &parameters)
This postprocessor computes a volume integral of the specified variable.
const Elem *const & _current_side_elem
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int _qp
The local quadrature point index when computing an integral over quadrature points.
const MooseArray< Real > & _JxW
registerMooseObject("MooseApp", AxisymmetricCenterlineAverageValue)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
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...
This postprocessor computes a line integral of the specified variable along the centerline of an axis...
virtual Real volume() override
Compute the volume of the current face.