-
Notifications
You must be signed in to change notification settings - Fork 2
/
_hyperelasticity_isotropic.py
103 lines (78 loc) · 2.51 KB
/
_hyperelasticity_isotropic.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
from ..math import det, dot, eigvals, eye, log, sqrt, sum1, sym, trace, transpose
from ._helpers import isochoric_volumetric_split
def linear_elastic(F, mu, lmbda):
strain = sym(F - eye(3))
return mu * trace(strain @ strain) + lmbda / 2 * trace(strain) ** 2
def saint_venant_kirchhoff(F, mu, lmbda):
C = transpose(F) @ F
I1 = trace(C) / 2 - 3 / 2
I2 = trace(C @ C) / 4 - trace(C) / 2 + 3 / 4
return mu * I2 + lmbda * I1**2 / 2
@isochoric_volumetric_split
def neo_hooke(F, C10):
C = transpose(F) @ F
I1 = trace(C)
return C10 * (I1 - 3)
@isochoric_volumetric_split
def mooney_rivlin(F, C10, C01=0):
C = transpose(F) @ F
I1 = trace(C)
I2 = (trace(C) ** 2 - trace(C @ C)) / 2
return C10 * (I1 - 3) + C01 * (I2 - 3)
@isochoric_volumetric_split
def yeoh(F, C10, C20=0, C30=0):
J = det(F)
C = transpose(F) @ F
I1 = J ** (-2 / 3) * trace(C)
return C10 * (I1 - 3) + C20 * (I1 - 3) ** 2 + C30 * (I1 - 3) ** 3
@isochoric_volumetric_split
def third_order_deformation(F, C10, C01=0, C11=0, C20=0, C30=0):
C = transpose(F) @ F
I1 = trace(C)
I2 = (trace(C) ** 2 - trace(C @ C)) / 2
return (
C10 * (I1 - 3)
+ C01 * (I2 - 3)
+ C11 * (I1 - 3) * (I2 - 3)
+ C20 * (I1 - 3) ** 2
+ C30 * (I1 - 3) ** 3
)
@isochoric_volumetric_split
def ogden(F, mu, alpha):
C = transpose(F) @ F
wC = eigvals(C)
out = 0
for m, a in zip(mu, alpha):
wk = wC ** (a / 2)
out += 2 * m / a**2 * (sum1(wk)[0, 0] - 3)
return out
@isochoric_volumetric_split
def arruda_boyce(F, C1, limit):
C = transpose(F) @ F
I1 = trace(C)
alpha = [1 / 2, 1 / 20, 11 / 1050, 19 / 7000, 519 / 673750]
beta = 1 / limit**2
out = 0
for i, a in enumerate(alpha):
j = i + 1
out += a * beta ** (2 * j - 2) * (I1**j - 3**j)
return C1 * out
@isochoric_volumetric_split
def extended_tube(F, Gc, delta, Ge, beta):
C = transpose(F) @ F
D = trace(C)
wC = eigvals(C)
g = (1 - delta**2) * (D - 3) / (1 - delta**2 * (D - 3))
Wc = Gc / 2 * (g + log(1 - delta**2 * (D - 3)))
We = 2 * Ge / beta**2 * sum1(wC ** (-beta / 2) - 1)
return Wc + We
@isochoric_volumetric_split
def van_der_waals(F, mu, limit, a, beta):
C = transpose(F) @ F
I1 = trace(C)
I2 = (trace(C) ** 2 - trace(C @ C)) / 2
Im = (1 - beta) * I1 + beta * I2
eta = sqrt((Im - 3) / (limit**2 - 3))
return mu * (
-(limit**2 - 3) * (log(1 - eta) + eta) - 2 / 3 * a * ((Im - 3) / 2) ** (3 / 2)
)