40 static constexpr int dim = 3;
43 using MaterialTensor = Eigen::TensorFixedSize<ScalarType, Eigen::Sizes<dim, dim, dim, dim>>;
57 [[nodiscard]]
constexpr static std::string
nameImpl() {
return "StVenantKirchhoff"; }
64 : materialParameter_{mpt} {}
77 template <
typename Derived>
79 static_assert(Concepts::EigenMatrixOrVoigtNotation3<Derived>);
81 const ScalarType traceE = E.template segment<3>(0).sum();
83 E.template segment<3>(0).squaredNorm() + E.template segment<3>(3).squaredNorm() /
ScalarType(2.0);
84 return materialParameter_.
lambda /
ScalarType(2.0) * traceE * traceE + materialParameter_.
mu * squaredNorm;
86 const auto traceE = E.trace();
87 return materialParameter_.
lambda /
ScalarType(2.0) * traceE * traceE + materialParameter_.
mu * E.squaredNorm();
98 template <
bool voigt,
typename Derived>
100 static_assert(Concepts::EigenMatrixOrVoigtNotation3<
decltype(E.eval())>);
101 const auto& Ed = E.derived();
102 if constexpr (!voigt) {
104 static_assert(Concepts::EigenVector6<Derived>);
106 const ScalarType traceE = Ed.template segment<3>(0).sum();
107 S.diagonal().array() =
108 materialParameter_.
lambda * traceE + 2 * materialParameter_.
mu * Ed.template segment<3>(0).array();
109 S(1, 2) = S(2, 1) = materialParameter_.
mu * Ed(3);
110 S(0, 2) = S(2, 0) = materialParameter_.
mu * Ed(4);
111 S(0, 1) = S(1, 0) = materialParameter_.
mu * Ed(5);
114 static_assert(Concepts::EigenMatrix33<Derived>);
115 return (materialParameter_.
lambda * Ed.trace() * StrainMatrix::Identity() + 2 * materialParameter_.
mu * Ed)
120 static_assert(Concepts::EigenVector6<Derived>);
121 Eigen::Matrix<ScalarType, 6, 1> S;
122 const ScalarType traceE = Ed.template segment<3>(0).sum();
123 S.template segment<3>(0).array() = traceE * materialParameter_.
lambda;
124 S.template segment<3>(0) += materialParameter_.
mu * 2 * Ed.template segment<3>(0);
125 S.template segment<3>(3) =
126 materialParameter_.
mu * Ed.template segment<3>(3);
129 Eigen::Matrix<ScalarType, 6, 1> S;
130 S.template segment<3>(0).array() = Ed.trace() * materialParameter_.
lambda;
131 S.template segment<3>(0) += 2 * materialParameter_.
mu * Ed.diagonal();
132 S(3) = 2 * materialParameter_.
mu * Ed(1, 2);
133 S(4) = 2 * materialParameter_.
mu * Ed(0, 2);
134 S(5) = 2 * materialParameter_.
mu * Ed(0, 1);
148 template <
bool voigt,
typename Derived>
150 static_assert(Concepts::EigenMatrixOrVoigtNotation3<Derived>);
151 if constexpr (!voigt) {
157 Eigen::Matrix<ScalarType, 6, 6> moduli;
159 moduli.template block<3, 3>(0, 0).array() = materialParameter_.
lambda;
160 moduli.template block<3, 3>(0, 0).diagonal().array() += 2 * materialParameter_.
mu;
161 moduli.template block<3, 3>(3, 3).diagonal().array() = materialParameter_.
mu;
171 template <
typename ScalarTypeOther>
183 template <
typename Derived>
185 auto tangentModulus = tangentModuliImpl<true>(Eigen::Matrix3<ScalarType>::Zero());
186 auto D = tangentModulus.inverse().eval();
187 auto S = Impl::maybeToVoigt(Sraw,
false);
188 auto E = (D * S).eval();
189 return std::make_pair(D, E);
Helper for the Eigen::Tensor types.
helper functions used by material model implementations.
auto symmetricIdentityFourthOrder()
Generates a symmetric identity fourth-order tensor.
Definition: tensorutils.hh:73
auto identityFourthOrder()
Generates an identity fourth-order tensor.
Definition: tensorutils.hh:114
Definition: arrudaboyce.hh:27
Interface classf or materials.
Definition: finiteelements/mechanics/materials/interface.hh:82
Implementation of the Saint Venant-Kirchhoff material model.The energy is computed as.
Definition: svk.hh:38
ST ScalarType
Definition: svk.hh:39
auto stressesImpl(const Eigen::MatrixBase< Derived > &E) const
Computes the stresses in the Saint Venant-Kirchhoff material model.
Definition: svk.hh:99
auto materialInversionImpl(const Eigen::MatrixBase< Derived > &Sraw) const
Computes the strain measure and inverse material tangent for a given stress state.
Definition: svk.hh:184
static constexpr std::string nameImpl()
Definition: svk.hh:57
static constexpr bool moduliToVoigt
Definition: svk.hh:53
LamesFirstParameterAndShearModulus MaterialParameters
Definition: svk.hh:45
static constexpr auto strainTag
Definition: svk.hh:47
static constexpr int dim
Definition: svk.hh:40
auto rebind() const
Rebinds the material to a different scalar type.
Definition: svk.hh:172
Eigen::Matrix< ScalarType, dim, dim > StrainMatrix
Definition: svk.hh:41
StrainMatrix StressMatrix
Definition: svk.hh:42
ScalarType storedEnergyImpl(const Eigen::MatrixBase< Derived > &E) const
Computes the stored energy in the Saint Venant-Kirchhoff material model.
Definition: svk.hh:78
static constexpr double derivativeFactorImpl
Definition: svk.hh:55
StVenantKirchhoffT(const MaterialParameters &mpt)
Constructor for StVenantKirchhoffT.
Definition: svk.hh:63
static constexpr bool stressAcceptsVoigt
Definition: svk.hh:52
static constexpr auto stressTag
Definition: svk.hh:48
auto tangentModuliImpl(const Eigen::MatrixBase< Derived > &) const
Computes the tangent moduli in the Saint Venant-Kirchhoff material model.
Definition: svk.hh:149
Eigen::TensorFixedSize< ScalarType, Eigen::Sizes< dim, dim, dim, dim > > MaterialTensor
Definition: svk.hh:43
static constexpr bool moduliAcceptsVoigt
Definition: svk.hh:54
static constexpr bool stressToVoigt
Definition: svk.hh:51
static constexpr bool energyAcceptsVoigt
Definition: svk.hh:50
MaterialParameters materialParametersImpl() const
Returns the material parameters stored in the material.
Definition: svk.hh:69
static constexpr auto tangentModuliTag
Definition: svk.hh:49
Definition: physicshelper.hh:54
double lambda
Definition: physicshelper.hh:55
double mu
Definition: physicshelper.hh:56
Concept defining the requirements for Eigen vectors.
Definition: utils/concepts.hh:365
Contains the Material interface class and related template functions for material properties.