version 0.4.1
factory.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021-2025 The Ikarus Developers mueller@ibb.uni-stuttgart.de
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
10#pragma once
11
22
23namespace Ikarus::Materials {
24
33inline auto makeBlatzKo(double mu) {
34 auto bk = BlatzKo(mu);
35 auto dev = Deviatoric<decltype(bk)>(bk);
36
37 return Hyperelastic(dev);
38}
39
55template <int n, PrincipalStretchTags tag, typename VolumetricFunction = VF0>
56inline auto makeOgden(const typename Ogden<n, tag>::MaterialParameters& mu,
57 const typename Ogden<n, tag>::MaterialExponents alpha, double K = 0.0,
58 const VolumetricFunction& vf = VolumetricFunction{}) {
59 auto ogPre = Ogden<n, tag>(mu, alpha);
60 auto dev = Deviatoric(ogPre);
61 auto vol = Volumetric(K, vf);
62
63 return Hyperelastic(dev, vol);
64}
80template <int n, typename VolumetricFunction = VF0>
82 const typename InvariantBased<n>::Exponents pex,
83 const typename InvariantBased<n>::Exponents qex, double K = 0.0,
84 const VolumetricFunction& vf = VolumetricFunction{}) {
85 auto invariantBasedPre = InvariantBased<n>(pex, qex, mu);
86 auto dev = Deviatoric(invariantBasedPre);
87 auto vol = Volumetric(K, vf);
88
89 return Hyperelastic(dev, vol);
90}
91
104template <typename VolumetricFunction = VF0>
105inline auto makeMooneyRivlin(const typename InvariantBased<2>::MaterialParameters& mu, double K = 0.0,
106 const VolumetricFunction& vf = VolumetricFunction{}) {
107 typename InvariantBased<2>::Exponents pex = {1, 0};
108 typename InvariantBased<2>::Exponents qex = {0, 1};
109
110 return makeInvariantBased<2, VolumetricFunction>(mu, pex, qex, K, vf);
111}
112
125template <typename VolumetricFunction = VF0>
126inline auto makeYeoh(const typename InvariantBased<3>::MaterialParameters& mu, double K = 0.0,
127 const VolumetricFunction& vf = VolumetricFunction{}) {
128 typename InvariantBased<3>::Exponents pex = {1, 2, 3};
129 typename InvariantBased<3>::Exponents qex = {0, 0, 0};
130
131 return makeInvariantBased<3, VolumetricFunction>(mu, pex, qex, K, vf);
132}
133
146template <typename VolumetricFunction = VF0>
147inline auto makeArrudaBoyce(const ArrudaBoyceMatParameters& matPar, double K = 0.0,
148 const VolumetricFunction& vf = VolumetricFunction{}) {
149 auto abPre = ArrudaBoyce(matPar);
150 auto dev = Deviatoric(abPre);
151 auto vol = Volumetric(K, vf);
152
153 return Hyperelastic(dev, vol);
154}
155
168template <typename VolumetricFunction = VF0>
169inline auto makeGent(const GentMatParameters& matPar, double K = 0.0,
170 const VolumetricFunction& vf = VolumetricFunction{}) {
171 auto gentPre = Gent(matPar);
172 auto dev = Deviatoric(gentPre);
173 auto vol = Volumetric(K, vf);
174
175 return Hyperelastic(dev, vol);
176}
177} // namespace Ikarus::Materials
Definition of several material related enums.
Implementation of the Gent material model.
Implementation of the ArrudaBoyce material model.
Implementation of the BlatzKo material model.
Implementation of the InvariantBased material model.
Implementation of the Ogden material model.
Implementation of the NeoHooke material model.
Implementation of the volumetric part of a hyperelastic material.
Definition: arrudaboyce.hh:27
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:126
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:169
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:81
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:105
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:33
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:147
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:56
< 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
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
Implementation of the Hyperelastic material model.
Implementation of the interface for the deviatoric part of a hyperelastic material.