version 0.4.1
mueslimaterials.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
12#if ENABLE_MUESLI
13
17
18namespace Ikarus::Materials {
19
27template <Concepts::MPTuple MPT>
28inline auto makeMuesliLinearElasticity(const MPT& mpt) {
29 auto muesliParameters = propertiesFromIkarusMaterialParameters(mpt);
30 return SmallStrain<muesli::elasticIsotropicMaterial>(muesliParameters);
31}
32
41template <Concepts::MPTuple MPT>
42inline auto makeMuesliNeoHooke(const MPT& mpt, bool useDeviatoricStretches = false) {
43 auto muesliParameters = propertiesFromIkarusMaterialParameters(mpt);
44 if (useDeviatoricStretches)
45 addTag(muesliParameters, "subtype regularized");
46 return FiniteStrain<muesli::neohookeanMaterial>(muesliParameters);
47}
48
56template <Concepts::MPTuple MPT>
57inline auto makeMuesliSVK(const MPT& mpt) {
58 auto muesliParameters = propertiesFromIkarusMaterialParameters(mpt);
59 return FiniteStrain<muesli::svkMaterial>(muesliParameters);
60}
61
71inline auto makeMuesliArrudaBoyce(double C1, double lambda_m, double K, bool compressible = true) {
72 auto muesliParameters = muesli::materialProperties{};
73 muesliParameters.insert({"c1", C1});
74 muesliParameters.insert({"lambdam", lambda_m});
75 muesliParameters.insert({"bulk", K});
76 if (compressible)
77 addTag(muesliParameters, "compressible");
78 return FiniteStrain<muesli::arrudaboyceMaterial>(muesliParameters);
79}
80
89inline auto makeMuesliYeoh(std::array<double, 3> C, double K, bool compressible = true) {
90 auto muesliParameters = muesli::materialProperties{};
91 muesliParameters.insert({"c1", C[0]});
92 muesliParameters.insert({"c2", C[1]});
93 muesliParameters.insert({"c3", C[2]});
94 muesliParameters.insert({"bulk", K});
95 if (compressible)
96 addTag(muesliParameters, "compressible");
97 return FiniteStrain<muesli::yeohMaterial>(muesliParameters);
98}
99
107inline auto makeMooneyRivlin(std::array<double, 3> alpha, bool incompressible = false) {
108 auto muesliParameters = muesli::materialProperties{};
109 muesliParameters.insert({"alpha0", alpha[0]});
110 muesliParameters.insert({"alpha1", alpha[1]});
111 muesliParameters.insert({"alpha2", alpha[2]});
112 if (incompressible)
113 addTag(muesliParameters, "incompressible");
114 return FiniteStrain<muesli::mooneyMaterial>(muesliParameters);
115}
116
117} // namespace Ikarus::Materials
118
119#else
120 #error Muesli materials depends on the Muesli library, which is not included
121#endif
Definition: arrudaboyce.hh:27
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