version 0.4.7
factory.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
23
24namespace Ikarus::Materials {
25
34inline auto makeBlatzKo(double mu) {
35 auto bk = BlatzKo(mu);
36 auto dev = Deviatoric<decltype(bk)>(bk);
37
38 return Hyperelastic(dev);
39}
40
56template <int n, PrincipalStretchTags tag, Concepts::VolumetricFunction VolumetricFunction = VF0>
57inline auto makeOgden(const typename Ogden<n, tag>::MaterialParameters& mu,
58 const typename Ogden<n, tag>::MaterialExponents alpha, double K = 0.0,
59 const VolumetricFunction& vf = VolumetricFunction{}) {
60 auto ogPre = Ogden<n, tag>(mu, alpha);
61 auto dev = Deviatoric(ogPre);
62 auto vol = Volumetric(K, vf);
63
64 return Hyperelastic(dev, vol);
65}
81template <int n, Concepts::VolumetricFunction VolumetricFunction = VF0>
83 const typename InvariantBased<n>::Exponents pex,
84 const typename InvariantBased<n>::Exponents qex, double K = 0.0,
85 const VolumetricFunction& vf = VolumetricFunction{}) {
86 auto invariantBasedPre = InvariantBased<n>(pex, qex, mu);
87 auto dev = Deviatoric(invariantBasedPre);
88 auto vol = Volumetric(K, vf);
89
90 return Hyperelastic(dev, vol);
91}
92
105template <Concepts::VolumetricFunction VolumetricFunction = VF0>
106inline auto makeMooneyRivlin(const typename InvariantBased<2>::MaterialParameters& mu, double K = 0.0,
107 const VolumetricFunction& vf = VolumetricFunction{}) {
108 typename InvariantBased<2>::Exponents pex = {1, 0};
109 typename InvariantBased<2>::Exponents qex = {0, 1};
110
111 return makeInvariantBased<2, VolumetricFunction>(mu, pex, qex, K, vf);
112}
113
126template <Concepts::VolumetricFunction VolumetricFunction = VF0>
127inline auto makeYeoh(const typename InvariantBased<3>::MaterialParameters& mu, double K = 0.0,
128 const VolumetricFunction& vf = VolumetricFunction{}) {
129 typename InvariantBased<3>::Exponents pex = {1, 2, 3};
130 typename InvariantBased<3>::Exponents qex = {0, 0, 0};
131
132 return makeInvariantBased<3, VolumetricFunction>(mu, pex, qex, K, vf);
133}
134
147template <Concepts::VolumetricFunction VolumetricFunction = VF0>
148inline auto makeArrudaBoyce(const ArrudaBoyceMatParameters& matPar, double K = 0.0,
149 const VolumetricFunction& vf = VolumetricFunction{}) {
150 auto abPre = ArrudaBoyce(matPar);
151 auto dev = Deviatoric(abPre);
152 auto vol = Volumetric(K, vf);
153
154 return Hyperelastic(dev, vol);
155}
156
169template <Concepts::VolumetricFunction VolumetricFunction = VF0>
170inline auto makeGent(const GentMatParameters& matPar, double K = 0.0,
171 const VolumetricFunction& vf = VolumetricFunction{}) {
172 auto gentPre = Gent(matPar);
173 auto dev = Deviatoric(gentPre);
174 auto vol = Volumetric(K, vf);
175
176 return Hyperelastic(dev, vol);
177}
178
185auto makePureVolumetric(const Concepts::VolumetricFunction auto& vf, double K) {
186 auto noDev = Deviatoric(NoDev{});
187 auto vol = Volumetric(K, vf);
188 return Hyperelastic(noDev, vol);
189}
190
191} // namespace Ikarus::Materials
Implementation of the volumetric part of a hyperelastic material.
Implementation of the NeoHooke material model.
Implementation of the BlatzKo material model.
Implementation of the ArrudaBoyce material model.
Implementation of the InvariantBased material model.
Implementation of the NoDev material model.
Implementation of the Ogden material model.
Implementation of the Gent material model.
Definition of several material related enums.
Definition: decomposehyperelastic.hh:15
auto makeYeoh(const typename InvariantBased< 3 >::MaterialParameters &mu, double K=0.0, const VolumetricFunction &vf=VolumetricFunction{})
A helper function to create a hyperelastic material model, where the deviatoric part is according to ...
Definition: factory.hh:127
auto makeGent(const GentMatParameters &matPar, double K=0.0, const VolumetricFunction &vf=VolumetricFunction{})
A helper function to create a hyperelastic material model, where the deviatoric part is according to ...
Definition: factory.hh:170
auto makeInvariantBased(const typename InvariantBased< n >::MaterialParameters &mu, const typename InvariantBased< n >::Exponents pex, const typename InvariantBased< n >::Exponents qex, double K=0.0, const VolumetricFunction &vf=VolumetricFunction{})
A helper function to create a hyperelastic material model, where the deviatoric part is according to ...
Definition: factory.hh:82
ArrudaBoyceT< double > ArrudaBoyce
Alias for ArrudaBoyceT with double as the default scalar type.
Definition: arrudaboyce.hh:194
auto makeMooneyRivlin(const typename InvariantBased< 2 >::MaterialParameters &mu, double K=0.0, const VolumetricFunction &vf=VolumetricFunction{})
A helper function to create a hyperelastic material model, where the deviatoric part is according to ...
Definition: factory.hh:106
BlatzKoT< double > BlatzKo
Alias for BlatzKoT with double as the default scalar type.
Definition: blatzko.hh:130
GentT< double > Gent
Alias for GentT with double as the default scalar type.
Definition: gent.hh:183
auto makeBlatzKo(double mu)
A helper function to create a hyperelastic material model, where the deviatoric part is according to ...
Definition: factory.hh:34
auto makePureVolumetric(const Concepts::VolumetricFunction auto &vf, double K)
A helper function to create a hyperelastic material model with pure volumetric functionality,...
Definition: factory.hh:185
auto makeArrudaBoyce(const ArrudaBoyceMatParameters &matPar, double K=0.0, const VolumetricFunction &vf=VolumetricFunction{})
A helper function to create a hyperelastic material model, where the deviatoric part is according to ...
Definition: factory.hh:148
auto makeOgden(const typename Ogden< n, tag >::MaterialParameters &mu, const typename Ogden< n, tag >::MaterialExponents alpha, double K=0.0, const VolumetricFunction &vf=VolumetricFunction{})
A helper function to create a hyperelastic material model, where the deviatoric part is according to ...
Definition: factory.hh:57
< Structure representing material parameters for the Arrudy-Boyce material model.
Definition: arrudaboyce.hh:21
< Structure representing material parameters for the Gent material model.
Definition: gent.hh:21
This is the interface implementation for the deviatoric part of a hyperelastic material....
Definition: finiteelements/mechanics/materials/hyperelastic/deviatoric/interface.hh:36
std::array< std::size_t, numMatParameters > Exponents
Definition: invariantbased.hh:47
std::array< double, numMatParameters > MaterialParameters
Definition: invariantbased.hh:48
Dummy class for no deviatoric function.
Definition: nodeviatoricfunction.hh:26
std::array< double, numMatParameters > MaterialParameters
Definition: ogden.hh:57
std::array< double, numMatParameters > MaterialExponents
Definition: ogden.hh:58
Implementation of a general Hyperelastic Material material model.
Definition: finiteelements/mechanics/materials/hyperelastic/interface.hh:35
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
Concept to check if the underlying function is a volumetric function.
Definition: finiteelements/mechanics/materials/hyperelastic/concepts.hh:53
Implementation of the Hyperelastic material model.
Implementation of the interface for the deviatoric part of a hyperelastic material.