www.mooseframework.org
CappedMohrCoulombCosseratStressUpdate.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "libmesh/utility.h"
12 
14 
17 {
19  params.addClassDescription("Capped Mohr-Coulomb plasticity stress calculator for the Cosserat "
20  "situation where the host medium (ie, the limit where all Cosserat "
21  "effects are zero) is isotropic. Note that the return-map flow rule "
22  "uses an isotropic elasticity tensor built with the 'host' properties "
23  "defined by the user.");
24  params.addRequiredRangeCheckedParam<Real>("host_youngs_modulus",
25  "host_youngs_modulus>0",
26  "Young's modulus for the isotropic host medium");
27  params.addRequiredRangeCheckedParam<Real>("host_poissons_ratio",
28  "host_poissons_ratio>=0 & host_poissons_ratio<0.5",
29  "Poisson's ratio for the isotropic host medium");
30  return params;
31 }
32 
34  const InputParameters & parameters)
35  : CappedMohrCoulombStressUpdate(parameters),
36  _host_young(getParam<Real>("host_youngs_modulus")),
37  _host_poisson(getParam<Real>("host_poissons_ratio")),
38  _host_E0011(_host_young * _host_poisson / (1.0 + _host_poisson) / (1.0 - 2.0 * _host_poisson)),
39  _host_E0000(_host_E0011 + _host_young / (1.0 + _host_poisson))
40 {
41 }
42 
43 void
45  const std::vector<Real> & /*trial_stress_params*/,
46  const RankTwoTensor & stress_trial,
47  const std::vector<Real> & /*intnl_old*/,
48  const std::vector<Real> & /*yf*/,
49  const RankFourTensor & /*Eijkl*/)
50 {
51  std::vector<Real> eigvals;
52  stress_trial.symmetricEigenvaluesEigenvectors(eigvals, _eigvecs);
54 }
55 
56 void
58 {
59  _Eij[0][0] = _Eij[1][1] = _Eij[2][2] = _host_E0000;
60  _Eij[0][1] = _Eij[1][0] = _Eij[0][2] = _Eij[2][0] = _Eij[1][2] = _Eij[2][1] = _host_E0011;
61  _En = _Eij[2][2];
62  const Real denom = _Eij[0][0] * (_Eij[0][0] + _Eij[0][1]) - 2 * Utility::pow<2>(_Eij[0][1]);
63  for (unsigned a = 0; a < _num_sp; ++a)
64  {
65  _Cij[a][a] = (_Eij[0][0] + _Eij[0][1]) / denom;
66  for (unsigned b = 0; b < a; ++b)
67  _Cij[a][b] = _Cij[b][a] = -_Eij[0][1] / denom;
68  }
69 }
70 
71 void
73  const RankTwoTensor & stress_trial,
74  const std::vector<Real> & stress_params,
75  Real /*gaE*/,
76  const std::vector<Real> & /*intnl*/,
77  const yieldAndFlow & /*smoothed_q*/,
78  const RankFourTensor & /*Eijkl*/,
79  RankTwoTensor & stress) const
80 {
81  // form the diagonal stress
82  stress = RankTwoTensor(stress_params[0], stress_params[1], stress_params[2], 0.0, 0.0, 0.0);
83  // rotate to the original frame, to give the symmetric part of the stress
84  stress = _eigvecs * stress * (_eigvecs.transpose());
85  // add the non-symmetric parts
86  stress += 0.5 * (stress_trial - stress_trial.transpose());
87 }
88 
89 void
91  const RankTwoTensor & stress_trial,
92  const std::vector<Real> & trial_stress_params,
93  const RankTwoTensor & stress,
94  const std::vector<Real> & stress_params,
95  Real gaE,
96  const yieldAndFlow & smoothed_q,
97  const RankFourTensor & elasticity_tensor,
98  bool compute_full_tangent_operator,
99  const std::vector<std::vector<Real>> & dvar_dtrial,
100  RankFourTensor & cto)
101 {
103  trial_stress_params,
104  stress,
105  stress_params,
106  gaE,
107  smoothed_q,
109  compute_full_tangent_operator,
110  dvar_dtrial,
111  cto);
112 
113  if (!compute_full_tangent_operator)
114  return;
115 
132  RankFourTensor anti;
133  for (unsigned i = 0; i < _tensor_dimensionality; ++i)
134  for (unsigned j = 0; j < _tensor_dimensionality; ++j)
135  for (unsigned k = 0; k < _tensor_dimensionality; ++k)
136  for (unsigned l = 0; l < _tensor_dimensionality; ++l)
137  anti(i, j, k, l) = 0.5 * (elasticity_tensor(i, j, k, l) - elasticity_tensor(j, i, k, l));
138 
139  cto += anti;
140 }
const Real _host_E0011
E0011 = Lame lambda modulus of the host material.
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
CappedMohrCoulombStressUpdate implements rate-independent nonassociative Mohr-Coulomb plus tensile pl...
void setEffectiveElasticity(const RankFourTensor &Eijkl) override
Sets _Eij and _En and _Cij.
virtual void consistentTangentOperatorV(const RankTwoTensor &stress_trial, const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, const std::vector< std::vector< Real >> &dvar_dtrial, RankFourTensor &cto) override
Calculates the consistent tangent operator.
Struct designed to hold info about a single yield function and its derivatives, as well as the flow d...
std::vector< std::vector< Real > > _Cij
_Cij[i, j] * _Eij[j, k] = 1 iff j == k
registerMooseObject("SolidMechanicsApp", CappedMohrCoulombCosseratStressUpdate)
CappedMohrCoulombCosseratStressUpdate(const InputParameters &parameters)
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
virtual void consistentTangentOperatorV(const RankTwoTensor &stress_trial, const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, const std::vector< std::vector< Real >> &dvar_dtrial, RankFourTensor &cto) override
Calculates the consistent tangent operator.
virtual void preReturnMapV(const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl) override
Derived classes may employ this function to record stuff or do other computations prior to the return...
const Real _host_poisson
Poisson&#39;s of the host material.
CappedMohrCoulombCosseratStressUpdate implements rate-independent nonassociative Mohr-Coulomb plus te...
virtual void setStressAfterReturnV(const RankTwoTensor &stress_trial, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const override
Sets stress from the admissible parameters.
RankTwoTensorTempl< Real > transpose() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void symmetricEigenvaluesEigenvectors(std::vector< Real > &eigvals, RankTwoTensorTempl< Real > &eigvecs) const
RankTwoTensor _eigvecs
Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to s...
void addClassDescription(const std::string &doc_string)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const Real _host_E0000
E0000 = Lame lambda + 2 * shear modulus of the host material.
static constexpr unsigned _tensor_dimensionality
Internal dimensionality of tensors (currently this is 3 throughout tensor_mechanics) ...
static const std::string k
Definition: NS.h:124
const unsigned _num_sp
Number of stress parameters.