kib-lap 0.5__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.
Files changed (64) hide show
  1. Examples/Cross_Section_Thin.py +61 -0
  2. Examples/__init__.py +0 -0
  3. KIB_LAP/Betonbau/Bemessung_Polygon.py +667 -0
  4. KIB_LAP/Betonbau/Bemessung_Zust_II.py +648 -0
  5. KIB_LAP/Betonbau/Cross_Section_Kappa.py +925 -0
  6. KIB_LAP/Betonbau/Druckglied_KGV.py +179 -0
  7. KIB_LAP/Betonbau/Iterative_Design.py +723 -0
  8. KIB_LAP/Betonbau/Materialkennwerte_Beton.py +196 -0
  9. KIB_LAP/Betonbau/Querschnittsbreite.py +194 -0
  10. KIB_LAP/Betonbau/Querschnittsbreite_Kreis.py +63 -0
  11. KIB_LAP/Betonbau/__init__.py +2 -0
  12. KIB_LAP/Betonbau/beam_plate_T.py +921 -0
  13. KIB_LAP/Betonbau/beam_plate_T_reverse.py +915 -0
  14. KIB_LAP/Betonbau/beam_rectangular.py +635 -0
  15. KIB_LAP/Betonbau/beam_sub_section.py +9 -0
  16. KIB_LAP/Dynamik/Cross_Section_Properties.py +155 -0
  17. KIB_LAP/Dynamik/Deformation_Method.py +587 -0
  18. KIB_LAP/Dynamik/Duhamel_SDOF.py +221 -0
  19. KIB_LAP/Dynamik/FFT.py +87 -0
  20. KIB_LAP/Dynamik/Kontinuum_Eigenmodes.py +418 -0
  21. KIB_LAP/Dynamik/Kontinuum_Schwingung.py +757 -0
  22. KIB_LAP/Dynamik/Pendulum_Spring_Linearized.py +91 -0
  23. KIB_LAP/Dynamik/Pendulum_Spring_Problem.py +94 -0
  24. KIB_LAP/Dynamik/__init__.py +0 -0
  25. KIB_LAP/Examples/Cross_Section_Thin.py +61 -0
  26. KIB_LAP/Examples/Cross_Section_Thin_2.py +14 -0
  27. KIB_LAP/Examples/Plattentragwerke.py +39 -0
  28. KIB_LAP/Examples/Plattentragwerke_2.py +60 -0
  29. KIB_LAP/Examples/ShearDesign.py +28 -0
  30. KIB_LAP/Examples/__init__.py +0 -0
  31. KIB_LAP/Plattenbeulen/Plate_Design.py +276 -0
  32. KIB_LAP/Plattenbeulen/Ritz_Optimiert.py +658 -0
  33. KIB_LAP/Plattenbeulen/__init__.py +2 -0
  34. KIB_LAP/Plattenbeulen/dist/__init__.py +0 -0
  35. KIB_LAP/Plattenbeulen/plate_buckling.cpp +561 -0
  36. KIB_LAP/Plattenbeulen/plate_buckling_cpp.cp313-win_amd64.pyd +0 -0
  37. KIB_LAP/Plattenbeulen/plate_buckling_cpp.cpp +561 -0
  38. KIB_LAP/Plattenbeulen/setup.py +35 -0
  39. KIB_LAP/Plattentragwerke/Functions.cpp +326 -0
  40. KIB_LAP/Plattentragwerke/Functions.h +41 -0
  41. KIB_LAP/Plattentragwerke/NumInte.cpp +23 -0
  42. KIB_LAP/Plattentragwerke/NumericalIntegration.cpp +23 -0
  43. KIB_LAP/Plattentragwerke/PlateBendingKirchhoff.py +843 -0
  44. KIB_LAP/Plattentragwerke/__init__.py +1 -0
  45. KIB_LAP/Plattentragwerke/plate_bending.cpp +341 -0
  46. KIB_LAP/Plattentragwerke/plate_bending_cpp.cp313-win_amd64.pyd +0 -0
  47. KIB_LAP/Plattentragwerke/setup.py +39 -0
  48. KIB_LAP/Querschnittswerte/Querschnitt_Duenn.py +526 -0
  49. KIB_LAP/Querschnittswerte/__init__.py +1 -0
  50. KIB_LAP/STABRAUM/InputData.py +92 -0
  51. KIB_LAP/STABRAUM/Programm.py +1403 -0
  52. KIB_LAP/STABRAUM/Steifigkeitsmatrix.py +275 -0
  53. KIB_LAP/STABRAUM/__init__.py +3 -0
  54. KIB_LAP/Stahlbau/__init__.py +0 -0
  55. KIB_LAP/Verbundbau/Verbundtraeger_Bemessung.py +766 -0
  56. KIB_LAP/Verbundbau/__init__.py +0 -0
  57. KIB_LAP/__init__.py +4 -0
  58. KIB_LAP/main.py +2 -0
  59. KIB_LAP/plate_bending_cpp.cp313-win_amd64.pyd +0 -0
  60. KIB_LAP/plate_buckling_cpp.cp313-win_amd64.pyd +0 -0
  61. kib_lap-0.5.dist-info/METADATA +25 -0
  62. kib_lap-0.5.dist-info/RECORD +64 -0
  63. kib_lap-0.5.dist-info/WHEEL +5 -0
  64. kib_lap-0.5.dist-info/top_level.txt +1 -0
@@ -0,0 +1,526 @@
1
+ import numpy as np
2
+ import pandas as pd
3
+ from tabulate import tabulate
4
+
5
+
6
+ class CrossSectionThin:
7
+ def __init__(
8
+ self,
9
+ E,
10
+ nu,
11
+ node_param,
12
+ element_param,
13
+ Speichername=None,
14
+ ):
15
+ self.x = 0
16
+ self.y = 0
17
+ self.node = 0
18
+
19
+ self.Node_Cords = 0
20
+ self.CrossSectionElements = 0
21
+ # Read the element and node input parameters
22
+ self.Node_Cords = node_param
23
+ self.CrossSectionElements = element_param
24
+
25
+
26
+
27
+ # Material parameters
28
+ self.E = E
29
+ self.nu = nu
30
+ self.G = self.E / (2 * (1 + self.nu))
31
+ # Initialize Elastic Cross Section Values
32
+
33
+ self.Speichername = Speichername
34
+
35
+ def Calculation_Start(self):
36
+ self.read_node_input()
37
+ self.CalculateElementStiffness()
38
+ self.Calculate_GesMat()
39
+ self.SolverTorsion()
40
+ self.CalculateAyzw()
41
+ self.Update_SMP()
42
+ self.Calculate_IwIt()
43
+ self.Calculate_WoWu()
44
+ self.Calculate_ShearStress_Vz()
45
+ self.Calculate_imryrzrw()
46
+ self.Export_Cross_Section_Data()
47
+
48
+
49
+ def read_node_input(self):
50
+ self.CrossSectionElements["ya"] = 0
51
+ self.CrossSectionElements["ye"] = 0
52
+ self.CrossSectionElements["ymi"] = 0
53
+ self.CrossSectionElements["za"] = 0
54
+ self.CrossSectionElements["ze"] = 0
55
+ self.CrossSectionElements["zmi"] = 0
56
+ self.CrossSectionElements["l_i"] = 0 # Längenspalte
57
+ self.CrossSectionElements["sin_bet_i"] = 0
58
+ self.CrossSectionElements["cos_bet_i"] = 0
59
+ self.CrossSectionElements["A_i"] = 0
60
+ self.CrossSectionElements["A_z_i"] = 0
61
+ self.CrossSectionElements["A_y_i"] = 0
62
+
63
+ self.CrossSectionElements["I_yy_ET"] = 0
64
+ self.CrossSectionElements["I_zz_ET"] = 0
65
+ self.CrossSectionElements["I_yz_ET"] = 0
66
+
67
+ self.CrossSectionElements["zM0"] = 0 # Schätzung für den Schubmittelpunkt
68
+ self.CrossSectionElements["yM0"] = 0
69
+ self.CrossSectionElements["rT0"] = 0
70
+
71
+ for i in range(0, len(self.CrossSectionElements["nr"]), 1):
72
+ nr_a = self.CrossSectionElements["npa"][i]
73
+ nr_e = self.CrossSectionElements["npe"][i]
74
+ # Nodal properties
75
+ ya = float(self.Node_Cords["y"][self.Node_Cords["Nr."] == nr_a])
76
+ ye = float(self.Node_Cords["y"][self.Node_Cords["Nr."] == nr_e])
77
+ za = float(self.Node_Cords["z"][self.Node_Cords["Nr."] == nr_a])
78
+ ze = float(self.Node_Cords["z"][self.Node_Cords["Nr."] == nr_e])
79
+ t = float(self.CrossSectionElements["t [m]"][i])
80
+ # Geometric properties
81
+ l = np.sqrt((ye - ya) ** 2 + (ze - za) ** 2)
82
+ sin_beta = (ze - za) / l
83
+ cos_beta = (ye - ya) / l
84
+ A = l * float(t)
85
+ # Insert in Dataframe / Dictionary
86
+ self.CrossSectionElements["A_i"][i] = A
87
+ self.CrossSectionElements["sin_bet_i"][i] = sin_beta
88
+ self.CrossSectionElements["cos_bet_i"][i] = cos_beta
89
+ self.CrossSectionElements["l_i"][i] = l
90
+
91
+ self.CrossSectionElements["ya"][i] = ya
92
+ self.CrossSectionElements["ye"][i] = ye
93
+ self.CrossSectionElements["ymi"][i] = 0.5 * (ya + ye)
94
+ self.CrossSectionElements["za"][i] = za
95
+ self.CrossSectionElements["ze"][i] = ze
96
+ self.CrossSectionElements["zmi"][i] = 0.5 * (za + ze)
97
+
98
+ self.CrossSectionElements["A_z_i"][i] = A * 0.5 * (za + ze)
99
+ self.CrossSectionElements["A_y_i"][i] = A * 0.5 * (ya + ye)
100
+
101
+ if sin_beta != 0:
102
+ self.CrossSectionElements["I_yy_ET"][i] = A / 12 * (ze - za) ** 2
103
+ else:
104
+ self.CrossSectionElements["I_yy_ET"][i] = A * t**2 / 12
105
+
106
+ if cos_beta != 0:
107
+ self.CrossSectionElements["I_zz_ET"][i] = A / 12 * (ye - ya) ** 2
108
+ else:
109
+ self.CrossSectionElements["I_zz_ET"][i] = A * t**2 / 12
110
+
111
+ self.CrossSectionElements["rT0"][i] = (
112
+ self.CrossSectionElements["ymi"][i]
113
+ - self.CrossSectionElements["yM0"][i]
114
+ ) * sin_beta - (
115
+ self.CrossSectionElements["zmi"][i]
116
+ - self.CrossSectionElements["zM0"][i]
117
+ ) * cos_beta
118
+
119
+ self.A_ges = self.CrossSectionElements["A_i"].sum()
120
+ A_z_i = self.CrossSectionElements["A_z_i"].sum()
121
+ A_y_i = self.CrossSectionElements["A_y_i"].sum()
122
+
123
+ self.ym = A_y_i / self.A_ges
124
+ self.y_re = (
125
+ max(self.CrossSectionElements["ye"].max(),self.CrossSectionElements["ya"].max())
126
+ - self.ym
127
+ )
128
+ self.y_li = (
129
+ min(self.CrossSectionElements["ye"].min(),self.CrossSectionElements["ya"].min())
130
+ - self.ym
131
+ )
132
+
133
+ self.zm = A_z_i / self.A_ges
134
+ self.z_so = (
135
+ min(self.CrossSectionElements["ze"].min(),self.CrossSectionElements["za"].min())
136
+ - self.zm
137
+ )
138
+
139
+
140
+ self.z_su = (
141
+ max(self.CrossSectionElements["ze"].max(),self.CrossSectionElements["za"].max())
142
+ -self.zm
143
+ )
144
+
145
+ self.I_yy = 0
146
+ self.I_zz = 0
147
+ self.I_yz = 0
148
+
149
+ for i in range(0, len(self.CrossSectionElements["nr"]), 1):
150
+ # I_yy
151
+ self.I_yy += self.CrossSectionElements["I_yy_ET"][i]
152
+ self.I_yy += (
153
+ self.zm - self.CrossSectionElements["zmi"][i]
154
+ ) ** 2 * self.CrossSectionElements["A_i"][i]
155
+ # I_zz
156
+ self.I_zz += self.CrossSectionElements["I_zz_ET"][i]
157
+ self.I_zz += (
158
+ self.ym - self.CrossSectionElements["ymi"][i]
159
+ ) ** 2 * self.CrossSectionElements["A_i"][i]
160
+ # I_yz
161
+
162
+
163
+ def CalculateElementStiffness(self):
164
+ K_e = np.zeros((2, 2))
165
+ f_th_e = np.zeros(2)
166
+ # Storage matrix for ther element stifness matrices
167
+ self.K_e_ges = np.zeros((len(self.CrossSectionElements["nr"]), 2, 2))
168
+ self.f_th_ges = np.zeros((len(self.CrossSectionElements["nr"]), 2, 1))
169
+ self.f_e_ges = np.zeros((len(self.CrossSectionElements["nr"]), 2, 1))
170
+
171
+ for i in range(0, len(self.CrossSectionElements["nr"]), 1):
172
+ t_el = self.CrossSectionElements["t [m]"][i]
173
+ l_el = self.CrossSectionElements["l_i"][i]
174
+
175
+ K_e[0][0] = 1 * self.G * t_el / l_el
176
+ K_e[1][1] = K_e[0][0]
177
+ K_e[1][0] = -1 * self.G * t_el / l_el
178
+ K_e[0][1] = K_e[1][0]
179
+
180
+ self.K_e_ges[i] = K_e
181
+
182
+ # Lastvektor für die Wölbordinate
183
+ r_t_el = self.CrossSectionElements["rT0"][i]
184
+ self.f_th_ges[i][0] = self.G * t_el * r_t_el * (-1)
185
+ self.f_th_ges[i][1] = self.G * t_el * r_t_el * (1)
186
+
187
+ def Calculate_GesMat(self):
188
+ no_nodes = len(self.Node_Cords["Nr."])
189
+
190
+ self.Gesmat = np.zeros((no_nodes, no_nodes))
191
+ self.GesLoadVec = np.zeros(no_nodes)
192
+
193
+ for k in range(0, len(self.CrossSectionElements["nr"]), 1):
194
+ i = int(self.CrossSectionElements["npa"][k] - 1)
195
+ j = int(self.CrossSectionElements["npe"][k] - 1)
196
+
197
+ # Stiffness matrix
198
+ self.Gesmat[i][i] += self.K_e_ges[k][0][0]
199
+ self.Gesmat[i][j] += self.K_e_ges[k][0][1]
200
+ self.Gesmat[j][i] += self.K_e_ges[k][1][0]
201
+ self.Gesmat[j][j] += self.K_e_ges[k][1][1]
202
+ # Load vector f_th
203
+ self.GesLoadVec[i] += self.f_th_ges[k][0]
204
+ self.GesLoadVec[j] += self.f_th_ges[k][1]
205
+
206
+
207
+
208
+ def SolverTorsion(self):
209
+ self.Gesmat[0][0:] = 0
210
+ self.Gesmat[1][0] = 0
211
+ self.Gesmat[0][
212
+ 0
213
+ ] = 1e30 # Einen FHG auf 1e9 setzen -> Analog zum Streichen der Zeile
214
+
215
+ self.omega_start = np.linalg.solve(self.Gesmat, self.GesLoadVec)
216
+
217
+
218
+ def CalculateAyzw(self):
219
+ num_elem = len(self.CrossSectionElements["nr"])
220
+ self.A_omega = 0
221
+ self.A_zomega = 0
222
+ self.A_yomega = 0
223
+
224
+ for k in range(0, num_elem, 1):
225
+ i = int(self.CrossSectionElements["npa"][k] - 1)
226
+ j = int(self.CrossSectionElements["npe"][k] - 1)
227
+ A_e = self.CrossSectionElements["A_i"][k]
228
+ # Omega Values
229
+ omega_a = self.omega_start[i]
230
+ omega_b = self.omega_start[j]
231
+ # y-Value Ayomega
232
+ z_a = self.CrossSectionElements["za"][k]
233
+ z_b = self.CrossSectionElements["ze"][k]
234
+ # z-Values
235
+ y_a = self.CrossSectionElements["ya"][k]
236
+ y_b = self.CrossSectionElements["ye"][k]
237
+ # Summation
238
+ self.A_omega += 0.5 * (omega_a + omega_b) * A_e
239
+ self.A_zomega += (
240
+ 1 / 6 * ((2 * z_a + z_b) * omega_a + (z_a + 2 * z_b) * omega_b) * A_e
241
+ )
242
+ self.A_yomega += (
243
+ 1 / 6 * ((2 * y_a + y_b) * omega_a + (y_a + 2 * y_b) * omega_b) * A_e
244
+ )
245
+
246
+ self.omega_k = self.A_omega / self.A_ges
247
+ self.Delta_ZM = self.A_yomega / self.I_zz * (-1) # Vorzeichen beachten!
248
+ self.Delta_YM = self.A_zomega / self.I_yy
249
+
250
+ def Update_SMP(self):
251
+ self.CrossSectionElements["zM0"] += self.Delta_ZM
252
+ self.CrossSectionElements["yM0"] += self.Delta_YM
253
+ self.CrossSectionElements["rT"] = 0
254
+ self.CrossSectionElements["omeg_a"] = 0
255
+ self.CrossSectionElements["omeg_b"] = 0
256
+
257
+ for i in range(0, len(self.CrossSectionElements["nr"]), 1):
258
+ nr_a = self.CrossSectionElements["npa"][i]
259
+ nr_e = self.CrossSectionElements["npe"][i]
260
+ # Nodal properties
261
+ ya = float(self.Node_Cords["y"][self.Node_Cords["Nr."] == nr_a])
262
+ ye = float(self.Node_Cords["y"][self.Node_Cords["Nr."] == nr_e])
263
+ za = float(self.Node_Cords["z"][self.Node_Cords["Nr."] == nr_a])
264
+ ze = float(self.Node_Cords["z"][self.Node_Cords["Nr."] == nr_e])
265
+ t = float(self.CrossSectionElements["t [m]"][i])
266
+ # Geometric properties
267
+ l = np.sqrt((ye - ya) ** 2 + (ze - za) ** 2)
268
+ sin_beta = (ze - za) / l
269
+ cos_beta = (ye - ya) / l
270
+ A = l * float(t)
271
+ self.CrossSectionElements["rT"][i] = (
272
+ self.CrossSectionElements["ymi"][i]
273
+ - self.CrossSectionElements["yM0"][i]
274
+ ) * sin_beta - (
275
+ self.CrossSectionElements["zmi"][i]
276
+ - self.CrossSectionElements["zM0"][i]
277
+ ) * cos_beta
278
+
279
+ def Calculate_IwIt(self):
280
+ ne = len(self.CrossSectionElements["nr"])
281
+ self.I_w = 0
282
+ self.I_T_OFFEN = 0
283
+ self.I_T_GESCHLOSSEN = 0
284
+ for k in range(0, ne, 1):
285
+ i = int(self.CrossSectionElements["npa"][k] - 1)
286
+ j = int(self.CrossSectionElements["npe"][k] - 1)
287
+ t = self.CrossSectionElements["t [m]"][k]
288
+ # Omega Values
289
+ y_a = self.CrossSectionElements["ya"][k]
290
+ y_e = self.CrossSectionElements["ye"][k]
291
+ z_a = self.CrossSectionElements["za"][k]
292
+ z_e = self.CrossSectionElements["ze"][k]
293
+ omega_a = (
294
+ self.omega_start[i]
295
+ - self.omega_k
296
+ + self.Delta_ZM * y_a
297
+ - self.Delta_YM * z_a
298
+ )
299
+ omega_b = (
300
+ self.omega_start[j]
301
+ - self.omega_k
302
+ + self.Delta_ZM * y_e
303
+ - self.Delta_YM * z_e
304
+ )
305
+ self.CrossSectionElements["omeg_a"][k] = omega_a
306
+ self.CrossSectionElements["omeg_b"][k] = omega_b
307
+ # I_w-Values
308
+ self.I_w += (
309
+ self.CrossSectionElements["l_i"][k]
310
+ * t
311
+ / 3
312
+ * (omega_a**2 + omega_a * omega_b + omega_b**2)
313
+ )
314
+
315
+ # Berechnung von IT_OFFEN
316
+ l = self.CrossSectionElements["l_i"][k]
317
+ t = self.CrossSectionElements["t [m]"][k]
318
+ self.I_T_OFFEN += 1 / 3 * l * t**3
319
+ # Berechnung IT_GESCHLOSSEN
320
+ l_z = z_e - z_a
321
+ l_y = y_e - y_a
322
+ yM = self.CrossSectionElements["yM0"][k]
323
+ zM = self.CrossSectionElements["zM0"][k]
324
+ r_tj = (y_a - yM) * l_z / l - (z_a - zM) * l_y / l
325
+
326
+ self.I_T_GESCHLOSSEN += r_tj * t * (r_tj * l + omega_a - omega_b)
327
+ self.I_T_GESAMT = self.I_T_GESCHLOSSEN + self.I_T_OFFEN
328
+
329
+ def Calculate_WoWu(self):
330
+ self.W_o = self.I_yy / self.z_so
331
+ self.W_u = self.I_yy / self.z_su
332
+ self.W_li = self.I_zz / self.y_li
333
+ self.W_re = self.I_zz / self.y_re
334
+
335
+ def Calculate_ShearStress_Vz(self):
336
+ # Load Vector for the Vz-Component
337
+ f_e_vz = np.zeros(2)
338
+ num_nodes = len(self.Node_Cords["Nr."])
339
+ self.f_e_vz = np.zeros(num_nodes)
340
+
341
+ num_elem = len(self.CrossSectionElements["nr"])
342
+ self.CrossSectionElements["ua_vz"] = 0
343
+ self.CrossSectionElements["ue_vz"] = 0
344
+ self.CrossSectionElements["F_a_elem"] = 0
345
+ self.CrossSectionElements["F_e_elem"] = 0
346
+
347
+ self.CrossSectionElements["tau_a_vz"] = 0
348
+ self.CrossSectionElements["tau_e_vz"] = 0
349
+
350
+ for k in range(0, num_elem, 1):
351
+ i = int(
352
+ self.CrossSectionElements["npa"][k] - 1
353
+ ) # Indices for the global load vector
354
+ j = int(self.CrossSectionElements["npe"][k] - 1)
355
+
356
+ l = self.CrossSectionElements["l_i"][k]
357
+ t = self.CrossSectionElements["t [m]"][k]
358
+
359
+ z_a = self.CrossSectionElements["za"][k] - self.zm
360
+ z_b = self.CrossSectionElements["ze"][k] - self.zm
361
+
362
+ self.f_e_vz[i] += (
363
+ (1 / 3 * z_a / self.I_yy + 1 / 6 * z_b / self.I_yy) * t * l
364
+ )
365
+ self.f_e_vz[j] += (
366
+ (1 / 6 * z_a / self.I_yy + 1 / 3 * z_b / self.I_yy) * t * l
367
+ )
368
+
369
+ self.CrossSectionElements.loc[k, "F_a_elem"] = z_a / self.I_yy
370
+ self.CrossSectionElements.loc[k, "F_e_elem"] = z_b / self.I_yy
371
+
372
+ # Solving for u_a / u_a for the vz-Component
373
+
374
+ self.u_sol = np.linalg.solve(self.Gesmat, self.f_e_vz)
375
+
376
+ # Entferne die erste Zeile und die erste Spalte der Matrix
377
+ reduced_matrix = self.Gesmat[1:, 1:]
378
+
379
+ # Entferne das erste Element des Vektors
380
+ reduced_vector = self.f_e_vz[1:]
381
+
382
+ # Löse das reduzierte Gleichungssystem
383
+ self.u_sol_red = np.linalg.solve(reduced_matrix, reduced_vector)
384
+
385
+ # Update of the nodal shear stress under a "1" load Vz
386
+ for k in range(0, num_elem, 1):
387
+ l = self.CrossSectionElements["l_i"][k]
388
+ i = int(
389
+ self.CrossSectionElements["npa"][k] - 1
390
+ ) # Indices for the global node deformation vector
391
+ j = int(self.CrossSectionElements["npe"][k] - 1)
392
+
393
+ u_a = self.u_sol[i]
394
+ u_b = self.u_sol[j]
395
+
396
+ F_a = self.CrossSectionElements["F_a_elem"][k]
397
+ F_b = self.CrossSectionElements["F_e_elem"][k]
398
+
399
+ self.CrossSectionElements["tau_a_vz"][k] = self.G / l * (
400
+ u_b - u_a
401
+ ) + l / 6 * (F_a * 2 + F_b * 1)
402
+ self.CrossSectionElements["tau_e_vz"][k] = self.G / l * (
403
+ u_b - u_a
404
+ ) - l / 6 * (F_a * 1 + F_b * 2)
405
+
406
+ def Calculate_imryrzrw(self):
407
+ """
408
+ Function to calculate the geometric lengths for \n
409
+ the calculation of geometric nonlinear problems (TH.II.Order) \n
410
+ im =
411
+ ry =
412
+ rz =
413
+ rw =
414
+ For the values im,ry,rz the different lengths are calculated relative to the elastic centrum \n
415
+ For the rw-values the length is taken from the previous calculation, which is based on the \n
416
+ shear centre. \n
417
+ """
418
+ self.CrossSectionElements["im"] = 0
419
+ self.CrossSectionElements["ry"] = 0
420
+ self.CrossSectionElements["rz"] = 0
421
+ self.CrossSectionElements["rw"] = 0
422
+ self.CrossSectionElements["Ayyy"] = 0
423
+ self.CrossSectionElements["Ayzz"] = 0
424
+ self.CrossSectionElements["Azzz"] = 0
425
+ self.CrossSectionElements["Azyy"] = 0
426
+
427
+ for k in range(0, len(self.CrossSectionElements["nr"])):
428
+ ym_t = (
429
+ self.CrossSectionElements["ymi"][k] - self.ym
430
+ ) # Transformierte Querschnittsordinaten
431
+ zm_t = self.CrossSectionElements["zmi"][k] - self.zm
432
+ dy = self.CrossSectionElements["ye"][k] - self.CrossSectionElements["ya"][k]
433
+ dz = self.CrossSectionElements["ze"][k] - self.CrossSectionElements["za"][k]
434
+ omega_m = (
435
+ self.CrossSectionElements["omeg_a"][k]
436
+ + self.CrossSectionElements["omeg_b"][k]
437
+ ) * 0.5
438
+ domega = (
439
+ self.CrossSectionElements["omeg_b"][k]
440
+ - self.CrossSectionElements["omeg_a"][k]
441
+ )
442
+
443
+ A = self.CrossSectionElements["A_i"][k]
444
+ # A_XXX Params
445
+ A_yyy = ym_t**3 * A + ym_t * dy**2 * A / 4
446
+ A_yzz = (
447
+ ym_t * zm_t**2 * A + (ym_t * dz**2 + 2 * zm_t * dy * dz) * A / 12
448
+ )
449
+ A_zzz = zm_t**3 * A + zm_t * dz**2 * A / 4
450
+ A_zyy = (
451
+ zm_t * ym_t**2 * A + (zm_t * dy**2 + 2 * ym_t * dz * dy) * A / 12
452
+ )
453
+ A_yyom = (
454
+ ym_t**2 * omega_m * A
455
+ + (omega_m * dy**2 + 2 * ym_t * dy * domega) * A / 12
456
+ )
457
+ A_zzom = (
458
+ zm_t**2 * omega_m * A
459
+ + (omega_m * dz**2 + 2 * zm_t * dz * domega) * A / 12
460
+ )
461
+
462
+ self.CrossSectionElements["Ayyy"][k] = A_yyy
463
+ self.CrossSectionElements["Azzz"][k] = A_zzz
464
+ self.CrossSectionElements["Ayzz"][k] = A_yzz
465
+ self.CrossSectionElements["Azyy"][k] = A_zyy
466
+
467
+ self.CrossSectionElements["ry"][k] = (A_yyy + A_yzz) * 1 / self.I_zz
468
+ self.CrossSectionElements["rz"][k] = (A_zzz + A_zyy) * 1 / self.I_yy
469
+ self.CrossSectionElements["rw"][k] = (A_yyom + A_zzom) * 1 / self.I_w
470
+
471
+ YM = self.CrossSectionElements["yM0"][k] - self.ym
472
+ ZM = self.CrossSectionElements["zM0"][k] - self.zm
473
+ self.y_M = YM
474
+ self.z_M = ZM
475
+
476
+ self.rz = self.CrossSectionElements["rz"].sum() - 2 * ZM
477
+ self.ry = self.CrossSectionElements["ry"].sum() - 2 * YM
478
+ self.rw = self.CrossSectionElements["rw"].sum()
479
+
480
+
481
+ def Export_Controll_Data(self):
482
+ # nr,npa,npe,t [m],ya,ye,ymi,za,ze,zmi
483
+ df_0 = pd.DataFrame(
484
+ {
485
+ "nr": self.CrossSectionElements["nr"],
486
+ "npa": self.CrossSectionElements["npa"],
487
+ "ya": self.CrossSectionElements["ya"],
488
+ "ye": self.CrossSectionElements["ye"],
489
+ }
490
+ )
491
+
492
+ def Export_Cross_Section_Data(self, _unit="cm"):
493
+ unit = _unit
494
+ if unit == "cm":
495
+ df_Data_1 = pd.DataFrame(
496
+ {
497
+ "A": [f"{self.A_ges * 100**2:.2f} cm**2"],
498
+ "Iyy": [f"{self.I_yy * 100**4:.2f} cm**4"],
499
+ "Izz": [f"{self.I_zz * 100**4:.2f} cm**4"],
500
+ "zM": [f"{self.z_M * 100:.2f} cm"],
501
+ "yM": [f"{self.y_M * 100:.2f} cm"],
502
+ }
503
+ )
504
+ df_Data_1.to_csv(
505
+ f"Querschnittswerte/CrossSectionProperties_1_{self.Speichername}.txt",
506
+ index=False,
507
+ )
508
+
509
+ df_Data_2 = pd.DataFrame(
510
+ {
511
+ "IT": [f"{self.I_T_GESAMT * 100**4:.2f}", 230.4],
512
+ "Iw": [f"{self.I_w * 100**6:.2f}", 960000],
513
+ "rz": [f"{self.rz*100:.2f}", 28.40],
514
+ },
515
+ index=["Berechnet", "Erwartet"],
516
+ )
517
+
518
+ df_Data_2.to_csv(
519
+ f"Querschnittswerte/CrossSectionProperties_{self.Speichername}.txt",
520
+ index=False,
521
+ )
522
+
523
+
524
+
525
+
526
+
@@ -0,0 +1 @@
1
+ from .Querschnitt_Duenn import CrossSectionThin
@@ -0,0 +1,92 @@
1
+ # DEPENDENCIES
2
+ import copy # Allows us to create copies of objects in memory
3
+ import math # Math functionality
4
+ import numpy as np # Numpy for working with arrays
5
+ import matplotlib.pyplot as plt # Plotting functionality
6
+ import matplotlib.colors # For colormap functionality
7
+ import ipywidgets as widgets
8
+ from glob import glob # Allows check that file exists before import
9
+ from numpy import genfromtxt # For importing structure data from csv
10
+ import pandas as pd
11
+
12
+ class Input:
13
+ def __init__(self):
14
+ print("Input-Class")
15
+ self.NodalData()
16
+ self.EdgeData()
17
+ self.RestraintData()
18
+ self.NodalForces()
19
+ self.TemperatureLoads()
20
+ self.ElementLoads()
21
+ self.MaterialData()
22
+ self.CrossSectionData()
23
+
24
+ def MaterialData(self):
25
+ try:
26
+ df = pd.read_csv("data/Material.csv")
27
+ except:
28
+ df = pd.DataFrame([0])
29
+
30
+ self.Material = df
31
+
32
+ def CrossSectionData(self):
33
+ try:
34
+ df = pd.read_csv("data/CrossSection.csv")
35
+ except:
36
+ df = pd.DataFrame([0])
37
+
38
+ self.CrossSection = df
39
+
40
+ def NodalData(self):
41
+ if glob("data/Vertices.csv"):
42
+ # Annahme: Die erste Zeile enthält Header
43
+ df = pd.read_csv("data/Vertices.csv")
44
+
45
+ # Wähle nur die numerischen Spalten aus (z.B. 'Node' und 'P[N]')
46
+ numeric_columns = ['x[m]', 'y[m]','z[m]']
47
+ df_numeric = df[numeric_columns]
48
+
49
+ self.nodes = df_numeric
50
+
51
+ print("1. 🟢 Vertices.csv imported")
52
+ else:
53
+ self.forceLocationData = []
54
+ print("1. ⚠️ Vertices.csv not found")
55
+
56
+ def EdgeData(self):
57
+ # MANDATORY IMPORT: member definitions
58
+ if glob("data/Edges.csv"):
59
+ df = pd.read_csv("data/Edges.csv")
60
+ numeric_columns = ['na', 'ne',"cs"]
61
+ df_numeric = df[numeric_columns]
62
+ self.members = df_numeric
63
+ self.nDoF = (len(self.members)+1)*7
64
+ print("2. 🟢 Edges.csv imported")
65
+ else:
66
+ print("2. 🛑 STOP: Edges.csv not found")
67
+
68
+ def RestraintData(self):
69
+ df = pd.read_csv("data/Restraint_Data.csv")
70
+ # Wähle nur die numerischen Spalten aus (z.B. 'Node' und 'P[N]')
71
+ numeric_columns = ['Node', 'Dof','Cp[MN/m]/[MNm/m]']
72
+ df_numeric = df[numeric_columns]
73
+ self.RestraintData = df_numeric
74
+
75
+ def NodalForces(self):
76
+ df = pd.read_csv("data/NodalForces.csv")
77
+ self.NodalForces = df
78
+
79
+ def ElementLoads(self):
80
+ try:
81
+ df = pd.read_csv("data/Linienlasten.csv")
82
+ except:
83
+ df = pd.DataFrame([0])
84
+
85
+ self.ElementLoads = df
86
+
87
+ def TemperatureLoads(self):
88
+ try:
89
+ df = pd.read_csv("data/TemperatureLoading.csv")
90
+ except:
91
+ df = pd.DataFrame([0])
92
+ self.TemperatureForces = df