39template <
typename ST_,
int n, PrincipalStretchTags tag>
44 template <
typename ST = ScalarType>
49 static constexpr int dim = 3;
52 template <
typename ST = ScalarType>
54 template <
typename ST = ScalarType>
60 [[nodiscard]]
constexpr static std::string
name() noexcept {
71 : materialParameters_{mpt},
72 materialExponents_{mex} {}
92 template <
typename ST>
94 auto& mu = materialParameters_;
95 auto& alpha = materialExponents_;
100 auto lambdaBar = Impl::deviatoricStretches(lambda);
101 for (
auto i : parameterRange())
102 energy += mu[i] / alpha[i] * (lambdaBar.array().pow(alpha[i]).sum() - 3);
104 auto J = lambda[0] * lambda[1] * lambda[2];
106 for (
auto i : parameterRange())
107 energy += mu[i] / alpha[i] * (lambda.array().pow(alpha[i]).sum() - 3) - mu[i] * logJ;
120 template <
typename ST>
122 auto& mu = materialParameters_;
123 auto& alpha = materialExponents_;
127 auto lambdaBar = Impl::deviatoricStretches(lambda);
128 auto dWdLambdaBar = Eigen::Array<ST, dim, 1>::Zero().eval();
130 for (
const auto j : parameterRange())
131 dWdLambdaBar += mu[j] * lambdaBar.array().pow(alpha[j] - 1);
133 const ST sumLambdaBar = (lambdaBar.array() * dWdLambdaBar).sum();
134 dWdLambda = (lambdaBar.array() * dWdLambdaBar - (1.0 / 3.0) * sumLambdaBar) / lambda.array();
136 for (
const auto j : parameterRange())
137 dWdLambda.array() += (mu[j] * (lambda.array().pow(alpha[j]) - 1)) / lambda.array();
150 template <
typename ST>
152 auto& mu = materialParameters_;
153 auto& alpha = materialExponents_;
157 const auto lambdaBar = Impl::deviatoricStretches(lambda);
160 auto lambdaBarPowSum = Eigen::Array<ST, dim, 1>::Zero().eval();
161 for (
const auto p : parameterRange())
162 lambdaBarPowSum[p] = lambdaBar.array().pow(alpha[p]).sum();
164 for (
const auto a : dimensionRange()) {
165 for (
const auto b : dimensionRange()) {
167 for (
const auto p : parameterRange())
168 dS(a, b) += mu[p] * alpha[p] * (1.0 / 3.0 * pow(lambdaBar[a], alpha[p]) + 1.0 / 9.0 * lambdaBarPowSum[p]);
171 for (
const auto p : parameterRange())
172 dS(a, b) += mu[p] * alpha[p] *
173 (-(1.0 / 3.0) * (pow(lambdaBar[a], alpha[p]) + pow(lambdaBar[b], alpha[p])) +
174 1.0 / 9.0 * lambdaBarPowSum[p]);
176 dS(a, b) *= 1.0 / (lambda[a] * lambda[b]);
178 dS(a, b) -= (2.0 / lambda[a]) * dWdLambda[a];
182 for (
const auto j : parameterRange()) {
183 dS.diagonal().array() +=
184 (-2 * mu[j] * (lambda.array().pow(alpha[j]) - 1) + mu[j] * lambda.array().pow(alpha[j]) * alpha[j]) /
185 lambda.array().square();
196 template <
typename STO>
205 inline static constexpr auto parameterRange() {
return Dune::range(
numMatParameters); }
206 inline static constexpr auto dimensionRange() {
return Dune::range(
dim); }
212template <
int n, PrincipalStretchTags tag>
Helper for the Eigen::Tensor types.
Definition of several material related enums.
helper functions used by material model implementations.
PrincipalStretchTags
A strongly typed enum class representing the type of the the principal strechts used in hyperelastic ...
Definition: tags.hh:40
constexpr std::string toString(DBCOption _e)
Definition: dirichletbcenforcement.hh:7
Definition: arrudaboyce.hh:27
Implementation of the Ogden material model.
Definition: ogden.hh:41
std::array< double, numMatParameters > MaterialParameters
Definition: ogden.hh:57
auto secondDerivativeImpl(const PrincipalStretches< ST > &lambda) const
Computes the second derivatives of the stored energy function w.r.t. the total principal stretches.
Definition: ogden.hh:151
Eigen::Vector< ST, 3 > PrincipalStretches
Definition: ogden.hh:45
auto firstDerivativeImpl(const PrincipalStretches< ST > &lambda) const
Computes the first derivative of the stored energy function w.r.t. the total principal stretches.
Definition: ogden.hh:121
static constexpr int numMatParameters
Definition: ogden.hh:48
const MaterialExponents & materialExponents() const
Returns the material exponents (alpha values) stored in the material.
Definition: ogden.hh:82
static constexpr bool usesDeviatoricStretches
Definition: ogden.hh:50
static constexpr int dim
Definition: ogden.hh:49
auto rebind() const
Rebinds the material to a different scalar type.
Definition: ogden.hh:197
OgdenT(const MaterialParameters &mpt, const MaterialExponents &mex)
Constructor for OgdenT.
Definition: ogden.hh:70
MaterialParameters materialParametersImpl() const
Returns the material parameters (mu values) stored in the material.
Definition: ogden.hh:77
Eigen::Matrix< ST, dim, dim > SecondDerivative
Definition: ogden.hh:55
std::array< double, numMatParameters > MaterialExponents
Definition: ogden.hh:58
static constexpr PrincipalStretchTags stretchTag
Definition: ogden.hh:47
Eigen::Vector< ST, dim > FirstDerivative
Definition: ogden.hh:53
ST_ ScalarType
Definition: ogden.hh:42
auto storedEnergyImpl(const PrincipalStretches< ST > &lambda) const
Computes the stored energy in the Ogden material model.
Definition: ogden.hh:93
static constexpr std::string name() noexcept
Definition: ogden.hh:60