https://mooseframework.inl.gov
src
postprocessors
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
10
#include "
AxisymmetricCenterlineAverageValue.h
"
11
#include "libmesh/quadrature.h"
12
13
registerMooseObject
(
"MooseApp"
,
AxisymmetricCenterlineAverageValue
);
14
15
InputParameters
16
AxisymmetricCenterlineAverageValue::validParams
()
17
{
18
InputParameters
params =
SideAverageValue::validParams
();
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
26
AxisymmetricCenterlineAverageValue::AxisymmetricCenterlineAverageValue
(
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
36
AxisymmetricCenterlineAverageValue::volume
()
37
{
38
return
_current_side_elem
->volume();
39
}
40
41
Real
42
AxisymmetricCenterlineAverageValue::computeIntegral
()
43
{
44
Real
sum = 0;
45
for
(
_qp
= 0;
_qp
<
_qrule
->n_points();
_qp
++)
46
sum +=
_JxW
[
_qp
] *
computeQpIntegral
();
47
return
sum;
48
}
AxisymmetricCenterlineAverageValue::AxisymmetricCenterlineAverageValue
AxisymmetricCenterlineAverageValue(const InputParameters ¶meters)
Definition:
AxisymmetricCenterlineAverageValue.C:26
SideAverageValue
This postprocessor computes a volume integral of the specified variable.
Definition:
SideAverageValue.h:20
SideUserObject::_current_side_elem
const Elem *const & _current_side_elem
Definition:
SideUserObject.h:50
SideIntegralVariablePostprocessor::computeQpIntegral
Real computeQpIntegral() override
Definition:
SideIntegralVariablePostprocessor.C:51
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Definition:
InputParameters.h:66
SideIntegralPostprocessor::_qp
unsigned int _qp
The local quadrature point index when computing an integral over quadrature points.
Definition:
SideIntegralPostprocessor.h:51
AxisymmetricCenterlineAverageValue::computeIntegral
virtual Real computeIntegral() override
Definition:
AxisymmetricCenterlineAverageValue.C:42
SideUserObject::_JxW
const MooseArray< Real > & _JxW
Definition:
SideUserObject.h:42
AxisymmetricCenterlineAverageValue.h
registerMooseObject
registerMooseObject("MooseApp", AxisymmetricCenterlineAverageValue)
SideAverageValue::validParams
static InputParameters validParams()
Definition:
SideAverageValue.C:15
AxisymmetricCenterlineAverageValue::validParams
static InputParameters validParams()
Definition:
AxisymmetricCenterlineAverageValue.C:16
Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
SideUserObject::_qrule
const QBase *const & _qrule
Definition:
SideUserObject.h:41
InputParameters::addClassDescription
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...
Definition:
InputParameters.C:82
AxisymmetricCenterlineAverageValue
This postprocessor computes a line integral of the specified variable along the centerline of an axis...
Definition:
AxisymmetricCenterlineAverageValue.h:18
AxisymmetricCenterlineAverageValue::volume
virtual Real volume() override
Compute the volume of the current face.
Definition:
AxisymmetricCenterlineAverageValue.C:36
Generated on Thu Jul 17 2025 01:32:15 for https://mooseframework.inl.gov by
1.8.14