https://mooseframework.inl.gov
SolidMechanicsPlasticWeakPlaneTensileN.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 "RotationMatrix.h" // for rotVecToZ
12 #include "RankFourTensor.h"
13 
15 registerMooseObjectRenamed("SolidMechanicsApp",
16  TensorMechanicsPlasticWeakPlaneTensileN,
17  "01/01/2025 00:00",
19 
22 {
24  params.addRequiredParam<RealVectorValue>("normal_vector", "The normal vector to the weak plane");
25  params.addClassDescription("Associative weak-plane tensile plasticity with hardening/softening, "
26  "with specified, fixed normal vector. (WeakPlaneTensile combined "
27  "with specifying N in the Material might be preferable to you.)");
28 
29  return params;
30 }
31 
33  const InputParameters & parameters)
35  _input_n(getParam<RealVectorValue>("normal_vector")),
36  _df_dsig(RankTwoTensor())
37 {
38  // cannot check the following for all values of strength, but this is a start
39  if (_strength.value(0) < 0)
40  mooseError("Weak plane tensile strength must not be negative");
41  if (_input_n.norm() == 0)
42  mooseError("Weak-plane normal vector must not have zero length");
43  else
44  _input_n /= _input_n.norm();
46 
47  for (unsigned i = 0; i < 3; ++i)
48  for (unsigned j = 0; j < 3; ++j)
49  _df_dsig(i, j) = _rot(2, i) * _rot(2, j);
50 }
51 
52 Real
54  Real intnl) const
55 {
56  Real s22 = 0;
57  for (unsigned i = 0; i < 3; ++i)
58  for (unsigned j = 0; j < 3; ++j)
59  s22 += _rot(2, i) * _rot(2, j) * stress(i, j);
60  return s22 - tensile_strength(intnl);
61 }
62 
65  Real /*intnl*/) const
66 {
67  return _df_dsig;
68 }
69 
70 Real
72  Real intnl) const
73 {
74  return -dtensile_strength(intnl);
75 }
76 
79  Real /*intnl*/) const
80 {
81  return _df_dsig;
82 }
83 
86  Real /*intnl*/) const
87 {
88  return RankFourTensor();
89 }
90 
93  Real /*intnl*/) const
94 {
95  return RankTwoTensor();
96 }
97 
98 std::string
100 {
101  return "WeakPlaneTensileN";
102 }
auto norm() const -> decltype(std::norm(Real()))
Real yieldFunction(const RankTwoTensor &stress, Real intnl) const override
The following functions are what you should override when building single-plasticity models...
registerMooseObject("SolidMechanicsApp", SolidMechanicsPlasticWeakPlaneTensileN)
RankTwoTensor dflowPotential_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to the internal parameter.
virtual Real value(Real intnl) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
Rate-independent associative weak-plane tensile failure with hardening/softening of the tensile stren...
registerMooseObjectRenamed("SolidMechanicsApp", TensorMechanicsPlasticWeakPlaneTensileN, "01/01/2025 00:00", SolidMechanicsPlasticWeakPlaneTensileN)
RankTwoTensor flowPotential(const RankTwoTensor &stress, Real intnl) const override
The flow potential.
virtual Real tensile_strength(const Real internal_param) const
tensile strength as a function of residual value, rate, and internal_param
const SolidMechanicsHardeningModel & _strength
Yield function = _a * stress_zz - _strength;.
GenericRealTensorValue< is_ad > rotVecToZ(GenericRealVectorValue< is_ad > vec)
virtual Real dtensile_strength(const Real internal_param) const
d(tensile strength)/d(internal_param) as a function of residual value, rate, and internal_param ...
Rate-independent associative weak-plane tensile failure with hardening/softening, and normal directio...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
RankTwoTensor _df_dsig
Flow direction, which is constant in this case.
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
Real dyieldFunction_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to the internal parameter.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
RankFourTensor dflowPotential_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to stress.
RankTwoTensor dyieldFunction_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to stress.
RealTensorValue _rot
This rotation matrix rotates _input_n to (0, 0, 1)
RealVectorValue _input_n
Unit normal inputted by user.
SolidMechanicsPlasticWeakPlaneTensileN(const InputParameters &parameters)