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