https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PolarMomentOfInertia.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
13
16{
18 params.addRequiredParam<Point>("origin", "Axis origin");
19 params.addRequiredParam<RealVectorValue>("direction", "Axis direction");
21 "Compute the polar moment of inertia of a sideset w.r.t. a point and a direction");
22 return params;
23}
24
26 : SideIntegralPostprocessor(parameters),
27 _origin(getParam<Point>("origin")),
28 _direction(getParam<RealVectorValue>("direction"))
29{
30 // normalize direction
31 _direction /= _direction.norm();
32}
33
34Real
36{
37 auto dr = _q_point[_qp] - _origin;
38 const auto projection = _direction * (_direction * dr);
39 dr -= projection;
40
41 return dr.norm_sq();
42}
registerMooseObject("SolidMechanicsApp", PolarMomentOfInertia)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Compute the polar moment of inertia of a sideset w.r.t.
static InputParameters validParams()
RealVectorValue _direction
direction of the axis through the origin
Real computeQpIntegral() override
const Point _origin
origin point or center to compute the moment with respect to
PolarMomentOfInertia(const InputParameters &parameters)
static InputParameters validParams()
const MooseArray< Point > & _q_point