22 "Computes the stress and strain for a truss element with plastic behavior defined by either " 23 "linear hardening or a user-defined hardening function.");
25 "Yield stress after which plastic strain starts accumulating");
26 params.
addParam<
Real>(
"hardening_constant", 0.0,
"Hardening slope");
27 params.
addParam<FunctionName>(
"hardening_function",
28 "Engineering stress as a function of plastic strain");
30 "absolute_tolerance", 1e-10,
"Absolute convergence tolerance for Newton iteration");
32 "relative_tolerance", 1e-8,
"Relative convergence tolerance for Newton iteration");
38 _yield_stress(getParam<
Real>(
"yield_stress")),
39 _hardening_constant(getParam<
Real>(
"hardening_constant")),
40 _hardening_function(isParamValid(
"hardening_function") ? &getFunction(
"hardening_function")
42 _absolute_tolerance(parameters.
get<
Real>(
"absolute_tolerance")),
43 _relative_tolerance(parameters.
get<
Real>(
"relative_tolerance")),
44 _total_stretch_old(getMaterialPropertyOld<
Real>(_base_name +
"total_stretch")),
45 _plastic_strain(declareProperty<
Real>(_base_name +
"plastic_stretch")),
46 _plastic_strain_old(getMaterialPropertyOld<
Real>(_base_name +
"plastic_stretch")),
47 _stress_old(getMaterialPropertyOld<
Real>(_base_name +
"axial_stress")),
48 _hardening_variable(declareProperty<
Real>(_base_name +
"hardening_variable")),
49 _hardening_variable_old(getMaterialPropertyOld<
Real>(_base_name +
"hardening_variable")),
53 mooseError(
"PlasticTruss: Either hardening_constant or hardening_function must be defined");
56 mooseError(
"PlasticTruss: Only the hardening_constant or only the hardening_function can be " 57 "defined but not both");
85 Real plastic_strain_increment = 0.0;
86 Real elastic_strain_increment = strain_increment;
88 if (yield_condition > 0.0)
93 Real reference_residual =
105 plastic_strain_increment += scalar;
110 reference_residual = std::abs(trial_stress) -
_youngs_modulus[
_qp] * plastic_strain_increment;
114 throw MooseException(
"PlasticTruss: Plasticity model did not converge");
118 elastic_strain_increment = strain_increment - plastic_strain_increment;
const MaterialProperty< Real > & _hardening_variable_old
registerMooseObject("SolidMechanicsApp", PlasticTruss)
static InputParameters validParams()
virtual Real timeDerivative(Real t, const Point &p) const
static InputParameters validParams()
const Real _hardening_constant
MaterialProperty< Real > & _total_stretch
Real _absolute_tolerance
convergence tolerance
const VariableValue & _youngs_modulus
virtual void initQpStatefulProperties()
bool isParamValid(const std::string &name) const
MaterialProperty< Real > & _elastic_stretch
const Function *const _hardening_function
virtual void computeQpStress()
const unsigned int _max_its
maximum no. of iterations
const MaterialProperty< Real > & _stress_old
const MaterialProperty< Real > & _total_stretch_old
const MaterialProperty< Real > & _plastic_strain_old
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MaterialProperty< Real > & _axial_stress
PlasticTruss(const InputParameters ¶meters)
virtual Real computeHardeningDerivative(Real scalar)
void mooseError(Args &&... args) const
const InputParameters & parameters() const
virtual void initQpStatefulProperties()
virtual void computeQpStrain()
MaterialProperty< Real > & _plastic_strain
virtual Real value(Real t, const Point &p) const
virtual Real computeHardeningValue(Real scalar)
MaterialProperty< Real > & _hardening_variable
const Elem & get(const ElemType type_in)