25#include "neml2/models/solid_mechanics/YieldFunction.h"
36 "Classical macroscale plasticity yield function, \\f$ f = \\bar{\\sigma} - \\sigma_y - h "
37 "\\f$, where \\f$ \\bar{\\sigma} \\f$ is the effective stress, \\f$ \\sigma_y \\f$ is the "
38 "yield stress, and \\f$ h \\f$ is the isotropic hardening.";
41 options.set(
"yield_stress").doc() =
"Yield stress";
44 options.set(
"effective_stress").doc() =
"Effective stress";
47 options.set(
"isotropic_hardening").doc() =
"Isotropic hardening";
50 options.set(
"yield_function").doc() =
"Yield function";
57 _s(declare_input_variable<
Scalar>(
"effective_stress")),
58 _h(options.get<
VariableName>(
"isotropic_hardening").empty()
60 : &declare_input_variable<
Scalar>(
"isotropic_hardening")),
61 _f(declare_output_variable<
Scalar>(
"yield_function")),
62 _sy(declare_parameter<
Scalar>(
"sy",
"yield_stress"))
72 _f = std::sqrt(2.0 / 3.0) * (
_s -
_sy - (*_h));
74 _f = std::sqrt(2.0 / 3.0) * (
_s -
_sy);
81 _f.
d(
_s) = std::sqrt(2.0 / 3.0) *
I;
84 _f.
d(*
_h) = -std::sqrt(2.0 / 3.0) *
I;
87 _f.
d(*
sy) = -std::sqrt(2.0 / 3.0) *
I;
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
The accessor containing all the information needed to access an item in a LabeledAxis.
Definition LabeledAxisAccessor.h:44
The base class for all constitutive models.
Definition Model.h:53
const torch::TensorOptions & options() const
This model's tensor options.
Definition Model.h:116
static OptionSet expected_options()
Definition Model.cxx:33
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:59
const VariableBase * nl_param(const std::string &) const
Query the existence of a nonlinear parameter.
Definition ParameterStore.cxx:56
The (logical) scalar.
Definition Scalar.h:38
static Scalar identity_map(const torch::TensorOptions &options=default_tensor_options())
The derivative of a Scalar with respect to itself.
Definition Scalar.cxx:35
Derivative d(const VariableBase &x)
Create a wrapper representing the derivative dy/dx.
Definition Variable.cxx:102
Definition YieldFunction.h:32
Variable< Scalar > & _f
Yield function.
Definition YieldFunction.h:49
const Scalar & _sy
Yield stress.
Definition YieldFunction.h:52
const Variable< Scalar > * _h
(Optional) Isotropic hardening
Definition YieldFunction.h:46
YieldFunction(const OptionSet &options)
Definition YieldFunction.cxx:55
const Variable< Scalar > & _s
Effective stress.
Definition YieldFunction.h:43
static OptionSet expected_options()
Definition YieldFunction.cxx:32
void set_value(bool out, bool dout_din, bool d2out_din2) override
The value of the yield function.
Definition YieldFunction.cxx:67
Definition CrossRef.cxx:32
LabeledAxisAccessor VariableName
Definition Variable.h:35