Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
LayeredAverageRZ.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 "LayeredAverageRZ.h"
11 
12 registerMooseObject("ThermalHydraulicsApp", LayeredAverageRZ);
13 
16 {
18  params += RZSymmetry::validParams();
19  params.addRequiredParam<Real>("length",
20  "The length of the block in the direction given by 'axis_dir'.");
21  params.addClassDescription(
22  "Computes layered averages of variable for RZ components in a XY coordinate system");
23  return params;
24 }
25 
27  : LayeredAverage(parameters), RZSymmetry(this, parameters)
28 {
29  _direction_min = getParam<Point>("axis_point")(_direction);
30  _direction_max = _direction_min + getParam<Real>("length");
31 }
32 
33 void
35 {
37 
38  Real current_elem_volume = 0.;
39  for (unsigned int qp = 0; qp < _qrule->n_points(); qp++)
40  {
41  const Real circumference = computeCircumference(_q_point[qp]);
42  current_elem_volume += _JxW[qp] * circumference;
43  }
44 
45  unsigned int layer = getLayer(_current_elem->vertex_average());
46  _layer_volumes[layer] += current_elem_volume;
47 }
48 
49 Real
51 {
52  Real sum = 0;
53 
54  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
55  {
56  const Real circumference = computeCircumference(_q_point[_qp]);
57  sum += _JxW[_qp] * circumference * computeQpIntegral();
58  }
59  return sum;
60 }
const MooseArray< Point > & _q_point
virtual Real computeIntegral() override
Interface class for enabling objects to be RZ symmetric about arbitrary axis.
Definition: RZSymmetry.h:19
virtual Real computeQpIntegral() override
LayeredAverageRZ(const InputParameters &parameters)
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _direction
virtual void execute() override
static InputParameters validParams()
unsigned int _qp
virtual unsigned int getLayer(const Point &p) const
static InputParameters validParams()
The same functionality as LayeredAverage but for arbitrary RZ symmetry.
virtual Real computeCircumference(const RealVectorValue &pt)
Definition: RZSymmetry.C:85
virtual void execute() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
const Elem *const & _current_elem
const MooseArray< Real > & _JxW
void addClassDescription(const std::string &doc_string)
registerMooseObject("ThermalHydraulicsApp", LayeredAverageRZ)
std::vector< Real > _layer_volumes
static InputParameters validParams()
Definition: RZSymmetry.C:17