13#ifndef FEM_DIFFOPS_ELASTOVARIATIONALFUNCTIONALS_HH
14#define FEM_DIFFOPS_ELASTOVARIATIONALFUNCTIONALS_HH
20 namespace Elastomechanics
42 template <
class HyperelasticEnergy,
class StrainTensor>
46 using Scalar =
typename HyperelasticEnergy::Scalar;
47 static int const dim = HyperelasticEnergy::dim;
56 template <
typename... Args>
58 :
energy(std::forward<Args>(args)...)
106 for (
int i=0; i<
dim; ++i) {
135 for (
int i=0; i<
dim; ++i)
141 for (
int j=0; j<
dim; ++j)
210 for (
int i=0; i<
dim; ++i)
233 template <
int dim_,
class Scalar_=
double>
248 static int const dim = dim_;
258 :
Base(moduli), lambda(moduli.lame()), mu(moduli.shear())
284 for (
int i=0; i<
dim; ++i) {
287 for (
int j=0; j<
dim; ++j) {
291 for (
int k = 0; k <
dim; ++k) {
295 ret[i][j] += lambda*trace_ev*trace_ew + mu*ct;
308 lambda = modulus.
lame();
309 mu = modulus.
shear();
335 C[0][0] = lambda+2*mu; C[0][1] = lambda; C[0][2] = lambda;
336 C[1][0] = lambda; C[1][1] = lambda+2*mu; C[1][2] = lambda;
337 C[2][0] = lambda; C[2][1] = lambda; C[2][2] = lambda+2*mu;
338 for (
int i=3; i<6; ++i)
343 C[0][0] = lambda+2*mu; C[0][1] = lambda;
344 C[1][0] = lambda; C[1][1] = lambda+2*mu;
361 result[0] = A[0]*x[0] + A[3]*x[1] + A[4]*x[2];
362 result[1] = A[3]*x[0] + A[1]*x[1] + A[5]*x[2];
363 result[2] = A[4]*x[0] + A[5]*x[1] + A[2]*x[2];
367 result[0] = A[0]*x[0] + A[2]*x[1];
368 result[1] = A[2]*x[0] + A[1]*x[1];
396 E[3][1] = 1; E[3][3] = 1;
397 E[4][2] = 1; E[4][6] = 1;
398 E[5][5] = 1; E[5][7] = 1;
404 E[2][1] = 1; E[2][2] = 1;
428 template <
class Scalar,
int dim>
541 template <
class HyperelasticEnergy,
class StrainTensor>
546 using Scalar =
typename HyperelasticEnergy::Scalar;
548 static constexpr int dim = HyperelasticEnergy::dim;
570 for (
int i=0; i<
dim; ++i)
625 for (
int i=0; i<
dim; ++i)
626 for (
int j=0; j<=i; ++j)
633 for (
int i=0; i<
dim-1; ++i)
634 for (
int j=i+1; j<
dim; ++j)
635 sigma[i][j] = sigma[j][i];
Material parameters for isotropic linearly elastic materials.
double shear() const
Returns the shear modulus , also known as Lame's second parameter .
double lame() const
Returns the first Lame parameter .
Represents the first Piola Kirchhoff stress as known in nonlinear elasticity. The Piola-Kirchhoff str...
EnergyFunctional const & energy
typename HyperelasticEnergy::Scalar Scalar
Tensor deformationGradient() const
DEPRECATED, use deformationDerivative instead.
Tensor d0() const
d0 provides access to the current first Piola Kirchhoff stress.
FirstPiolaKirchhoffStress(EnergyFunctional const &ef)
FirstPiolaKirchhoffStress constructs first Piola Kirchhoff stress object from current state of elasti...
Tensor d2(VariationalArg< Scalar, dim, dim > const &argv, VariationalArg< Scalar, dim, dim > const &argw) const
d2 provides access to the second directional derivative (in directions of some displacement derivativ...
Tensor energyD2De(Tensor const &e) const
Tensor deformationDerivative() const
deformationGradient provides access to the current deformation derivative .
Tensor d1(VariationalArg< Scalar, dim, dim > const &arg) const
d1 provides access to the first directional derivative (in direction of some displacement derivative)...
Tensor spkStressD1(VariationalArg< Scalar, dim, dim > const &arg) const
typename EnergyFunctional::Tensor Tensor
General base class for variational functionals defined in terms of hyperelastic stored energies.
Dune::FieldMatrix< Scalar, dim, dim > Tensor
HyperelasticEnergy const & getHyperelasticEnergy() const
getHyperelasticEnergy provides read access to the stored energy density.
HyperelasticEnergy energy
Dune::FieldVector< Scalar, dim > d1(VariationalArg< Scalar, dim > const &arg) const
Computes the directional derivative of the hyperelastic stored energy density.
HyperelasticVariationalFunctional(Args &&... args)
Constructor.
HyperelasticEnergy & getHyperelasticEnergy()
Provides access to the stored energy density.
Tensor cauchyStress() const
Returns the Cauchy stress tensor corresponding to the current displacement derivative.
Tensor d2(VariationalArg< Scalar, dim > const &arg1, VariationalArg< Scalar, dim > const &arg2) const
Computes the second directional derivative of the hyperelastic stored energy density.
Tensor const & getDu() const
getDu provides read access to the current displacement derivative.
Scalar d0() const
Computes the hyperelastic stored energy density.
HyperelasticVariationalFunctional(HyperelasticEnergy const &energy_, StrainTensor const &strain_)
Constructor.
typename HyperelasticEnergy::Scalar Scalar
Tensor stress() const
Returns the 2nd Piola-Kirchhoff stress tensor corresponding to the current displacement derivative.
StrainTensor const & getStrain() const
getStrain provides read access to the current strain tensor.
void setLinearizationPoint(Tensor const &du0)
Defines the displacement derivative around which to linearize.
Convenience class for handling linear elastomechanics.
Base::Tensor d2(VariationalArg< Scalar, dim > const &arg1, VariationalArg< Scalar, dim > const &arg2) const
d2 As the base method, computes the second directional derivative of the hyperelastic stored energy d...
Dune::FieldVector< Scalar, dim > d1(VariationalArg< Scalar, dim > const &arg) const
d1 As the base method, computes the directional derivative of the hyperelastic stored energy density.
Dune::FieldMatrix< Scalar, dim *(dim+1)/2, dim *(dim+1)/2 > strainToStressMatrix() const
Returns the matrix mapping the strain tensor to the stress tensor: .
Dune::FieldMatrix< Scalar, dim *(dim+1)/2, dim *dim > displacementDerivativeToStrainMatrix() const
returns the matrix mapping the displacement derivative to the strain tensor:
ElasticModulus getElasticModuli()
Retrieve current material properties.
void setElasticModuli(ElasticModulus const &modulus)
Define material properties.
static Dune::FieldVector< Scalar, dim > mv(Dune::FieldVector< Scalar, dim *(dim+1)/2 > const &A, Dune::FieldVector< Scalar, dim > const &x)
Computes the symmetric matrix times vector product, when the matrix is compactly stored in a dim*(dim...
LameNavier(ElasticModulus const &moduli)
LameNavier()
Constructor. Both Lame constants are initialized to 1, the linearization point to .
Tensor d0() const
The linearized Green-Lagrange strain tensor .
The St. Venant-Kirchhoff material, foundation of linear elastomechanics.
Convenience class for handling orthotropic materials in linear elastomechanics.
void setLinearizationPoint(Dune::FieldMatrix< Scalar, dim, dim > const &du0_)
Defines the displacement derivative around which to linearize.
OrthotropicLameNavier(Dune::FieldMatrix< Scalar, dim, dim > const &orth_, Dune::FieldMatrix< Scalar, dim, dim > const &mat_)
Constructor.
OrthotropicLameNavier(Dune::FieldMatrix< Scalar, dim, dim > const &orth_, Dune::FieldMatrix< Scalar, dim, dim > const &mat1, Dune::FieldVector< Scalar, dim *(dim-1)/2 > const &mat2)
Constructor.
OrthotropicLameNavier()
Default constructor.
Dune::FieldVector< Scalar, dim > d1(VariationalArg< Scalar, dim > const &arg) const
Computes the elastic energy .
Scalar d0() const
Computes the elastic energy .
OrthotropicLameNavier(ElasticModulus const &p)
Default constructor.
Dune::FieldMatrix< Scalar, dim, dim > d2(VariationalArg< Scalar, dim > const &arg1, VariationalArg< Scalar, dim > const &arg2) const
Computes the local Hessian of the variational functional. For scalar functions , the values and deriv...
Dune::FieldMatrix< Scalar, dim *(dim+1)/2, dim *(dim+1)/2 > const & stiffnessMatrix() const
Returns the stiffness tensor.
T trace(Dune::FieldMatrix< T, n, n > const &A)
Matrix trace .
A class that stores values, gradients, and Hessians of evaluated shape functions.
Dune::FieldMatrix< Scalar, components, dim > derivative
The shape function's spatial derivative, a components x dim matrix.