https://mooseframework.inl.gov
Loading...
Searching...
No Matches
HEVPLinearHardening.C
Go to the documentation of this file.
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 "HEVPLinearHardening.h"
11
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
31bool
32HEVPLinearHardening::computeValue(unsigned int qp, Real & val) const
33{
34 val = _sig0 + _slope * _intvar[qp];
35 return true;
36}
37
38bool
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)
This user object classs Computes linear hardening.
HEVPLinearHardening(const InputParameters &parameters)
virtual bool computeValue(unsigned int, Real &) const
static InputParameters validParams()
virtual bool computeDerivative(unsigned int, const std::string &, Real &) const
This user object is a pure virtual base classs Derived classes computes material resistances and deri...
const MaterialProperty< Real > & _intvar
static InputParameters validParams()
std::string _intvar_prop_name
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)