www.mooseframework.org
ComputePlasticHeatEnergy.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 
12 registerMooseObject("SolidMechanicsApp", ComputePlasticHeatEnergy);
13 
16 {
18  params.addParam<std::string>("base_name",
19  "Optional parameter that allows the user to define "
20  "multiple mechanics material systems on the same "
21  "block, i.e. for multiple phases");
22  params.addClassDescription("Plastic heat energy density = stress * plastic_strain_rate");
23  return params;
24 }
25 
28  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
29  _plastic_strain(getMaterialProperty<RankTwoTensor>("plastic_strain")),
30  _plastic_strain_old(getMaterialPropertyOld<RankTwoTensor>("plastic_strain")),
31  _stress(getMaterialProperty<RankTwoTensor>(_base_name + "stress")),
32  _Jacobian_mult(getMaterialProperty<RankFourTensor>(_base_name + "Jacobian_mult")),
33  _elasticity_tensor(getMaterialProperty<RankFourTensor>(_base_name + "elasticity_tensor")),
34  _plastic_heat(declareProperty<Real>(_base_name + "plastic_heat")),
35  _dplastic_heat_dstrain(declareProperty<RankTwoTensor>(_base_name + "dplastic_heat_dstrain"))
36 {
37 }
38 
39 void
41 {
43  _stress[_qp].doubleContraction(_plastic_strain[_qp] - _plastic_strain_old[_qp]) / _dt;
45  {
47  // no plastic deformation, so _elasticity_tensor = _Jacobian_mult
49  else
50  {
52  (_plastic_strain[_qp] - _plastic_strain_old[_qp]).initialContraction(_Jacobian_mult[_qp]);
55  _stress[_qp].initialContraction(_elasticity_tensor[_qp].invSymm() * _Jacobian_mult[_qp]);
57  }
58  }
59 }
registerMooseObject("SolidMechanicsApp", ComputePlasticHeatEnergy)
const MaterialProperty< RankFourTensor > & _Jacobian_mult
d(stress)/d(total strain)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
ComputePlasticHeatEnergy(const InputParameters &parameters)
const MaterialProperty< RankTwoTensor > & _stress
stress
const MaterialProperty< RankFourTensor > & _elasticity_tensor
elasticity tensor
const MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
old value of plastic strain
static InputParameters validParams()
MaterialProperty< Real > & _plastic_heat
computed property: stress * (plastic_strain - plastic_strain_old) / dt
virtual void computeQpProperties() override
ComputePlasticHeatEnergy computes stress * (plastic_strain - plastic_strain_old) and, if currentlyComputingJacobian, then the derivative of this quantity wrt total strain.
static InputParameters validParams()
MaterialProperty< RankTwoTensor > & _dplastic_heat_dstrain
d(plastic_heat)/d(total strain)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const bool & currentlyComputingJacobian() const