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