www.mooseframework.org
Functions
MaterialTensorCalculatorTools Namespace Reference

Functions

Real component (const SymmTensor &symm_tensor, unsigned int index)
 
Real component (const SymmTensor &symm_tensor, unsigned int index, RealVectorValue &direction)
 
Real vonMisesStress (const SymmTensor &symm_stress)
 
Real effectiveStrain (const SymmTensor &symm_strain)
 
Real hydrostatic (const SymmTensor &symm_tensor)
 
Real volumetricStrain (const SymmTensor &symm_strain)
 
Real firstInvariant (const SymmTensor &symm_tensor)
 
Real secondInvariant (const SymmTensor &symm_tensor)
 
Real thirdInvariant (const SymmTensor &symm_tensor)
 
Real maxPrincipal (const SymmTensor &symm_tensor, RealVectorValue &direction)
 
Real maxPrinciple (const SymmTensor &symm_tensor, RealVectorValue &direction)
 
Real midPrincipal (const SymmTensor &symm_tensor, RealVectorValue &direction)
 
Real midPrinciple (const SymmTensor &symm_tensor, RealVectorValue &direction)
 
Real minPrincipal (const SymmTensor &symm_tensor, RealVectorValue &direction)
 
Real minPrinciple (const SymmTensor &symm_tensor, RealVectorValue &direction)
 
Real calcPrincipalValues (const SymmTensor &symm_tensor, unsigned int index, RealVectorValue &direction)
 
Real axialStress (const SymmTensor &symm_stress, const Point &point1, const Point &point2, RealVectorValue &direction)
 
Real hoopStress (const SymmTensor &symm_stress, const Point &point1, const Point &point2, const Point &curr_point, RealVectorValue &direction)
 
Real radialStress (const SymmTensor &symm_stress, const Point &point1, const Point &point2, const Point &curr_point, RealVectorValue &direction)
 
void normalPositionVector (const Point &point1, const Point &point2, const Point &curr_point, Point &normalPosition)
 
Real directionValueTensor (const SymmTensor &symm_tensor, const RealVectorValue &input_direction)
 
Real triaxialityStress (const SymmTensor &symm_stress)
 

Function Documentation

Real MaterialTensorCalculatorTools::axialStress ( const SymmTensor symm_stress,
const Point &  point1,
const Point &  point2,
RealVectorValue &  direction 
)

Definition at line 166 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

170 {
171  Point axis = point2 - point1;
172  axis /= axis.norm();
173 
174  // Calculate the stress in the direction of the axis specifed by the user
175  Real axial_stress = 0.0;
176  for (unsigned int i = 0; i < 3; ++i)
177  {
178  for (unsigned int j = 0; j < 3; ++j)
179  axial_stress += axis(j) * symm_stress(j, i) * axis(i);
180  }
181  direction = axis;
182  return axial_stress;
183 }
Real MaterialTensorCalculatorTools::calcPrincipalValues ( const SymmTensor symm_tensor,
unsigned int  index,
RealVectorValue &  direction 
)

Definition at line 153 of file MaterialTensorCalculatorTools.C.

Referenced by maxPrincipal(), maxPrinciple(), midPrincipal(), midPrinciple(), minPrincipal(), and minPrinciple().

154 {
155  ColumnMajorMatrix eval(3, 1);
156  ColumnMajorMatrix evec(3, 3);
157  symm_tensor.columnMajorMatrix().eigen(eval, evec);
158  // Eigen computes low to high. We want high first.
159  direction(0) = evec(0, index);
160  direction(1) = evec(1, index);
161  direction(2) = evec(2, index);
162  return eval(index);
163 }
ColumnMajorMatrix columnMajorMatrix() const
Definition: SymmTensor.h:423
Real MaterialTensorCalculatorTools::component ( const SymmTensor symm_tensor,
unsigned int  index 
)
Real MaterialTensorCalculatorTools::component ( const SymmTensor symm_tensor,
unsigned int  index,
RealVectorValue &  direction 
)

Definition at line 20 of file MaterialTensorCalculatorTools.C.

21 {
22  direction.zero();
23  if (index < 3)
24  direction(index) = 1.0;
25 
26  else if (index == 3) // xy
27  {
28  direction(0) = std::sqrt(0.5);
29  direction(1) = direction(0);
30  }
31  else if (index == 4) // yz
32  {
33  direction(1) = std::sqrt(0.5);
34  direction(2) = direction(1);
35  }
36  else if (index == 5) // zx
37  {
38  direction(0) = std::sqrt(0.5);
39  direction(2) = direction(0);
40  }
41  return symm_tensor.component(index);
42 }
Real component(unsigned int i) const
Definition: SymmTensor.h:97
Real MaterialTensorCalculatorTools::directionValueTensor ( const SymmTensor symm_tensor,
const RealVectorValue &  input_direction 
)

Definition at line 255 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

256 {
257  Real tensor_value_in_direction = 0.0;
258  for (unsigned int i = 0; i < 3; ++i)
259  {
260  for (unsigned int j = 0; j < 3; ++j)
261  tensor_value_in_direction += input_direction(j) * symm_tensor(j, i) * input_direction(i);
262  }
263  return tensor_value_in_direction;
264 }
Real MaterialTensorCalculatorTools::effectiveStrain ( const SymmTensor symm_strain)

Definition at line 56 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

57 {
58  return std::sqrt(2.0 / 3.0 * symm_strain.doubleContraction(symm_strain));
59 }
Real doubleContraction(const SymmTensor &rhs) const
Definition: SymmTensor.h:257
Real MaterialTensorCalculatorTools::firstInvariant ( const SymmTensor symm_tensor)

Definition at line 78 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

79 {
80  return symm_tensor.trace();
81 }
Real trace() const
Definition: SymmTensor.h:95
Real MaterialTensorCalculatorTools::hoopStress ( const SymmTensor symm_stress,
const Point &  point1,
const Point &  point2,
const Point &  curr_point,
RealVectorValue &  direction 
)

Definition at line 186 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

191 {
192  // Calculate the cross of the normal to the axis of rotation from the current
193  // location and the axis of rotation
194  Point xp;
195  normalPositionVector(point1, point2, curr_point, xp);
196 
197  Point axis_rotation = point2 - point1;
198  Point yp = axis_rotation / axis_rotation.norm();
199  Point zp = xp.cross(yp);
200 
201  // Calculate the scalar value of the hoop stress
202  Real hoop_stress = 0.0;
203  for (unsigned int i = 0; i < 3; ++i)
204  {
205  for (unsigned int j = 0; j < 3; ++j)
206  hoop_stress += zp(j) * symm_stress(j, i) * zp(i);
207  }
208  direction = zp;
209  return hoop_stress;
210 }
void normalPositionVector(const Point &point1, const Point &point2, const Point &curr_point, Point &normalPosition)
Real MaterialTensorCalculatorTools::hydrostatic ( const SymmTensor symm_tensor)

Definition at line 62 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity(), and triaxialityStress().

63 {
64  return symm_tensor.trace() / 3.0;
65 }
Real trace() const
Definition: SymmTensor.h:95
Real MaterialTensorCalculatorTools::maxPrincipal ( const SymmTensor symm_tensor,
RealVectorValue &  direction 
)

Definition at line 108 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

109 {
110  Real val = calcPrincipalValues(symm_tensor, (LIBMESH_DIM - 1), direction);
111  return val;
112 }
Real calcPrincipalValues(const SymmTensor &symm_tensor, unsigned int index, RealVectorValue &direction)
Real MaterialTensorCalculatorTools::maxPrinciple ( const SymmTensor symm_tensor,
RealVectorValue &  direction 
)

Definition at line 132 of file MaterialTensorCalculatorTools.C.

133 {
134  Real val = calcPrincipalValues(symm_tensor, (LIBMESH_DIM - 1), direction);
135  return val;
136 }
Real calcPrincipalValues(const SymmTensor &symm_tensor, unsigned int index, RealVectorValue &direction)
Real MaterialTensorCalculatorTools::midPrincipal ( const SymmTensor symm_tensor,
RealVectorValue &  direction 
)

Definition at line 115 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

116 {
117  Real val = calcPrincipalValues(symm_tensor, 1, direction);
118  return val;
119 }
Real calcPrincipalValues(const SymmTensor &symm_tensor, unsigned int index, RealVectorValue &direction)
Real MaterialTensorCalculatorTools::midPrinciple ( const SymmTensor symm_tensor,
RealVectorValue &  direction 
)

Definition at line 139 of file MaterialTensorCalculatorTools.C.

140 {
141  Real val = calcPrincipalValues(symm_tensor, 1, direction);
142  return val;
143 }
Real calcPrincipalValues(const SymmTensor &symm_tensor, unsigned int index, RealVectorValue &direction)
Real MaterialTensorCalculatorTools::minPrincipal ( const SymmTensor symm_tensor,
RealVectorValue &  direction 
)

Definition at line 122 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

123 {
124  Real val = calcPrincipalValues(symm_tensor, 0, direction);
125  return val;
126 }
Real calcPrincipalValues(const SymmTensor &symm_tensor, unsigned int index, RealVectorValue &direction)
Real MaterialTensorCalculatorTools::minPrinciple ( const SymmTensor symm_tensor,
RealVectorValue &  direction 
)

Definition at line 146 of file MaterialTensorCalculatorTools.C.

147 {
148  Real val = calcPrincipalValues(symm_tensor, 0, direction);
149  return val;
150 }
Real calcPrincipalValues(const SymmTensor &symm_tensor, unsigned int index, RealVectorValue &direction)
void MaterialTensorCalculatorTools::normalPositionVector ( const Point &  point1,
const Point &  point2,
const Point &  curr_point,
Point &  normalPosition 
)

Definition at line 235 of file MaterialTensorCalculatorTools.C.

Referenced by hoopStress(), and radialStress().

239 {
240  // Find the nearest point on the axis of rotation (defined by point2 - point1)
241  // to the current position, e.g. the normal to the axis of rotation at the
242  // current position
243  Point axis_rotation = point2 - point1;
244  Point positionWRTpoint1 = point1 - curr_point;
245  Real projection = (axis_rotation * positionWRTpoint1) / axis_rotation.norm_sq();
246  Point normal = point1 - projection * axis_rotation;
247 
248  // Calculate the direction normal to the plane formed by the axis of rotation
249  // and the normal to the axis of rotation from the current position.
250  normalPosition = curr_point - normal;
251  normalPosition /= normalPosition.norm();
252 }
Real MaterialTensorCalculatorTools::radialStress ( const SymmTensor symm_stress,
const Point &  point1,
const Point &  point2,
const Point &  curr_point,
RealVectorValue &  direction 
)

Definition at line 213 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

218 {
219  Point radial_norm;
220  normalPositionVector(point1, point2, curr_point, radial_norm);
221 
222  // Compute the scalar stress component in the direciton of the normal vector from the
223  // user-defined axis of rotation.
224  Real radial_stress = 0.0;
225  for (unsigned int i = 0; i < 3; ++i)
226  {
227  for (unsigned int j = 0; j < 3; ++j)
228  radial_stress += radial_norm(j) * symm_stress(j, i) * radial_norm(i);
229  }
230  direction = radial_norm;
231  return radial_stress;
232 }
void normalPositionVector(const Point &point1, const Point &point2, const Point &curr_point, Point &normalPosition)
Real MaterialTensorCalculatorTools::secondInvariant ( const SymmTensor symm_tensor)

Definition at line 84 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

85 {
86  Real value = symm_tensor.xx() * symm_tensor.yy() + symm_tensor.yy() * symm_tensor.zz() +
87  symm_tensor.zz() * symm_tensor.xx() - symm_tensor.xy() * symm_tensor.xy() -
88  symm_tensor.yz() * symm_tensor.yz() - symm_tensor.zx() * symm_tensor.zx();
89 
90  return value;
91 }
Real yy() const
Definition: SymmTensor.h:130
Real xx() const
Definition: SymmTensor.h:129
Real zz() const
Definition: SymmTensor.h:131
Real xy() const
Definition: SymmTensor.h:132
Real yz() const
Definition: SymmTensor.h:133
Real zx() const
Definition: SymmTensor.h:134
Real MaterialTensorCalculatorTools::thirdInvariant ( const SymmTensor symm_tensor)

Definition at line 94 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

95 {
96  Real val = 0.0;
97  val = symm_tensor.xx() * symm_tensor.yy() * symm_tensor.zz() -
98  symm_tensor.xx() * symm_tensor.yz() * symm_tensor.yz() +
99  symm_tensor.xy() * symm_tensor.yz() * symm_tensor.zx() -
100  symm_tensor.xy() * symm_tensor.xy() * symm_tensor.zz() +
101  symm_tensor.zx() * symm_tensor.xy() * symm_tensor.yz() -
102  symm_tensor.zx() * symm_tensor.yy() * symm_tensor.zx();
103 
104  return val;
105 }
Real yy() const
Definition: SymmTensor.h:130
Real xx() const
Definition: SymmTensor.h:129
Real zz() const
Definition: SymmTensor.h:131
Real xy() const
Definition: SymmTensor.h:132
Real yz() const
Definition: SymmTensor.h:133
Real zx() const
Definition: SymmTensor.h:134
Real MaterialTensorCalculatorTools::triaxialityStress ( const SymmTensor symm_stress)

Definition at line 267 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

268 {
269  Real val = hydrostatic(symm_stress) / vonMisesStress(symm_stress);
270  return val;
271 }
Real hydrostatic(const SymmTensor &symm_tensor)
Real vonMisesStress(const SymmTensor &symm_stress)
Real MaterialTensorCalculatorTools::volumetricStrain ( const SymmTensor symm_strain)

Definition at line 68 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity().

69 {
70  Real value = symm_strain.trace();
71  value += symm_strain.xx() * symm_strain.yy() + symm_strain.yy() * symm_strain.zz() +
72  symm_strain.zz() * symm_strain.xx() +
73  symm_strain.xx() * symm_strain.yy() * symm_strain.zz();
74  return value;
75 }
Real yy() const
Definition: SymmTensor.h:130
Real xx() const
Definition: SymmTensor.h:129
Real zz() const
Definition: SymmTensor.h:131
Real trace() const
Definition: SymmTensor.h:95
Real MaterialTensorCalculatorTools::vonMisesStress ( const SymmTensor symm_stress)

Definition at line 45 of file MaterialTensorCalculatorTools.C.

Referenced by MaterialTensorCalculator::getTensorQuantity(), and triaxialityStress().

46 {
47  Real value = std::pow(symm_stress.xx() - symm_stress.yy(), 2) +
48  std::pow(symm_stress.yy() - symm_stress.zz(), 2) +
49  std::pow(symm_stress.zz() - symm_stress.xx(), 2) +
50  6 * (std::pow(symm_stress.xy(), 2) + std::pow(symm_stress.yz(), 2) +
51  std::pow(symm_stress.zx(), 2));
52  return std::sqrt(value / 2.0);
53 }
Real yy() const
Definition: SymmTensor.h:130
Real xx() const
Definition: SymmTensor.h:129
Real zz() const
Definition: SymmTensor.h:131
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real xy() const
Definition: SymmTensor.h:132
Real yz() const
Definition: SymmTensor.h:133
Real zx() const
Definition: SymmTensor.h:134