https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputePlasticHeatEnergy.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
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
39void
41{
42 _plastic_heat[_qp] =
43 _stress[_qp].doubleContraction(_plastic_strain[_qp] - _plastic_strain_old[_qp]) / _dt;
44 if (_fe_problem.currentlyComputingJacobian())
45 {
46 if (_plastic_strain[_qp] == _plastic_strain_old[_qp])
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]);
56 _dplastic_heat_dstrain[_qp] /= _dt;
57 }
58 }
59}
registerMooseObject("SolidMechanicsApp", ComputePlasticHeatEnergy)
ComputePlasticHeatEnergy computes stress * (plastic_strain - plastic_strain_old) and,...
virtual void computeQpProperties() override
const MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain
static InputParameters validParams()
MaterialProperty< RankTwoTensor > & _dplastic_heat_dstrain
d(plastic_heat)/d(total strain)
const MaterialProperty< RankFourTensor > & _Jacobian_mult
d(stress)/d(total strain)
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
old value of plastic strain
MaterialProperty< Real > & _plastic_heat
computed property: stress * (plastic_strain - plastic_strain_old) / dt
const MaterialProperty< RankFourTensor > & _elasticity_tensor
elasticity tensor
ComputePlasticHeatEnergy(const InputParameters &parameters)
const MaterialProperty< RankTwoTensor > & _stress
stress
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()