25#include "neml2/models/solid_mechanics/LinearIsotropicElasticity.h"
26#include "neml2/tensors/SSR4.h"
36 options.doc() +=
" for linear isotropic material. \\f$ \\boldsymbol{\\sigma} = K \\tr "
37 "\\boldsymbol{\\varepsilon}_e + 2 G \\text{dev} \\boldsymbol{\\varepsilon}_e "
38 "\\f$, where \\f$ K \\f$ and \\f$ G \\f$ are bulk and shear moduli, "
39 "respectively. For convenience, this object only requests Young's modulus and "
40 "Poisson's ratio, and handles the Lame parameter conversion behind the scenes.";
43 options.set(
"youngs_modulus").doc() =
"Young's modulus";
46 options.set(
"poisson_ratio").doc() =
"Poisson's ratio";
53 _E(declare_parameter<
Scalar>(
"E",
"youngs_modulus")),
54 _nu(declare_parameter<
Scalar>(
"nu",
"poisson_ratio"))
63 const auto K =
_E / 3 / (1 - 2 *
_nu);
64 const auto G =
_E / 2 / (1 +
_nu);
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
Definition Elasticity.h:33
const bool _compliance
Definition Elasticity.h:44
const Variable< SR2 > & _from
Definition Elasticity.h:59
Variable< SR2 > & _to
Definition Elasticity.h:65
static OptionSet expected_options()
Definition Elasticity.cxx:30
Definition LinearIsotropicElasticity.h:32
const Scalar & _nu
Poisson's ratio.
Definition LinearIsotropicElasticity.h:45
const Scalar & _E
Young's modulus.
Definition LinearIsotropicElasticity.h:42
static OptionSet expected_options()
Definition LinearIsotropicElasticity.cxx:33
LinearIsotropicElasticity(const OptionSet &options)
Definition LinearIsotropicElasticity.cxx:51
void set_value(bool out, bool dout_din, bool d2out_din2) override
The map between input -> output, and optionally its derivatives.
Definition LinearIsotropicElasticity.cxx:59
const torch::TensorOptions & options() const
This model's tensor options.
Definition Model.h:116
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:59
The (logical) symmetric second order tensor.
Definition SR2.h:46
SR2 dev() const
Deviatoric part of the tensor.
Definition SR2.cxx:167
SR2 vol() const
Volumetric part of the tensor.
Definition SR2.cxx:161
static SSR4 identity_dev(const torch::TensorOptions &options=default_tensor_options())
Create the deviatoric identity tensor .
Definition SSR4.cxx:70
static SSR4 identity_vol(const torch::TensorOptions &options=default_tensor_options())
Create the volumetric identity tensor .
Definition SSR4.cxx:64
The (logical) scalar.
Definition Scalar.h:38
Definition CrossRef.cxx:32