www.mooseframework.org
HEVPLinearHardening.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "HEVPLinearHardening.h"
11 
12 registerMooseObject("SolidMechanicsApp", HEVPLinearHardening);
13 
16 {
18  params.addParam<Real>("yield_stress", "Yield strength");
19  params.addParam<Real>("slope", "Linear hardening slope");
20  params.addClassDescription("User Object for linear hardening");
21  return params;
22 }
23 
25  : HEVPStrengthUOBase(parameters),
26  _sig0(getParam<Real>("yield_stress")),
27  _slope(getParam<Real>("slope"))
28 {
29 }
30 
31 bool
32 HEVPLinearHardening::computeValue(unsigned int qp, Real & val) const
33 {
34  val = _sig0 + _slope * _intvar[qp];
35  return true;
36 }
37 
38 bool
40  const std::string & coupled_var_name,
41  Real & val) const
42 {
43  val = 0;
44 
45  if (_intvar_prop_name == coupled_var_name)
46  val = _slope;
47 
48  return true;
49 }
registerMooseObject("SolidMechanicsApp", HEVPLinearHardening)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
This user object classs Computes linear hardening.
This user object is a pure virtual base classs Derived classes computes material resistances and deri...
static InputParameters validParams()
HEVPLinearHardening(const InputParameters &parameters)
const MaterialProperty< Real > & _intvar
std::string _intvar_prop_name
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool computeValue(unsigned int, Real &) const
void addClassDescription(const std::string &doc_string)
virtual bool computeDerivative(unsigned int, const std::string &, Real &) const
static InputParameters validParams()