www.mooseframework.org
RankTwoScalarTools.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "RankTwoScalarTools.h"
11 
12 namespace RankTwoScalarTools
13 {
14 
15 MooseEnum
17 {
18  return MooseEnum("VonMisesStress EffectiveStrain Hydrostatic L2norm MaxPrincipal "
19  "MidPrincipal MinPrincipal VolumetricStrain FirstInvariant SecondInvariant "
20  "ThirdInvariant AxialStress HoopStress RadialStress TriaxialityStress "
21  "Direction MaxShear StressIntensity");
22 }
23 
24 void
25 normalPositionVector(const Point & point1,
26  const Point & point2,
27  const Point & curr_point,
28  Point & normalPosition)
29 {
30  // Find the nearest point on the axis of rotation (defined by point2 - point1)
31  // to the current position, e.g. the normal to the axis of rotation at the
32  // current position
33  Point axis_rotation = point2 - point1;
34  Point positionWRTpoint1 = point1 - curr_point;
35  Real projection = (axis_rotation * positionWRTpoint1) / axis_rotation.norm_sq();
36  Point normal = point1 - projection * axis_rotation;
37 
38  // Calculate the direction normal to the plane formed by the axis of rotation
39  // and the normal to the axis of rotation from the current position.
40  normalPosition = curr_point - normal;
41  normalPosition /= normalPosition.norm();
42 }
43 }
RankTwoScalarTools
Definition: RankTwoScalarTools.h:19
RankTwoScalarTools::normalPositionVector
void normalPositionVector(const Point &point1, const Point &point2, const Point &curr_point, Point &normalPosition)
Definition: RankTwoScalarTools.C:25
RankTwoScalarTools.h
RankTwoScalarTools::scalarOptions
MooseEnum scalarOptions()
Definition: RankTwoScalarTools.C:16