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