https://mooseframework.inl.gov
RankTwoBasedFailureCriteriaNOSPD.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
11 #include "RankTwoScalarTools.h"
12 
14 
17 {
19  params.addClassDescription(
20  "Class for rank two tensor based failure criteria in non-ordinary state-based model");
21 
22  params.addRequiredParam<MaterialPropertyName>("rank_two_tensor",
23  "The rank two material tensor name");
24  MooseEnum FailureCriterionTypes(
25  "Axial MaxPrincipal TrescaStrain TrescaStress VonMisesStrain VonMisesStress");
26  params.addRequiredParam<MooseEnum>("failure_criterion",
27  FailureCriterionTypes,
28  "Which stress based failure criterion to be used");
29 
30  return params;
31 }
32 
34  const InputParameters & parameters)
35  : BondStatusBasePD(parameters),
36  _failure_criterion(getParam<MooseEnum>("failure_criterion")),
37  _tensor(nullptr)
38 {
39  if (hasMaterialProperty<RankTwoTensor>("rank_two_tensor"))
40  _tensor = &getMaterialProperty<RankTwoTensor>("rank_two_tensor");
41  else
42  mooseError("Error in RankTwoBasedFailureCriteriaNOSPD! Required rank two tensor is not "
43  "available for current peridynamics model!");
44 
45  if (isNodal())
46  paramError("variable", "This AuxKernel only supports Elemental fields");
47 }
48 
49 Real
51 {
52  Real val = 0.0;
53  RankTwoTensor avg_tensor = 0.5 * ((*_tensor)[0] + (*_tensor)[1]);
54  Point dirc;
55 
56  switch (_failure_criterion)
57  {
58  case 0:
60  avg_tensor, *_current_elem->node_ptr(0), *_current_elem->node_ptr(1), dirc);
61  break;
62  case 1:
63  val = RankTwoScalarTools::maxPrincipal(avg_tensor, dirc);
64  break;
65  case 2:
66  val = 4.0 / 3.0 * RankTwoScalarTools::maxShear(avg_tensor);
67  break;
68  case 3:
69  val = 2.0 * RankTwoScalarTools::maxShear(avg_tensor);
70  break;
71  case 4:
72  val = RankTwoScalarTools::effectiveStrain(avg_tensor);
73  break;
74  case 5:
75  val = RankTwoScalarTools::vonMisesStress(avg_tensor);
76  break;
77  default:
78  mooseError("Unsupported rank two tensor-based failure criterion. Choose from: Axial "
79  "MaxPrincipal TrescaStrain TrescaStress VonMisesStrain VonMisesStress");
80  }
81 
82  return val - _critical_val[0];
83 }
T axialStress(const RankTwoTensorTempl< T > &stress, const Point &point1, const Point &point2, Point &direction)
virtual Real computeFailureCriterionValue() override
Function to compute the value of a given failure criterion.
T maxPrincipal(const RankTwoTensorTempl< T > &r2tensor, Point &direction)
registerMooseObject("PeridynamicsApp", RankTwoBasedFailureCriteriaNOSPD)
T effectiveStrain(const RankTwoTensorTempl< T > &strain)
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
T vonMisesStress(const RankTwoTensorTempl< T > &stress)
MooseEnum _failure_criterion
MooseEnum used to control which failure criterion to use.
RankTwoBasedFailureCriteriaNOSPD(const InputParameters &parameters)
void paramError(const std::string &param, Args... args) const
const VariableValue & _critical_val
Critical AuxVariable.
T maxShear(const RankTwoTensorTempl< T > &stress)
Base AuxKernel class for different failure criteria to update the bond status A bond is broken and th...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
const Elem *const & _current_elem
void addClassDescription(const std::string &doc_string)
const MaterialProperty< RankTwoTensor > * _tensor
Material property containing the rank two tensor.
Rank two tensor based failure ctriteria to update the bond status for non-ordinary state-based model...