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 23 of file MaterialTensorCalculator.h.

Member Enumeration Documentation

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

Definition at line 26 of file MaterialTensorCalculator.h.

27  {
28  COMPONENT,
29  VONMISES,
32  DIRECTION,
33  HOOP,
34  RADIAL,
35  AXIAL,
44  };

Constructor & Destructor Documentation

MaterialTensorCalculator::MaterialTensorCalculator ( const InputParameters &  parameters)

Definition at line 37 of file MaterialTensorCalculator.C.

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

Definition at line 48 of file MaterialTensorCalculator.h.

48 {}

Member Function Documentation

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

Definition at line 69 of file MaterialTensorCalculator.C.

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

72 {
73  direction.zero();
74  Real value = 0.0;
75 
76  switch (_quantity)
77  {
78  case 0:
79  value = MaterialTensorCalculatorTools::component(tensor, _index, direction);
80  break;
81 
82  case 1:
84  break;
85 
86  case 2:
88  break;
89 
90  case 3:
92  break;
93 
94  case 4:
96  break;
97 
98  case 5:
99  value = MaterialTensorCalculatorTools::hoopStress(tensor, _p1, _p2, curr_point, direction);
100  break;
101 
102  case 6:
103  value = MaterialTensorCalculatorTools::radialStress(tensor, _p1, _p2, curr_point, direction);
104  break;
105 
106  case 7:
107  value = MaterialTensorCalculatorTools::axialStress(tensor, _p1, _p2, direction);
108  break;
109 
110  case 8:
111  value = MaterialTensorCalculatorTools::maxPrincipal(tensor, direction);
112  break;
113 
114  case 9:
115  value = MaterialTensorCalculatorTools::midPrincipal(tensor, direction);
116  break;
117 
118  case 10:
119  value = MaterialTensorCalculatorTools::minPrincipal(tensor, direction);
120  break;
121 
122  case 11:
124  break;
125 
126  case 12:
128  break;
129 
130  case 13:
132  break;
133 
134  case 14:
136  break;
137 
138  case 15:
140  break;
141 
142  default:
143  mooseError("Unknown quantity in MaterialTensorAux: " +
144  _quantity_moose_enum.operator std::string());
145  }
146  return value;
147 }
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

const Point MaterialTensorCalculator::_direction
protected

Definition at line 57 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity().

const int MaterialTensorCalculator::_index
protected

Definition at line 51 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity(), and MaterialTensorCalculator().

const Point MaterialTensorCalculator::_p1
protected

Definition at line 55 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity().

const Point MaterialTensorCalculator::_p2
protected

Definition at line 56 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity().

QUANTITY_ENUM MaterialTensorCalculator::_quantity
protected

Definition at line 53 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity(), and MaterialTensorCalculator().

MooseEnum MaterialTensorCalculator::_quantity_moose_enum
protected

Definition at line 52 of file MaterialTensorCalculator.h.

Referenced by getTensorQuantity(), and MaterialTensorCalculator().


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