www.mooseframework.org
HEVPLinearHardening.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "HEVPLinearHardening.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<HEVPStrengthUOBase>();
14  params.addParam<Real>("yield_stress", "Yield strength");
15  params.addParam<Real>("slope", "Linear hardening slope");
16  params.addClassDescription("User Object for linear hardening");
17  return params;
18 }
19 
20 HEVPLinearHardening::HEVPLinearHardening(const InputParameters & parameters)
21  : HEVPStrengthUOBase(parameters),
22  _sig0(getParam<Real>("yield_stress")),
23  _slope(getParam<Real>("slope"))
24 {
25 }
26 
27 bool
28 HEVPLinearHardening::computeValue(unsigned int qp, Real & val) const
29 {
30  val = _sig0 + _slope * _intvar[qp];
31  return true;
32 }
33 
34 bool
36  const std::string & coupled_var_name,
37  Real & val) const
38 {
39  val = 0;
40 
41  if (_intvar_prop_name == coupled_var_name)
42  val = _slope;
43 
44  return true;
45 }
InputParameters validParams< HEVPLinearHardening >()
This user object is a pure virtual base classs Derived classes computes material resistances and deri...
virtual bool computeDerivative(unsigned int, const std::string &, Real &) const
InputParameters validParams< HEVPStrengthUOBase >()
HEVPLinearHardening(const InputParameters &parameters)
const MaterialProperty< Real > & _intvar
std::string _intvar_prop_name
virtual bool computeValue(unsigned int, Real &) const