www.mooseframework.org
MaterialTensorCalculatorTools.h
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 #pragma once
11 
12 #include "libmesh/vector_value.h"
13 #include "MooseTypes.h"
14 #include "SymmTensor.h"
15 
16 // class SymmTensor;
17 
19 {
20 /*
21  * Extracts the value of the tensor component at the specified indices
22  */
23 Real component(const SymmTensor & symm_tensor, unsigned int index);
24 
25 /*
26  * Extracts the value of the tensor component at the specified indices and
27  * updates the unit direction vector.
28  */
29 Real component(const SymmTensor & symm_tensor, unsigned int index, RealVectorValue & direction);
30 
31 /*
32  * The von Mises Stress is calculated in non-principal stress space
33  * \sigma_{vm} = \sqrt \frac{1}{2} \left( (\sigma_x - \sigma_y)^2 + (\sigma_y - \sigma_z)^2 +
34  * (\sigma_z - \sigma_z)^2 + 6 * \left( \tau_{xy}^2 + \tau_{yz}^2 + \tau_{zx}^2 \right) \right)
35  * This scalar quanitity is often used to determine the onset of plasticity by
36  * comparing the von Mises stress to the yield stress in J2 plasticity models.
37  */
38 Real vonMisesStress(const SymmTensor & symm_stress);
39 
40 /*
41  * The effective strain is calculated as
42  * \epsilon_{eff} = \sqrt{\frac{2}{3}\epsilon_{ij} \epsilon_{ij}}
43  */
44 Real effectiveStrain(const SymmTensor & symm_strain);
45 
46 /*
47  * The hydrostatic scalar of a tensor is computed as the sum of the diagonal
48  * terms divided by 3.
49  */
50 Real hydrostatic(const SymmTensor & symm_tensor);
51 
52 /*
53  * The volumentric strain is the change in volume over the original volume. In
54  * this method the squared and cubic terms are included so that the calculation
55  * is valid for both small and finite strains.
56  * @param strain Total logarithmic strain
57  * @return volumetric strain (delta V / V)
58  */
59 Real volumetricStrain(const SymmTensor & symm_strain);
60 
61 /*
62 * The first invariant of a tensor is the sum of the diagonal component; defined
63 * in L. Malvern, Introduction to the Mechanics of a Continuous Mediam (1969) pg 89.
64 */
65 Real firstInvariant(const SymmTensor & symm_tensor);
66 
67 /*
68  * The second invariant is calculated using the formula from K. Hjelmstad,
69  * Fundamentals of Structural Mechanics (1997) pg. 24.
70  * Note that the Hjelmstad version of the second invariant is the negative of
71  * the second invariant given in L. Malvern, Introduction to the Mechanics of a
72  * Continuous Medium (1969) pg 89.
73 */
74 Real secondInvariant(const SymmTensor & symm_tensor);
75 
76 /*
77  * The third invariant of a rank 2 tensor is the determinate of the tensor; defined
78  * in L. Malvern, Introduction to the Mechanics of a Continuous Mediam (1969) pg 89.
79  */
80 Real thirdInvariant(const SymmTensor & symm_tensor);
81 
82 /*
83  * The max Principal method returns the largest principal value for a symmetric
84  * tensor, using the calcEigenValues method.
85  */
86 Real maxPrincipal(const SymmTensor & symm_tensor, RealVectorValue & direction);
87 Real maxPrinciple(const SymmTensor & symm_tensor, RealVectorValue & direction);
88 
89 /*
90  * The mid Principal method calculates the second largest principal value for a
91  * tensor. This method is valid only for 3D problems and will return an error
92  * if called in 2D problems.
93  */
94 Real midPrincipal(const SymmTensor & symm_tensor, RealVectorValue & direction);
95 Real midPrinciple(const SymmTensor & symm_tensor, RealVectorValue & direction);
96 
97 /*
98  * The min Principal stress returns the smallest principal value from a symmetric
99  * tensor.
100  */
101 Real minPrincipal(const SymmTensor & symm_tensor, RealVectorValue & direction);
102 Real minPrinciple(const SymmTensor & symm_tensor, RealVectorValue & direction);
103 
104 /*
105  * This method is called by the *Principal methods to calculate the eigenvalues
106  * of a symmetric tensor and return the desired value based on vector position.
107  */
108 Real calcPrincipalValues(const SymmTensor & symm_tensor,
109  unsigned int index,
110  RealVectorValue & direction);
111 
112 /*
113  * The axial stress is the scalar component of the stress tensor in an user-defined
114  * direction; the axis direction is specified by inputing two points.
115  * axial-stress = axis^T_i * \sigma_{ij} * axis_j
116  * @param point1 The starting point of the rotation axis for a cylinderical system
117  * @param point2 The end point of the rotation axis
118  * @param direction The direction vector in which the scalar stress value is calculated.
119  */
120 Real axialStress(const SymmTensor & symm_stress,
121  const Point & point1,
122  const Point & point2,
123  RealVectorValue & direction);
124 
125 /*
126  * The hoop stress is calculated as
127  * hoop-stress = z^T_i * \sigma_{ij} * z_j
128  * where z is defined as the cross of the user-defined (via input points) axis
129  * of rotation and the normal from the current position to the axis of rotation.
130  * @param point1 The starting point of the rotation axis for a cylinderical system
131  * @param point2 The end point of the rotation axis
132  * @param curr_point The reference corresponding to the stress (pass in _q_point[_qp])
133  * @param direction The direction vector in which the scalar stress value is calculated.
134  */
135 Real hoopStress(const SymmTensor & symm_stress,
136  const Point & point1,
137  const Point & point2,
138  const Point & curr_point,
139  RealVectorValue & direction);
140 
141 /* The radial stress is calculated as
142  * radial_stress = normal^T_i * \sigma_{ij} * normal_j
143  * where normal is the position vector of the current point that is normal to
144  * the user-defined axis of rotation; the axis direction is specified with two points.
145  * @param point1 The starting point of the rotation axis for a cylinderical system
146  * @param point2 The end point of the rotation axis
147  * @param curr_point The reference corresponding to the stress (pass in _q_point[_qp])
148  * @param direction The direction vector in which the scalar stress value is calculated.
149 */
150 Real radialStress(const SymmTensor & symm_stress,
151  const Point & point1,
152  const Point & point2,
153  const Point & curr_point,
154  RealVectorValue & direction);
155 
156 /*
157  * This method is a helper method for the hoopStress and radialStress methods to
158  * calculate the unit position vector which is normal to the user supplied axis
159  * of rotation; the rotation axis direction is specified by inputing two points.
160  * @param point1 The starting point of the rotation axis for a cylinderical system
161  * @param point2 The end point of the rotation axis
162  * @param curr_point The reference corresponding to the stress (pass in _q_point[_qp])
163  * @param normalPosition The vector from the current point that is normal to the rotation axis
164  */
165 void normalPositionVector(const Point & point1,
166  const Point & point2,
167  const Point & curr_point,
168  Point & normalPosition);
169 
170 /*
171  * This method calculates the scalar value of the supplied rank-2 tensor in the
172  * direction specified by the user.
173  */
174 Real directionValueTensor(const SymmTensor & symm_tensor, const RealVectorValue & input_direction);
175 
176 /*
177  * Triaxiality is the ratio of the hydrostatic stress to the von Mises stress.
178  */
179 Real triaxialityStress(const SymmTensor & symm_stress);
180 }
181 
MaterialTensorCalculatorTools::hoopStress
Real hoopStress(const SymmTensor &symm_stress, const Point &point1, const Point &point2, const Point &curr_point, RealVectorValue &direction)
Definition: MaterialTensorCalculatorTools.C:200
MaterialTensorCalculatorTools::midPrincipal
Real midPrincipal(const SymmTensor &symm_tensor, RealVectorValue &direction)
Definition: MaterialTensorCalculatorTools.C:129
SymmTensor.h
MaterialTensorCalculatorTools::hydrostatic
Real hydrostatic(const SymmTensor &symm_tensor)
Definition: MaterialTensorCalculatorTools.C:64
MaterialTensorCalculatorTools::effectiveStrain
Real effectiveStrain(const SymmTensor &symm_strain)
Definition: MaterialTensorCalculatorTools.C:58
MaterialTensorCalculatorTools::vonMisesStress
Real vonMisesStress(const SymmTensor &symm_stress)
Definition: MaterialTensorCalculatorTools.C:47
MaterialTensorCalculatorTools::maxPrincipal
Real maxPrincipal(const SymmTensor &symm_tensor, RealVectorValue &direction)
Definition: MaterialTensorCalculatorTools.C:122
MaterialTensorCalculatorTools::thirdInvariant
Real thirdInvariant(const SymmTensor &symm_tensor)
Definition: MaterialTensorCalculatorTools.C:108
MaterialTensorCalculatorTools::firstInvariant
Real firstInvariant(const SymmTensor &symm_tensor)
Definition: MaterialTensorCalculatorTools.C:92
MaterialTensorCalculatorTools::volumetricStrain
Real volumetricStrain(const SymmTensor &symm_strain)
Definition: MaterialTensorCalculatorTools.C:70
MaterialTensorCalculatorTools::directionValueTensor
Real directionValueTensor(const SymmTensor &symm_tensor, const RealVectorValue &input_direction)
Definition: MaterialTensorCalculatorTools.C:269
MaterialTensorCalculatorTools::radialStress
Real radialStress(const SymmTensor &symm_stress, const Point &point1, const Point &point2, const Point &curr_point, RealVectorValue &direction)
Definition: MaterialTensorCalculatorTools.C:227
MaterialTensorCalculatorTools::triaxialityStress
Real triaxialityStress(const SymmTensor &symm_stress)
Definition: MaterialTensorCalculatorTools.C:281
MaterialTensorCalculatorTools::calcPrincipalValues
Real calcPrincipalValues(const SymmTensor &symm_tensor, unsigned int index, RealVectorValue &direction)
Definition: MaterialTensorCalculatorTools.C:167
MaterialTensorCalculatorTools::midPrinciple
Real midPrinciple(const SymmTensor &symm_tensor, RealVectorValue &direction)
Definition: MaterialTensorCalculatorTools.C:153
MaterialTensorCalculatorTools::secondInvariant
Real secondInvariant(const SymmTensor &symm_tensor)
Definition: MaterialTensorCalculatorTools.C:98
MaterialTensorCalculatorTools::component
Real component(const SymmTensor &symm_tensor, unsigned int index)
Definition: MaterialTensorCalculatorTools.C:16
MaterialTensorCalculatorTools::maxPrinciple
Real maxPrinciple(const SymmTensor &symm_tensor, RealVectorValue &direction)
Definition: MaterialTensorCalculatorTools.C:146
SymmTensor
Definition: SymmTensor.h:21
MaterialTensorCalculatorTools
Definition: MaterialTensorCalculatorTools.h:18
MaterialTensorCalculatorTools::normalPositionVector
void normalPositionVector(const Point &point1, const Point &point2, const Point &curr_point, Point &normalPosition)
Definition: MaterialTensorCalculatorTools.C:249
MaterialTensorCalculatorTools::minPrinciple
Real minPrinciple(const SymmTensor &symm_tensor, RealVectorValue &direction)
Definition: MaterialTensorCalculatorTools.C:160
MaterialTensorCalculatorTools::minPrincipal
Real minPrincipal(const SymmTensor &symm_tensor, RealVectorValue &direction)
Definition: MaterialTensorCalculatorTools.C:136
MaterialTensorCalculatorTools::axialStress
Real axialStress(const SymmTensor &symm_stress, const Point &point1, const Point &point2, RealVectorValue &direction)
Definition: MaterialTensorCalculatorTools.C:180