version 0.4.6
finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021-2025 The Ikarus Developers ikarus@ibb.uni-stuttgart.de
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
10#pragma once
11
15
16namespace Ikarus::Materials {
17
30template <Concepts::VolumetricFunction VF>
32{
34 using MaterialParameter = double;
35
36 [[nodiscard]] constexpr static std::string name() noexcept { return "Volumetric function: " + VF::name(); }
37
48 template <typename VFF>
49 Volumetric(MaterialParameter matPar, VFF&& vf)
50 : matPar_{matPar},
51 volumetricFunction_{std::forward<VFF>(vf)} {}
52
56 const VolumetricFunction& volumetricFunction() const { return volumetricFunction_; }
57
61 const MaterialParameter materialParameter() const { return matPar_; }
62
70 template <typename ST>
71 ST storedEnergy(const ST& J) const {
72 return matPar_ * volumetricFunction_.storedEnergyImpl(J);
73 };
74
82 template <typename ST>
83 ST firstDerivative(const ST& J) const {
84 return matPar_ * volumetricFunction_.firstDerivativeImpl(J);
85 }
86
94 template <typename ST>
95 ST secondDerivative(const ST& J) const {
96 return matPar_ * volumetricFunction_.secondDerivativeImpl(J);
97 };
98
99private:
100 MaterialParameter matPar_;
101 VF volumetricFunction_;
102};
103
104#ifndef DOXYGEN
105template <typename VF>
106Volumetric(double, VF&&) -> Volumetric<std::remove_cvref_t<VF>>;
107#endif
108
109} // namespace Ikarus::Materials
Helper for the Eigen::Tensor types.
Material property functions and conversion utilities.
Definition: decomposehyperelastic.hh:15
Interface for the volumetric part of a hyperelastic material. Has to be parametrized with a volumetri...
Definition: finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh:32
ST firstDerivative(const ST &J) const
Computes the first derivatives of the energy of the volumetric function w.r.t .
Definition: finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh:83
Volumetric(MaterialParameter matPar, VFF &&vf)
Construct a new volumetric part.
Definition: finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh:49
const MaterialParameter materialParameter() const
Returns the material parameters stored in the deviatoric part of the material.
Definition: finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh:61
VF VolumetricFunction
Definition: finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh:33
double MaterialParameter
Definition: finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh:34
ST secondDerivative(const ST &J) const
Computes the second derivatives of the energy of the volumetric function w.r.t .
Definition: finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh:95
ST storedEnergy(const ST &J) const
Computes stored energy of the volumetric function.
Definition: finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh:71
const VolumetricFunction & volumetricFunction() const
Returns a const-reference to the underlying volumetric function.
Definition: finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh:56
static constexpr std::string name() noexcept
Definition: finiteelements/mechanics/materials/hyperelastic/volumetric/interface.hh:36
Header file including concepts for hyperelastic material models.