Line data Source code
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 : 10 : #include "TensorMechanicsPlasticMeanCap.h" 11 : #include "RankFourTensor.h" 12 : 13 : registerMooseObject("TensorMechanicsApp", TensorMechanicsPlasticMeanCap); 14 : 15 : InputParameters 16 30 : TensorMechanicsPlasticMeanCap::validParams() 17 : { 18 30 : InputParameters params = TensorMechanicsPlasticModel::validParams(); 19 60 : params.addParam<Real>("a", 1.0, "Yield function = a*mean_stress - strength"); 20 60 : params.addRequiredParam<UserObjectName>("strength", "Yield function = a*mean_stress - strength"); 21 30 : params.addClassDescription("Class that limits the mean stress. Yield function = a*mean_stress - " 22 : "strength. mean_stress = (stress_xx + stress_yy + stress_zz)/3"); 23 : 24 30 : return params; 25 0 : } 26 : 27 15 : TensorMechanicsPlasticMeanCap::TensorMechanicsPlasticMeanCap(const InputParameters & parameters) 28 : : TensorMechanicsPlasticModel(parameters), 29 15 : _a_over_3(getParam<Real>("a") / 3.0), 30 30 : _strength(getUserObject<TensorMechanicsHardeningModel>("strength")) 31 : { 32 15 : } 33 : 34 : Real 35 34504 : TensorMechanicsPlasticMeanCap::yieldFunction(const RankTwoTensor & stress, Real intnl) const 36 : { 37 34504 : return _a_over_3 * stress.trace() - _strength.value(intnl); 38 : } 39 : 40 : RankTwoTensor 41 6256 : TensorMechanicsPlasticMeanCap::dyieldFunction_dstress(const RankTwoTensor & stress, 42 : Real /*intnl*/) const 43 : { 44 6256 : return _a_over_3 * stress.dtrace(); 45 : } 46 : 47 : Real 48 6256 : TensorMechanicsPlasticMeanCap::dyieldFunction_dintnl(const RankTwoTensor & /*stress*/, 49 : Real intnl) const 50 : { 51 6256 : return -_strength.derivative(intnl); 52 : } 53 : 54 : RankTwoTensor 55 13200 : TensorMechanicsPlasticMeanCap::flowPotential(const RankTwoTensor & stress, Real /*intnl*/) const 56 : { 57 13200 : return _a_over_3 * stress.dtrace(); 58 : } 59 : 60 : RankFourTensor 61 6256 : TensorMechanicsPlasticMeanCap::dflowPotential_dstress(const RankTwoTensor & /*stress*/, 62 : Real /*intnl*/) const 63 : { 64 6256 : return RankFourTensor(); 65 : } 66 : 67 : RankTwoTensor 68 6256 : TensorMechanicsPlasticMeanCap::dflowPotential_dintnl(const RankTwoTensor & /*stress*/, 69 : Real /*intnl*/) const 70 : { 71 6256 : return RankTwoTensor(); 72 : } 73 : 74 : std::string 75 0 : TensorMechanicsPlasticMeanCap::modelName() const 76 : { 77 0 : return "MeanCap"; 78 : }