www.mooseframework.org
CappedMohrCoulombCosseratStressUpdate.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 #include "libmesh/utility.h"
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<CappedMohrCoulombStressUpdate>();
15  params.addClassDescription("Capped Mohr-Coulomb plasticity stress calculator for the Cosserat "
16  "situation where the host medium (ie, the limit where all Cosserat "
17  "effects are zero) is isotropic. Note that the return-map flow rule "
18  "uses an isotropic elasticity tensor built with the 'host' properties "
19  "defined by the user.");
20  params.addRequiredRangeCheckedParam<Real>("host_youngs_modulus",
21  "host_youngs_modulus>0",
22  "Young's modulus for the isotropic host medium");
23  params.addRequiredRangeCheckedParam<Real>("host_poissons_ratio",
24  "host_poissons_ratio>=0 & host_poissons_ratio<0.5",
25  "Poisson's ratio for the isotropic host medium");
26  return params;
27 }
28 
30  const InputParameters & parameters)
31  : CappedMohrCoulombStressUpdate(parameters),
32  _host_young(getParam<Real>("host_youngs_modulus")),
33  _host_poisson(getParam<Real>("host_poissons_ratio")),
34  _host_E0011(_host_young * _host_poisson / (1.0 + _host_poisson) / (1.0 - 2.0 * _host_poisson)),
35  _host_E0000(_host_E0011 + _host_young / (1.0 + _host_poisson))
36 {
37 }
38 
39 void
41  const std::vector<Real> & /*trial_stress_params*/,
42  const RankTwoTensor & stress_trial,
43  const std::vector<Real> & /*intnl_old*/,
44  const std::vector<Real> & /*yf*/,
45  const RankFourTensor & /*Eijkl*/)
46 {
47  std::vector<Real> eigvals;
48  stress_trial.symmetricEigenvaluesEigenvectors(eigvals, _eigvecs);
50 }
51 
52 void
54 {
55  _Eij[0][0] = _Eij[1][1] = _Eij[2][2] = _host_E0000;
56  _Eij[0][1] = _Eij[1][0] = _Eij[0][2] = _Eij[2][0] = _Eij[1][2] = _Eij[2][1] = _host_E0011;
57  _En = _Eij[2][2];
58  const Real denom = _Eij[0][0] * (_Eij[0][0] + _Eij[0][1]) - 2 * Utility::pow<2>(_Eij[0][1]);
59  for (unsigned a = 0; a < _num_sp; ++a)
60  {
61  _Cij[a][a] = (_Eij[0][0] + _Eij[0][1]) / denom;
62  for (unsigned b = 0; b < a; ++b)
63  _Cij[a][b] = _Cij[b][a] = -_Eij[0][1] / denom;
64  }
65 }
66 
67 void
69  const RankTwoTensor & stress_trial,
70  const std::vector<Real> & stress_params,
71  Real /*gaE*/,
72  const std::vector<Real> & /*intnl*/,
73  const yieldAndFlow & /*smoothed_q*/,
74  const RankFourTensor & /*Eijkl*/,
75  RankTwoTensor & stress) const
76 {
77  // form the diagonal stress
78  stress = RankTwoTensor(stress_params[0], stress_params[1], stress_params[2], 0.0, 0.0, 0.0);
79  // rotate to the original frame, to give the symmetric part of the stress
80  stress = _eigvecs * stress * (_eigvecs.transpose());
81  // add the non-symmetric parts
82  stress += 0.5 * (stress_trial - stress_trial.transpose());
83 }
84 
85 void
87  const RankTwoTensor & stress_trial,
88  const std::vector<Real> & trial_stress_params,
89  const RankTwoTensor & stress,
90  const std::vector<Real> & stress_params,
91  Real gaE,
92  const yieldAndFlow & smoothed_q,
93  const RankFourTensor & elasticity_tensor,
94  bool compute_full_tangent_operator,
95  const std::vector<std::vector<Real>> & dvar_dtrial,
96  RankFourTensor & cto)
97 {
99  trial_stress_params,
100  stress,
101  stress_params,
102  gaE,
103  smoothed_q,
104  elasticity_tensor,
105  compute_full_tangent_operator,
106  dvar_dtrial,
107  cto);
108 
109  if (!compute_full_tangent_operator)
110  return;
111 
128  RankFourTensor anti;
129  for (unsigned i = 0; i < _tensor_dimensionality; ++i)
130  for (unsigned j = 0; j < _tensor_dimensionality; ++j)
131  for (unsigned k = 0; k < _tensor_dimensionality; ++k)
132  for (unsigned l = 0; l < _tensor_dimensionality; ++l)
133  anti(i, j, k, l) = 0.5 * (elasticity_tensor(i, j, k, l) - elasticity_tensor(j, i, k, l));
134 
135  cto += anti;
136 }
InputParameters validParams< CappedMohrCoulombStressUpdate >()
const Real _host_E0011
E0011 = Lame lambda modulus of the host material.
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.
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.
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
CappedMohrCoulombCosseratStressUpdate(const InputParameters &parameters)
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.
RankTwoTensor _eigvecs
Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to s...
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) ...
InputParameters validParams< CappedMohrCoulombCosseratStressUpdate >()
const unsigned _num_sp
Number of stress parameters.