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 "HEVPRambergOsgoodHardening.h" 11 : 12 : registerMooseObject("SolidMechanicsApp", HEVPRambergOsgoodHardening); 13 : 14 : InputParameters 15 56 : HEVPRambergOsgoodHardening::validParams() 16 : { 17 56 : InputParameters params = HEVPStrengthUOBase::validParams(); 18 112 : params.addParam<Real>("yield_stress", "Yield strength"); 19 112 : params.addRequiredParam<Real>("reference_plastic_strain", "Reference plastic strain value"); 20 112 : params.addRequiredParam<Real>("hardening_exponent", "The hardening exponent value"); 21 56 : params.addClassDescription("User object for Ramberg-Osgood hardening power law hardening"); 22 : 23 56 : return params; 24 0 : } 25 : 26 28 : HEVPRambergOsgoodHardening::HEVPRambergOsgoodHardening(const InputParameters & parameters) 27 : : HEVPStrengthUOBase(parameters), 28 28 : _sig0(getParam<Real>("yield_stress")), 29 56 : _peeq0(getParam<Real>("reference_plastic_strain")), 30 84 : _exponent(getParam<Real>("hardening_exponent")) 31 : { 32 28 : } 33 : 34 : bool 35 1097920 : HEVPRambergOsgoodHardening::computeValue(unsigned int qp, Real & val) const 36 : { 37 1097920 : val = _sig0 * std::pow(_intvar[qp] / _peeq0 + 1.0, _exponent); 38 1097920 : return true; 39 : } 40 : 41 : bool 42 1377104 : HEVPRambergOsgoodHardening::computeDerivative(unsigned int qp, 43 : const std::string & coupled_var_name, 44 : Real & val) const 45 : { 46 1377104 : val = 0; 47 : 48 1377104 : if (_intvar_prop_name == coupled_var_name) 49 913200 : val = _sig0 * _exponent / _peeq0 * std::pow(_intvar[qp] / _peeq0 + 1.0, _exponent - 1.0); 50 : 51 1377104 : return true; 52 : }