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 "HEVPEqvPlasticStrainRate.h" 11 : 12 : registerMooseObject("SolidMechanicsApp", HEVPEqvPlasticStrainRate); 13 : 14 : InputParameters 15 60 : HEVPEqvPlasticStrainRate::validParams() 16 : { 17 60 : InputParameters params = HEVPInternalVarRateUOBase::validParams(); 18 120 : params.addParam<Real>("h_scaling", 1.0, "Scaling parameter"); 19 60 : params.addClassDescription("User Object computing equivalent plastic strain rate"); 20 60 : return params; 21 0 : } 22 : 23 30 : HEVPEqvPlasticStrainRate::HEVPEqvPlasticStrainRate(const InputParameters & parameters) 24 60 : : HEVPInternalVarRateUOBase(parameters), _h(getParam<Real>("h_scaling")) 25 : { 26 30 : } 27 : 28 : bool 29 1068640 : HEVPEqvPlasticStrainRate::computeValue(unsigned int qp, Real & val) const 30 : { 31 1068640 : val = _h * _flow_rate[qp]; 32 1068640 : return true; 33 : } 34 : 35 : bool 36 1250400 : HEVPEqvPlasticStrainRate::computeDerivative(unsigned int /*qp*/, 37 : const std::string & coupled_var_name, 38 : Real & val) const 39 : { 40 1250400 : val = 0; 41 : 42 1250400 : if (_flow_rate_prop_name == coupled_var_name) 43 888800 : val = _h; 44 : 45 1250400 : return true; 46 : }