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 
16 
17 InputParameters
19 {
20  InputParameters params = CappedMohrCoulombStressUpdate::validParams();
21  params.addClassDescription("Capped Mohr-Coulomb plasticity stress calculator for the Cosserat "
22  "situation where the host medium (ie, the limit where all Cosserat "
23  "effects are zero) is isotropic. Note that the return-map flow rule "
24  "uses an isotropic elasticity tensor built with the 'host' properties "
25  "defined by the user.");
26  params.addRequiredRangeCheckedParam<Real>("host_youngs_modulus",
27  "host_youngs_modulus>0",
28  "Young's modulus for the isotropic host medium");
29  params.addRequiredRangeCheckedParam<Real>("host_poissons_ratio",
30  "host_poissons_ratio>=0 & host_poissons_ratio<0.5",
31  "Poisson's ratio for the isotropic host medium");
32  return params;
33 }
34 
36  const InputParameters & parameters)
37  : CappedMohrCoulombStressUpdate(parameters),
38  _host_young(getParam<Real>("host_youngs_modulus")),
39  _host_poisson(getParam<Real>("host_poissons_ratio")),
40  _host_E0011(_host_young * _host_poisson / (1.0 + _host_poisson) / (1.0 - 2.0 * _host_poisson)),
41  _host_E0000(_host_E0011 + _host_young / (1.0 + _host_poisson))
42 {
43 }
44 
45 void
47  const std::vector<Real> & /*trial_stress_params*/,
48  const RankTwoTensor & stress_trial,
49  const std::vector<Real> & /*intnl_old*/,
50  const std::vector<Real> & /*yf*/,
51  const RankFourTensor & /*Eijkl*/)
52 {
53  std::vector<Real> eigvals;
54  stress_trial.symmetricEigenvaluesEigenvectors(eigvals, _eigvecs);
56 }
57 
58 void
60 {
61  _Eij[0][0] = _Eij[1][1] = _Eij[2][2] = _host_E0000;
62  _Eij[0][1] = _Eij[1][0] = _Eij[0][2] = _Eij[2][0] = _Eij[1][2] = _Eij[2][1] = _host_E0011;
63  _En = _Eij[2][2];
64  const Real denom = _Eij[0][0] * (_Eij[0][0] + _Eij[0][1]) - 2 * Utility::pow<2>(_Eij[0][1]);
65  for (unsigned a = 0; a < _num_sp; ++a)
66  {
67  _Cij[a][a] = (_Eij[0][0] + _Eij[0][1]) / denom;
68  for (unsigned b = 0; b < a; ++b)
69  _Cij[a][b] = _Cij[b][a] = -_Eij[0][1] / denom;
70  }
71 }
72 
73 void
75  const RankTwoTensor & stress_trial,
76  const std::vector<Real> & stress_params,
77  Real /*gaE*/,
78  const std::vector<Real> & /*intnl*/,
79  const yieldAndFlow & /*smoothed_q*/,
80  const RankFourTensor & /*Eijkl*/,
81  RankTwoTensor & stress) const
82 {
83  // form the diagonal stress
84  stress = RankTwoTensor(stress_params[0], stress_params[1], stress_params[2], 0.0, 0.0, 0.0);
85  // rotate to the original frame, to give the symmetric part of the stress
86  stress = _eigvecs * stress * (_eigvecs.transpose());
87  // add the non-symmetric parts
88  stress += 0.5 * (stress_trial - stress_trial.transpose());
89 }
90 
91 void
93  const RankTwoTensor & stress_trial,
94  const std::vector<Real> & trial_stress_params,
95  const RankTwoTensor & stress,
96  const std::vector<Real> & stress_params,
97  Real gaE,
98  const yieldAndFlow & smoothed_q,
99  const RankFourTensor & elasticity_tensor,
100  bool compute_full_tangent_operator,
101  const std::vector<std::vector<Real>> & dvar_dtrial,
102  RankFourTensor & cto)
103 {
105  trial_stress_params,
106  stress,
107  stress_params,
108  gaE,
109  smoothed_q,
110  elasticity_tensor,
111  compute_full_tangent_operator,
112  dvar_dtrial,
113  cto);
114 
115  if (!compute_full_tangent_operator)
116  return;
117 
134  RankFourTensor anti;
135  for (unsigned i = 0; i < _tensor_dimensionality; ++i)
136  for (unsigned j = 0; j < _tensor_dimensionality; ++j)
137  for (unsigned k = 0; k < _tensor_dimensionality; ++k)
138  for (unsigned l = 0; l < _tensor_dimensionality; ++l)
139  anti(i, j, k, l) = 0.5 * (elasticity_tensor(i, j, k, l) - elasticity_tensor(j, i, k, l));
140 
141  cto += anti;
142 }
CappedMohrCoulombStressUpdate::validParams
static InputParameters validParams()
Definition: CappedMohrCoulombStressUpdate.C:19
CappedMohrCoulombStressUpdate::_eigvecs
RankTwoTensor _eigvecs
Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to s...
Definition: CappedMohrCoulombStressUpdate.h:68
CappedMohrCoulombStressUpdate::consistentTangentOperatorV
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.
Definition: CappedMohrCoulombStressUpdate.C:793
CappedMohrCoulombCosseratStressUpdate::_host_poisson
const Real _host_poisson
Poisson's of the host material.
Definition: CappedMohrCoulombCosseratStressUpdate.h:48
MultiParameterPlasticityStressUpdate::yieldAndFlow
Struct designed to hold info about a single yield function and its derivatives, as well as the flow d...
Definition: MultiParameterPlasticityStressUpdate.h:214
MultiParameterPlasticityStressUpdate::_Cij
std::vector< std::vector< Real > > _Cij
_Cij[i, j] * _Eij[j, k] = 1 iff j == k
Definition: MultiParameterPlasticityStressUpdate.h:144
CappedMohrCoulombCosseratStressUpdate::preReturnMapV
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...
Definition: CappedMohrCoulombCosseratStressUpdate.C:46
CappedMohrCoulombCosseratStressUpdate::setEffectiveElasticity
void setEffectiveElasticity(const RankFourTensor &Eijkl) override
Sets _Eij and _En and _Cij.
Definition: CappedMohrCoulombCosseratStressUpdate.C:59
MultiParameterPlasticityStressUpdate::_Eij
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
Definition: MultiParameterPlasticityStressUpdate.h:138
CappedMohrCoulombCosseratStressUpdate::_host_E0000
const Real _host_E0000
E0000 = Lame lambda + 2 * shear modulus of the host material.
Definition: CappedMohrCoulombCosseratStressUpdate.h:54
CappedMohrCoulombCosseratStressUpdate::setStressAfterReturnV
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.
Definition: CappedMohrCoulombCosseratStressUpdate.C:74
CappedMohrCoulombCosseratStressUpdate.h
CappedMohrCoulombStressUpdate::_poissons_ratio
Real _poissons_ratio
Poisson's ratio.
Definition: CappedMohrCoulombStressUpdate.h:58
MultiParameterPlasticityStressUpdate::_num_sp
const unsigned _num_sp
Number of stress parameters.
Definition: MultiParameterPlasticityStressUpdate.h:132
CappedMohrCoulombStressUpdate
CappedMohrCoulombStressUpdate implements rate-independent nonassociative Mohr-Coulomb plus tensile pl...
Definition: CappedMohrCoulombStressUpdate.h:24
CappedMohrCoulombCosseratStressUpdate::validParams
static InputParameters validParams()
Definition: CappedMohrCoulombCosseratStressUpdate.C:18
CappedMohrCoulombCosseratStressUpdate::_host_E0011
const Real _host_E0011
E0011 = Lame lambda modulus of the host material.
Definition: CappedMohrCoulombCosseratStressUpdate.h:51
RankTwoTensor
RankTwoTensorTempl< Real > RankTwoTensor
Definition: ACGrGrElasticDrivingForce.h:17
CappedMohrCoulombCosseratStressUpdate
CappedMohrCoulombCosseratStressUpdate implements rate-independent nonassociative Mohr-Coulomb plus te...
Definition: CappedMohrCoulombCosseratStressUpdate.h:28
registerMooseObject
registerMooseObject("TensorMechanicsApp", CappedMohrCoulombCosseratStressUpdate)
MultiParameterPlasticityStressUpdate::_En
Real _En
normalising factor
Definition: MultiParameterPlasticityStressUpdate.h:141
RankFourTensorTempl< Real >
RankTwoTensorTempl< Real >
CappedMohrCoulombCosseratStressUpdate::CappedMohrCoulombCosseratStressUpdate
CappedMohrCoulombCosseratStressUpdate(const InputParameters &parameters)
Definition: CappedMohrCoulombCosseratStressUpdate.C:35
defineLegacyParams
defineLegacyParams(CappedMohrCoulombCosseratStressUpdate)
MultiParameterPlasticityStressUpdate::_tensor_dimensionality
constexpr static unsigned _tensor_dimensionality
Internal dimensionality of tensors (currently this is 3 throughout tensor_mechanics)
Definition: MultiParameterPlasticityStressUpdate.h:129
CappedMohrCoulombCosseratStressUpdate::consistentTangentOperatorV
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.
Definition: CappedMohrCoulombCosseratStressUpdate.C:92