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