www.mooseframework.org
TensorMechanicsHardeningConstant.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 /****************************************************************/
8 #include <math.h> // for M_PI
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<TensorMechanicsHardeningModel>();
15  params.addParam<Real>("value",
16  1.0,
17  "The value of the parameter for all internal parameter. "
18  "This is perfect plasticity - there is no hardening.");
19  params.addParam<bool>("convert_to_radians",
20  false,
21  "If true, the value you entered will be "
22  "multiplied by Pi/180 before passing to the "
23  "Plasticity algorithms");
24  params.addClassDescription(
25  "No hardening - the parameter is independent of the internal parameter(s)");
26  return params;
27 }
28 
30  const InputParameters & parameters)
31  : TensorMechanicsHardeningModel(parameters),
32  _val(getParam<bool>("convert_to_radians") ? getParam<Real>("value") * M_PI / 180.0
33  : getParam<Real>("value"))
34 {
35 }
36 
37 Real TensorMechanicsHardeningConstant::value(Real /*intnl*/) const { return _val; }
38 
39 Real TensorMechanicsHardeningConstant::derivative(Real /*intnl*/) const { return 0.0; }
40 
41 std::string
43 {
44  return "Constant";
45 }
InputParameters validParams< TensorMechanicsHardeningConstant >()
virtual Real value(Real intnl) const override
virtual Real derivative(Real intnl) const override
InputParameters validParams< TensorMechanicsHardeningModel >()
Real _val
The value that the parameter will take.
TensorMechanicsHardeningConstant(const InputParameters &parameters)
virtual std::string modelName() const override