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;
registerMooseObject("SolidMechanicsApp", PlasticTruss)
virtual Real value(Real t, const Point &p) const
virtual Real timeDerivative(Real t, const Point &p) const
static InputParameters validParams()
const InputParameters & parameters() const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
const MaterialProperty< Real > & _total_stretch_old
const Real _hardening_constant
const MaterialProperty< Real > & _hardening_variable_old
virtual void initQpStatefulProperties()
MaterialProperty< Real > & _hardening_variable
const Function *const _hardening_function
Real _absolute_tolerance
convergence tolerance
const MaterialProperty< Real > & _stress_old
virtual void computeQpStress()
static InputParameters validParams()
const MaterialProperty< Real > & _plastic_strain_old
virtual void computeQpStrain()
PlasticTruss(const InputParameters ¶meters)
virtual Real computeHardeningDerivative(Real scalar)
MaterialProperty< Real > & _plastic_strain
const unsigned int _max_its
maximum no. of iterations
virtual Real computeHardeningValue(Real scalar)
MaterialProperty< Real > & _axial_stress
const VariableValue & _youngs_modulus
virtual void initQpStatefulProperties()
MaterialProperty< Real > & _total_stretch
MaterialProperty< Real > & _elastic_stretch