https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
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
49Real
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:
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}
registerMooseObject("PeridynamicsApp", RankTwoBasedFailureCriteriaNOSPD)
const Elem *const & _current_elem
Base AuxKernel class for different failure criteria to update the bond status A bond is broken and th...
static InputParameters validParams()
const VariableValue & _critical_val
Critical AuxVariable.
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void paramError(const std::string &param, Args... args) const
void mooseError(Args &&... args) const
Rank two tensor based failure ctriteria to update the bond status for non-ordinary state-based model.
RankTwoBasedFailureCriteriaNOSPD(const InputParameters &parameters)
const MaterialProperty< RankTwoTensor > * _tensor
Material property containing the rank two tensor.
virtual Real computeFailureCriterionValue() override
Function to compute the value of a given failure criterion.
MooseEnum _failure_criterion
MooseEnum used to control which failure criterion to use.
T axialStress(const RankTwoTensorTempl< T > &stress, const Point &point1, const Point &point2, Point &direction)
T effectiveStrain(const RankTwoTensorTempl< T > &strain)
T maxPrincipal(const RankTwoTensorTempl< T > &r2tensor, Point &direction)
T maxShear(const RankTwoTensorTempl< T > &stress)
T vonMisesStress(const RankTwoTensorTempl< T > &stress)