https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
12registerMooseObject("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'.");
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
33void
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
49Real
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}
registerMooseObject("ThermalHydraulicsApp", LayeredAverageRZ)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
std::vector< Real > _layer_volumes
The same functionality as LayeredAverage but for arbitrary RZ symmetry.
virtual Real computeIntegral() override
LayeredAverageRZ(const InputParameters &parameters)
static InputParameters validParams()
virtual void execute() override
static InputParameters validParams()
virtual unsigned int getLayer(const Point &p) const
unsigned int _direction
virtual void execute() override
Interface class for enabling objects to be RZ symmetric about arbitrary axis.
Definition RZSymmetry.h:20
virtual Real computeCircumference(const RealVectorValue &pt)
Definition RZSymmetry.C:85
static InputParameters validParams()
Definition RZSymmetry.C:17