www.mooseframework.org
Public Types | Public Member Functions | Protected Attributes | List of all members
MaterialTensorCalculator Class Reference

#include <MaterialTensorCalculator.h>

Inheritance diagram for MaterialTensorCalculator:
[legend]

Public Types

enum  QUANTITY_ENUM {
  COMPONENT, VONMISES, EFFECTIVESTRAIN, HYDROSTATIC,
  DIRECTION, HOOP, RADIAL, AXIAL,
  MAXPRINCIPAL, MEDPRINCIPAL, MINPRINCIPAL, FIRSTINVARIANT,
  SECONDINVARIANT, THIRDINVARIANT, TRIAXIALITY, VOLUMETRICSTRAIN
}
 

Public Member Functions

 MaterialTensorCalculator (const InputParameters &parameters)
 
 ~MaterialTensorCalculator ()
 
Real getTensorQuantity (const SymmTensor &tensor, const Point &curr_point, RealVectorValue &direction)
 

Protected Attributes

const int _index
 
MooseEnum _quantity_moose_enum
 
QUANTITY_ENUM _quantity
 
const Point _p1
 
const Point _p2
 
const Point _direction
 

Detailed Description

Definition at line 25 of file MaterialTensorCalculator.h.

Member Enumeration Documentation

◆ QUANTITY_ENUM

Enumerator
COMPONENT 
VONMISES 
EFFECTIVESTRAIN 
HYDROSTATIC 
DIRECTION 
HOOP 
RADIAL 
AXIAL 
MAXPRINCIPAL 
MEDPRINCIPAL 
MINPRINCIPAL 
FIRSTINVARIANT 
SECONDINVARIANT 
THIRDINVARIANT 
TRIAXIALITY 
VOLUMETRICSTRAIN 

Definition at line 28 of file MaterialTensorCalculator.h.

29  {
30  COMPONENT,
31  VONMISES,
34  DIRECTION,
35  HOOP,
36  RADIAL,
37  AXIAL,
46  };

Constructor & Destructor Documentation

◆ MaterialTensorCalculator()

MaterialTensorCalculator::MaterialTensorCalculator ( const InputParameters &  parameters)

Definition at line 39 of file MaterialTensorCalculator.C.

40  : _index(parameters.get<int>("index")),
41  _quantity_moose_enum(parameters.get<MooseEnum>("quantity")),
42  _p1(parameters.get<RealVectorValue>("point1")),
43  _p2(parameters.get<RealVectorValue>("point2")),
44  _direction(parameters.get<RealVectorValue>("direction") /
45  parameters.get<RealVectorValue>("direction").norm())
46 {
47  const std::string & name = parameters.get<std::string>("_object_name");
48 
49  if (_quantity_moose_enum.isValid())
50  {
51  if (_index > 0)
52  mooseError("Cannot define an index and a quantity in " + name);
53  else
55  }
56  else
57  {
58  if (_index < 0)
59  mooseError("Neither an index nor a quantity listed for " + name);
60  else
61  _quantity = COMPONENT; // default
62  }
63 
64  if (_index > -1 && _index > 5)
65  {
66  mooseError("The material tensor index must be >= 0 and <= 5 OR < 0 (off).");
67  }
68 }
const std::string name
Definition: Setup.h:22

◆ ~MaterialTensorCalculator()

MaterialTensorCalculator::~MaterialTensorCalculator ( )
inline

Definition at line 50 of file MaterialTensorCalculator.h.

50 {}

Member Function Documentation

◆ getTensorQuantity()

Real MaterialTensorCalculator::getTensorQuantity ( const SymmTensor tensor,
const Point &  curr_point,
RealVectorValue &  direction 
)

Definition at line 71 of file MaterialTensorCalculator.C.

Referenced by MaterialTensorIntegralSM::computeQpIntegral(), MaterialTensorAux::computeValue(), XFEMMaterialTensorMarkerUserObject::doesElementCrack(), and LineMaterialSymmTensorSampler::getScalarFromProperty().

74 {
75  direction.zero();
76  Real value = 0.0;
77 
78  switch (_quantity)
79  {
80  case 0:
81  value = MaterialTensorCalculatorTools::component(tensor, _index, direction);
82  break;
83 
84  case 1:
86  break;
87 
88  case 2:
90  break;
91 
92  case 3:
94  break;
95 
96  case 4:
98  break;
99 
100  case 5:
101  value = MaterialTensorCalculatorTools::hoopStress(tensor, _p1, _p2, curr_point, direction);
102  break;
103 
104  case 6:
105  value = MaterialTensorCalculatorTools::radialStress(tensor, _p1, _p2, curr_point, direction);
106  break;
107 
108  case 7:
109  value = MaterialTensorCalculatorTools::axialStress(tensor, _p1, _p2, direction);
110  break;
111 
112  case 8:
113  value = MaterialTensorCalculatorTools::maxPrincipal(tensor, direction);
114  break;
115 
116  case 9:
117  value = MaterialTensorCalculatorTools::midPrincipal(tensor, direction);
118  break;
119 
120  case 10:
121  value = MaterialTensorCalculatorTools::minPrincipal(tensor, direction);
122  break;
123 
124  case 11:
126  break;
127 
128  case 12:
130  break;
131 
132  case 13:
134  break;
135 
136  case 14:
138  break;
139 
140  case 15:
142  break;
143 
144  default:
145  mooseError("Unknown quantity in MaterialTensorAux: " +
146  _quantity_moose_enum.operator std::string());
147  }
148  return value;
149 }
Real minPrincipal(const SymmTensor &symm_tensor, RealVectorValue &direction)
Real midPrincipal(const SymmTensor &symm_tensor, RealVectorValue &direction)
Real volumetricStrain(const SymmTensor &symm_strain)
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)
Real firstInvariant(const SymmTensor &symm_tensor)
Real thirdInvariant(const SymmTensor &symm_tensor)
Real axialStress(const SymmTensor &symm_stress, const Point &point1, const Point &point2, RealVectorValue &direction)
Real directionValueTensor(const SymmTensor &symm_tensor, const RealVectorValue &input_direction)

Member Data Documentation

◆ _direction

const Point MaterialTensorCalculator::_direction
protected

Definition at line 59 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity().

◆ _index

const int MaterialTensorCalculator::_index
protected

Definition at line 53 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity(), and MaterialTensorCalculator().

◆ _p1

const Point MaterialTensorCalculator::_p1
protected

Definition at line 57 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity().

◆ _p2

const Point MaterialTensorCalculator::_p2
protected

Definition at line 58 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity().

◆ _quantity

QUANTITY_ENUM MaterialTensorCalculator::_quantity
protected

Definition at line 55 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity(), and MaterialTensorCalculator().

◆ _quantity_moose_enum

MooseEnum MaterialTensorCalculator::_quantity_moose_enum
protected

Definition at line 54 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity(), and MaterialTensorCalculator().


The documentation for this class was generated from the following files: