kib-lap 0.5__cp313-cp313-win_amd64.whl → 0.7.7__cp313-cp313-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- KIB_LAP/Betonbau/TEST_Rectangular.py +21 -0
- KIB_LAP/Betonbau/beam_rectangular.py +4 -0
- KIB_LAP/FACHWERKEBEN/Elements.py +209 -0
- KIB_LAP/FACHWERKEBEN/InputData.py +118 -0
- KIB_LAP/FACHWERKEBEN/Iteration.py +967 -0
- KIB_LAP/FACHWERKEBEN/Materials.py +30 -0
- KIB_LAP/FACHWERKEBEN/Plotting.py +681 -0
- KIB_LAP/FACHWERKEBEN/__init__.py +4 -0
- KIB_LAP/FACHWERKEBEN/main.py +27 -0
- KIB_LAP/Plattentragwerke/PlateBendingKirchhoff.py +36 -29
- KIB_LAP/STABRAUM/InputData.py +13 -2
- KIB_LAP/STABRAUM/Output_Data.py +61 -0
- KIB_LAP/STABRAUM/Plotting.py +1453 -0
- KIB_LAP/STABRAUM/Programm.py +518 -1026
- KIB_LAP/STABRAUM/Steifigkeitsmatrix.py +338 -117
- KIB_LAP/STABRAUM/main.py +58 -0
- KIB_LAP/STABRAUM/results.py +37 -0
- KIB_LAP/Scheibe/Assemble_Stiffness.py +246 -0
- KIB_LAP/Scheibe/Element_Stiffness.py +362 -0
- KIB_LAP/Scheibe/Meshing.py +365 -0
- KIB_LAP/Scheibe/Output.py +34 -0
- KIB_LAP/Scheibe/Plotting.py +722 -0
- KIB_LAP/Scheibe/Shell_Calculation.py +523 -0
- KIB_LAP/Scheibe/Testing_Mesh.py +25 -0
- KIB_LAP/Scheibe/__init__.py +14 -0
- KIB_LAP/Scheibe/main.py +33 -0
- KIB_LAP/StabEbenRitz/Biegedrillknicken.py +757 -0
- KIB_LAP/StabEbenRitz/Biegedrillknicken_Trigeometry.py +328 -0
- KIB_LAP/StabEbenRitz/Querschnittswerte.py +527 -0
- KIB_LAP/StabEbenRitz/Stabberechnung_Klasse.py +868 -0
- KIB_LAP/plate_bending_cpp.cp313-win_amd64.pyd +0 -0
- KIB_LAP/plate_buckling_cpp.cp313-win_amd64.pyd +0 -0
- {kib_lap-0.5.dist-info → kib_lap-0.7.7.dist-info}/METADATA +1 -1
- {kib_lap-0.5.dist-info → kib_lap-0.7.7.dist-info}/RECORD +37 -19
- Examples/Cross_Section_Thin.py +0 -61
- KIB_LAP/Betonbau/Bemessung_Zust_II.py +0 -648
- KIB_LAP/Betonbau/Iterative_Design.py +0 -723
- KIB_LAP/Plattentragwerke/NumInte.cpp +0 -23
- KIB_LAP/Plattentragwerke/NumericalIntegration.cpp +0 -23
- KIB_LAP/Plattentragwerke/plate_bending_cpp.cp313-win_amd64.pyd +0 -0
- KIB_LAP/main.py +0 -2
- {Examples → KIB_LAP/StabEbenRitz}/__init__.py +0 -0
- {kib_lap-0.5.dist-info → kib_lap-0.7.7.dist-info}/WHEEL +0 -0
- {kib_lap-0.5.dist-info → kib_lap-0.7.7.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
# from Stabberechnung_Klasse import StabRitz
|
|
3
|
+
from tabulate import tabulate
|
|
4
|
+
import matplotlib.pyplot as plt
|
|
5
|
+
import pandas as pd
|
|
6
|
+
from scipy.linalg import eig
|
|
7
|
+
|
|
8
|
+
class Biegedrillknicken:
|
|
9
|
+
def __init__(self,StabRitzObjekt):
|
|
10
|
+
print("Klasse")
|
|
11
|
+
self.SG_TH_I = StabRitzObjekt #StabRitz(20, 0, 10, 1, 0, 0, 0, 0, 10, "-", "FE")
|
|
12
|
+
#self.SG_TH_I.Calculate_All()
|
|
13
|
+
print("________Berechnung Biegedrillknicken_____________")
|
|
14
|
+
# Cross Section Properties
|
|
15
|
+
self.E = self.SG_TH_I.Querschnitt.E
|
|
16
|
+
self.G = self.SG_TH_I.Querschnitt.G
|
|
17
|
+
|
|
18
|
+
self.I_zz = self.SG_TH_I.Querschnitt.I_zz
|
|
19
|
+
self.EIzz = self.E * self.I_zz
|
|
20
|
+
self.I_w = self.SG_TH_I.Querschnitt.I_w
|
|
21
|
+
self.EIw = self.E * self.I_w
|
|
22
|
+
self.I_t = self.SG_TH_I.Querschnitt.I_T_GESAMT
|
|
23
|
+
self.GIt = self.G * self.I_t
|
|
24
|
+
self.z_M = self.SG_TH_I.Querschnitt.z_M # Shear midpoint
|
|
25
|
+
self.rz = self.SG_TH_I.Querschnitt.rz
|
|
26
|
+
|
|
27
|
+
self.ho = self.SG_TH_I.Querschnitt.z_so
|
|
28
|
+
self.hu = self.SG_TH_I.Querschnitt.z_su
|
|
29
|
+
|
|
30
|
+
self.z_j = 0
|
|
31
|
+
|
|
32
|
+
print("Iy", self.SG_TH_I.Querschnitt.I_yy)
|
|
33
|
+
print("EIw",self.EIw)
|
|
34
|
+
print("IW", self.I_w)
|
|
35
|
+
print("GIT",self.GIt)
|
|
36
|
+
print("IT", self.I_t)
|
|
37
|
+
print("EIZZ",self.EIzz)
|
|
38
|
+
print("IZZ", self.I_zz)
|
|
39
|
+
print("rz", self.rz)
|
|
40
|
+
print("zM", self.z_M)
|
|
41
|
+
|
|
42
|
+
print("ho", self.ho)
|
|
43
|
+
print("hu", self.hu)
|
|
44
|
+
|
|
45
|
+
# Inner Forces (TH.I.OG)
|
|
46
|
+
self.My_x = self.SG_TH_I.m_element_inter # Vektor mit Biegemoment
|
|
47
|
+
self.l_x = self.SG_TH_I.l_x
|
|
48
|
+
self.x = self.SG_TH_I.list_lx
|
|
49
|
+
|
|
50
|
+
self.ne = self.SG_TH_I.reihen
|
|
51
|
+
|
|
52
|
+
self.K_I_IW = np.zeros(
|
|
53
|
+
(self.ne, self.ne)
|
|
54
|
+
)
|
|
55
|
+
self.K_I_IT = np.zeros((self.ne, self.ne))
|
|
56
|
+
self.K_I_EIZ = np.zeros((self.ne, self.ne))
|
|
57
|
+
|
|
58
|
+
self.K_I_GES = np.zeros((2*self.ne,2*self.ne))
|
|
59
|
+
|
|
60
|
+
self.K_II_Coupling = np.zeros((self.ne,self.ne))
|
|
61
|
+
self.K_II_Theta_s = np.zeros((self.ne,self.ne))
|
|
62
|
+
self.K_II_Theta = np.zeros((self.ne,self.ne))
|
|
63
|
+
|
|
64
|
+
self.K_II_GES = np.zeros((2*self.ne,2*self.ne))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def Calculate_All(self):
|
|
69
|
+
self.Construct_IW_Mat()
|
|
70
|
+
self.Construct_GIT_Mat()
|
|
71
|
+
self.Construct_EIZ_Mat()
|
|
72
|
+
self.Construct_K_II_Coupling_Part()
|
|
73
|
+
self.Construct_K_II_Theta_s()
|
|
74
|
+
self.Construc_K_II_Theta()
|
|
75
|
+
|
|
76
|
+
self.Construct_K_I_Ges()
|
|
77
|
+
self.Construct_K_II_ges()
|
|
78
|
+
self.Calculate_Alpha_Crit()
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def function_theta(self, x, m):
|
|
82
|
+
return np.sin(m * np.pi * x / self.l_x)
|
|
83
|
+
|
|
84
|
+
def function_theta_x(self, x, m):
|
|
85
|
+
return np.cos(m * np.pi * x / self.l_x) * m * np.pi / self.l_x
|
|
86
|
+
|
|
87
|
+
def function_theta_xx(self, x, m):
|
|
88
|
+
return np.sin(m * np.pi * x / self.l_x) * (m * np.pi / self.l_x) ** 2 * (-1)
|
|
89
|
+
|
|
90
|
+
def function_theta_xxx(self, x, m):
|
|
91
|
+
return np.sin(m * np.pi * x / self.l_x) * (m * np.pi / self.l_x) ** 3 * (-1)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def function_u(self, x, m):
|
|
95
|
+
return np.sin(m * np.pi * x / self.l_x)
|
|
96
|
+
|
|
97
|
+
def function_u_x(self, x, m):
|
|
98
|
+
return np.cos(m * np.pi * x / self.l_x) * m * np.pi / self.l_x
|
|
99
|
+
|
|
100
|
+
def function_u_xx(self, x, m):
|
|
101
|
+
return np.sin(m * np.pi * x / self.l_x) * (m * np.pi / self.l_x) ** 2 * (-1)
|
|
102
|
+
|
|
103
|
+
def function_u_xxx(self, x, m):
|
|
104
|
+
return np.sin(m * np.pi * x / self.l_x) * (m * np.pi / self.l_x) ** 3 * (-1)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def M_x(self,x,q):
|
|
108
|
+
"""
|
|
109
|
+
Test-Function to calculate the moment curve for a simple supported beam under uniform \n
|
|
110
|
+
line load \n
|
|
111
|
+
|
|
112
|
+
Args:
|
|
113
|
+
x (_type_): x-value: Input via scalar variable or vector, depending on the desired \n
|
|
114
|
+
result
|
|
115
|
+
q (_type_): Scalar variable for the line load: In MN/m or equivalent \n
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
return q * (self.l_x-x)*x * 0.5
|
|
119
|
+
|
|
120
|
+
def Construct_IW_Mat(self):
|
|
121
|
+
le = self.l_x
|
|
122
|
+
self.list_lxle = np.linspace(0, le, 1000)
|
|
123
|
+
|
|
124
|
+
for m in range(1, self.ne + 1, 1):
|
|
125
|
+
for n in range(1, self.ne + 1, 1):
|
|
126
|
+
if (m==n):
|
|
127
|
+
self.K_I_IW[m - 1][n - 1] = self.EIw * np.trapz(
|
|
128
|
+
self.function_theta_xx(self.list_lxle , m)
|
|
129
|
+
* self.function_theta_xx(self.list_lxle , n),
|
|
130
|
+
self.list_lxle
|
|
131
|
+
)
|
|
132
|
+
else:
|
|
133
|
+
self.K_I_IW[m - 1][n - 1] = 0.5 * self.EIw * np.trapz(
|
|
134
|
+
self.function_theta_xx(self.list_lxle , m)
|
|
135
|
+
* self.function_theta_xx(self.list_lxle , n),
|
|
136
|
+
self.list_lxle
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
self.K_I_IW = np.where(self.K_I_IW < 1e-9, 0, self.K_I_IW )
|
|
140
|
+
|
|
141
|
+
# print(self.K_I_IW )
|
|
142
|
+
|
|
143
|
+
def Construct_GIT_Mat(self):
|
|
144
|
+
le = self.l_x
|
|
145
|
+
self.list_lxle = np.linspace(0, le, 1000)
|
|
146
|
+
for m in range(1, self.ne + 1, 1):
|
|
147
|
+
for n in range(1, self.ne + 1, 1):
|
|
148
|
+
if (m==n):
|
|
149
|
+
self.K_I_IT[m - 1][n - 1] = self.GIt * np.trapz(
|
|
150
|
+
self.function_theta_x(self.list_lxle , m)
|
|
151
|
+
* self.function_theta_x(self.list_lxle , n),
|
|
152
|
+
self.list_lxle
|
|
153
|
+
)
|
|
154
|
+
else:
|
|
155
|
+
self.K_I_IT[m - 1][n - 1] = 0.5 * self.GIt * np.trapz(
|
|
156
|
+
self.function_theta_x(self.list_lxle , m)
|
|
157
|
+
* self.function_theta_x(self.list_lxle , n),
|
|
158
|
+
self.list_lxle
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
self.K_I_IT = np.where(self.K_I_IT < 1e-9, 0, self.K_I_IT )
|
|
162
|
+
|
|
163
|
+
# print(self.K_I_IT )
|
|
164
|
+
|
|
165
|
+
def Construct_EIZ_Mat(self):
|
|
166
|
+
le = self.l_x
|
|
167
|
+
self.list_lxle = np.linspace(0, le, 1000)
|
|
168
|
+
for m in range(1, self.ne + 1, 1):
|
|
169
|
+
for n in range(1, self.ne + 1, 1):
|
|
170
|
+
if (m == n):
|
|
171
|
+
self.K_I_EIZ[m - 1][n - 1] = self.EIzz * np.trapz(
|
|
172
|
+
self.function_u_xx(self.list_lxle , m)
|
|
173
|
+
* self.function_u_xx(self.list_lxle , n),
|
|
174
|
+
self.list_lxle
|
|
175
|
+
)
|
|
176
|
+
else:
|
|
177
|
+
self.K_I_EIZ[m - 1][n - 1] = 0.5 * self.EIzz * np.trapz(
|
|
178
|
+
self.function_u_xx(self.list_lxle , m)
|
|
179
|
+
* self.function_u_xx(self.list_lxle , n),
|
|
180
|
+
self.list_lxle
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
self.K_I_EIZ = np.where(self.K_I_EIZ < 1e-9, 0, self.K_I_EIZ )
|
|
184
|
+
|
|
185
|
+
# print(self.K_I_EIZ)
|
|
186
|
+
|
|
187
|
+
def Construct_K_II_Coupling_Part(self):
|
|
188
|
+
"""
|
|
189
|
+
Note: The stiffness matrix comes from the derivative of 1/2 * PI \n
|
|
190
|
+
Therefore 1/2 * 2 = 1 for the calculation of the stiffness matrices, \n
|
|
191
|
+
in accordance to the stiffness matrices for the theory of first order \n
|
|
192
|
+
"""
|
|
193
|
+
le = self.l_x / self.ne
|
|
194
|
+
# print(le)
|
|
195
|
+
|
|
196
|
+
for i in range(0,self.ne,1):
|
|
197
|
+
for m in range(1, self.ne + 1, 1):
|
|
198
|
+
self.list_lxle = np.linspace(le*(i), le*(i+1), 2)
|
|
199
|
+
for n in range(1, self.ne + 1, 1):
|
|
200
|
+
self.K_II_Coupling[m - 1][n - 1] += np.trapz(
|
|
201
|
+
self.My_x[i] *
|
|
202
|
+
self.function_u_xx(self.list_lxle , m)
|
|
203
|
+
* self.function_theta(self.list_lxle , n),
|
|
204
|
+
self.list_lxle
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
self.M_max = self.My_x.max()
|
|
208
|
+
self.K_II_Coupling = np.where(abs(self.K_II_Coupling) < 1e-9, 0, self.K_II_Coupling)
|
|
209
|
+
|
|
210
|
+
def Construct_K_II_Theta_s(self):
|
|
211
|
+
"""
|
|
212
|
+
Function to construct the stiffness component for the
|
|
213
|
+
"""
|
|
214
|
+
le = self.l_x / self.ne
|
|
215
|
+
|
|
216
|
+
for i in range(0,self.ne,1):
|
|
217
|
+
for m in range(1, self.ne + 1, 1):
|
|
218
|
+
self.list_lxle = np.linspace(le*(i), le*(i+1), 2)
|
|
219
|
+
for n in range(1, self.ne + 1, 1):
|
|
220
|
+
if (m == n):
|
|
221
|
+
self.K_II_Theta_s[m-1][n-1] += self.rz *np.trapz(
|
|
222
|
+
self.My_x[i]
|
|
223
|
+
*self.function_theta_x(self.list_lxle , m)
|
|
224
|
+
* self.function_theta_x(self.list_lxle , n),
|
|
225
|
+
self.list_lxle
|
|
226
|
+
)
|
|
227
|
+
else:
|
|
228
|
+
self.K_II_Theta_s[m-1][n-1] += 0.5* self.rz *np.trapz(
|
|
229
|
+
self.My_x[i]
|
|
230
|
+
*self.function_theta_x(self.list_lxle , m)
|
|
231
|
+
* self.function_theta_x(self.list_lxle , n),
|
|
232
|
+
self.list_lxle
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
self.K_II_Theta_s = np.where(abs(self.K_II_Theta_s) < 1e-9, 0, self.K_II_Theta_s)
|
|
236
|
+
|
|
237
|
+
# print(self.K_II_Theta_s)
|
|
238
|
+
|
|
239
|
+
def Construc_K_II_Theta(self):
|
|
240
|
+
"""
|
|
241
|
+
Function to construct the stiffness component for the influence of the \n
|
|
242
|
+
load parts, which is stationed in a distance to the non torsional cross section center \n
|
|
243
|
+
"""
|
|
244
|
+
le = self.l_x
|
|
245
|
+
self.list_lxle = np.linspace(0, le, 1000)
|
|
246
|
+
for m in range(1, self.ne + 1, 1):
|
|
247
|
+
for n in range(1, self.ne + 1, 1):
|
|
248
|
+
self.K_II_Theta[m-1][n-1] = 0 * np.trapz(
|
|
249
|
+
0.1 * self.z_j *
|
|
250
|
+
self.function_theta(self.list_lxle , m)
|
|
251
|
+
* self.function_theta(self.list_lxle , n),
|
|
252
|
+
self.list_lxle
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
self.K_II_Theta = np.where(abs(self.K_II_Theta) < 1e-9, 0, self.K_II_Theta)
|
|
256
|
+
|
|
257
|
+
# print(self.K_II_Theta)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
def Construct_K_I_Ges(self):
|
|
261
|
+
self.K_I_GES[0:self.ne,0:self.ne] = self.K_I_EIZ
|
|
262
|
+
self.K_I_GES[self.ne:2*self.ne,self.ne:2*self.ne] = self.K_I_IW + self.K_I_IT
|
|
263
|
+
|
|
264
|
+
# print(tabulate(self.K_I_GES))
|
|
265
|
+
|
|
266
|
+
def Construct_K_II_ges(self):
|
|
267
|
+
self.K_II_GES[self.ne:2*self.ne, 0:self.ne] = self.K_II_Coupling
|
|
268
|
+
self.K_II_GES[0:self.ne, self.ne:2*self.ne] = self.K_II_Coupling
|
|
269
|
+
self.K_II_GES[self.ne:2*self.ne,self.ne:2*self.ne] = (self.K_II_Theta_s + self.K_II_Theta)*(-1)
|
|
270
|
+
|
|
271
|
+
# print(tabulate(self.K_II_GES))
|
|
272
|
+
|
|
273
|
+
def Export_ElementStiffness_Complete(self, n_elem, name):
|
|
274
|
+
Matrix = self.K_I_IW[n_elem].round(2)
|
|
275
|
+
df = pd.DataFrame(Matrix, index=[1, 2, 3, 4])
|
|
276
|
+
df.to_csv(
|
|
277
|
+
f"Checks/Data/ElementStiffness_{name}_{n_elem}_IW.csv",
|
|
278
|
+
header=False,
|
|
279
|
+
index=[1, 2, 3, 4],
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
Matrix = self.K_I_IT[n_elem].round(2)
|
|
283
|
+
df = pd.DataFrame(Matrix)
|
|
284
|
+
df.to_csv(
|
|
285
|
+
f"Checks/Data/ElementStiffness_{name}_{n_elem}_IT.csv",
|
|
286
|
+
header=False,
|
|
287
|
+
index=[1, 2, 3, 4],
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
Matrix = self.K_I_EIZ[n_elem].round(2)
|
|
291
|
+
df = pd.DataFrame(Matrix)
|
|
292
|
+
df.to_csv(
|
|
293
|
+
f"Checks/Data/ElementStiffness_{name}_{n_elem}_KIITHET.csv",
|
|
294
|
+
header=False,
|
|
295
|
+
index=[1, 2, 3, 4],
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def Calculate_Alpha_Crit(self):
|
|
300
|
+
alpha_crit, eigenmodes = eig(self.K_I_GES,self.K_II_GES)
|
|
301
|
+
|
|
302
|
+
# Extraktion der positiven Werte
|
|
303
|
+
positive_alpha_crit = np.sort(alpha_crit[alpha_crit > 0])
|
|
304
|
+
# Extraktion der negativen Werte
|
|
305
|
+
negative_alpha_crit = np.sort(alpha_crit[alpha_crit < 0])[::-1] # Sortiere absteigend
|
|
306
|
+
|
|
307
|
+
# print("Sortierte positive Werte:", positive_alpha_crit)
|
|
308
|
+
# print("Sortierte negative Werte:", negative_alpha_crit)
|
|
309
|
+
print("alpha_crit",positive_alpha_crit.min())
|
|
310
|
+
print("Maximales Moment ", self.M_max)
|
|
311
|
+
print("Mcr", positive_alpha_crit.min() *self.M_max )
|
|
312
|
+
|
|
313
|
+
self.alpha_crit_res = positive_alpha_crit.min()
|
|
314
|
+
self.M_cr_res = positive_alpha_crit.min() *self.M_max
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def Export_Results(self,path = "Checks/Data/Testing_Examples/Example_1.csv"):
|
|
318
|
+
df = pd.DataFrame({
|
|
319
|
+
"acrit": [round(self.alpha_crit_res.real,2)],
|
|
320
|
+
"Mcr": [round(self.M_cr_res.real,2)]
|
|
321
|
+
}, index = None)
|
|
322
|
+
df.to_csv(path, header = [r"$a_{crit}$", r"$M_{cr}$ in [MNm]"])
|
|
323
|
+
print(df)
|
|
324
|
+
|
|
325
|
+
# BDK = Biegedrillknicken()
|
|
326
|
+
# BDK.Calculate_All()
|
|
327
|
+
|
|
328
|
+
# BDK.Export_Results("Checks/Data/Testing_Examples/Example_2.csv")
|