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