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