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.
- Examples/Cross_Section_Thin.py +61 -0
- Examples/__init__.py +0 -0
- KIB_LAP/Betonbau/Bemessung_Polygon.py +667 -0
- KIB_LAP/Betonbau/Bemessung_Zust_II.py +648 -0
- KIB_LAP/Betonbau/Cross_Section_Kappa.py +925 -0
- KIB_LAP/Betonbau/Druckglied_KGV.py +179 -0
- KIB_LAP/Betonbau/Iterative_Design.py +723 -0
- KIB_LAP/Betonbau/Materialkennwerte_Beton.py +196 -0
- KIB_LAP/Betonbau/Querschnittsbreite.py +194 -0
- KIB_LAP/Betonbau/Querschnittsbreite_Kreis.py +63 -0
- KIB_LAP/Betonbau/__init__.py +2 -0
- KIB_LAP/Betonbau/beam_plate_T.py +921 -0
- KIB_LAP/Betonbau/beam_plate_T_reverse.py +915 -0
- KIB_LAP/Betonbau/beam_rectangular.py +635 -0
- KIB_LAP/Betonbau/beam_sub_section.py +9 -0
- KIB_LAP/Dynamik/Cross_Section_Properties.py +155 -0
- KIB_LAP/Dynamik/Deformation_Method.py +587 -0
- KIB_LAP/Dynamik/Duhamel_SDOF.py +221 -0
- KIB_LAP/Dynamik/FFT.py +87 -0
- KIB_LAP/Dynamik/Kontinuum_Eigenmodes.py +418 -0
- KIB_LAP/Dynamik/Kontinuum_Schwingung.py +757 -0
- KIB_LAP/Dynamik/Pendulum_Spring_Linearized.py +91 -0
- KIB_LAP/Dynamik/Pendulum_Spring_Problem.py +94 -0
- KIB_LAP/Dynamik/__init__.py +0 -0
- KIB_LAP/Examples/Cross_Section_Thin.py +61 -0
- KIB_LAP/Examples/Cross_Section_Thin_2.py +14 -0
- KIB_LAP/Examples/Plattentragwerke.py +39 -0
- KIB_LAP/Examples/Plattentragwerke_2.py +60 -0
- KIB_LAP/Examples/ShearDesign.py +28 -0
- KIB_LAP/Examples/__init__.py +0 -0
- KIB_LAP/Plattenbeulen/Plate_Design.py +276 -0
- KIB_LAP/Plattenbeulen/Ritz_Optimiert.py +658 -0
- KIB_LAP/Plattenbeulen/__init__.py +2 -0
- KIB_LAP/Plattenbeulen/dist/__init__.py +0 -0
- KIB_LAP/Plattenbeulen/plate_buckling.cpp +561 -0
- KIB_LAP/Plattenbeulen/plate_buckling_cpp.cp313-win_amd64.pyd +0 -0
- KIB_LAP/Plattenbeulen/plate_buckling_cpp.cpp +561 -0
- KIB_LAP/Plattenbeulen/setup.py +35 -0
- KIB_LAP/Plattentragwerke/Functions.cpp +326 -0
- KIB_LAP/Plattentragwerke/Functions.h +41 -0
- KIB_LAP/Plattentragwerke/NumInte.cpp +23 -0
- KIB_LAP/Plattentragwerke/NumericalIntegration.cpp +23 -0
- KIB_LAP/Plattentragwerke/PlateBendingKirchhoff.py +843 -0
- KIB_LAP/Plattentragwerke/__init__.py +1 -0
- KIB_LAP/Plattentragwerke/plate_bending.cpp +341 -0
- KIB_LAP/Plattentragwerke/plate_bending_cpp.cp313-win_amd64.pyd +0 -0
- KIB_LAP/Plattentragwerke/setup.py +39 -0
- KIB_LAP/Querschnittswerte/Querschnitt_Duenn.py +526 -0
- KIB_LAP/Querschnittswerte/__init__.py +1 -0
- KIB_LAP/STABRAUM/InputData.py +92 -0
- KIB_LAP/STABRAUM/Programm.py +1403 -0
- KIB_LAP/STABRAUM/Steifigkeitsmatrix.py +275 -0
- KIB_LAP/STABRAUM/__init__.py +3 -0
- KIB_LAP/Stahlbau/__init__.py +0 -0
- KIB_LAP/Verbundbau/Verbundtraeger_Bemessung.py +766 -0
- KIB_LAP/Verbundbau/__init__.py +0 -0
- KIB_LAP/__init__.py +4 -0
- KIB_LAP/main.py +2 -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/METADATA +25 -0
- kib_lap-0.5.dist-info/RECORD +64 -0
- kib_lap-0.5.dist-info/WHEEL +5 -0
- kib_lap-0.5.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from scipy.optimize import newton
|
|
3
|
+
import sqlite3
|
|
4
|
+
from scipy import integrate
|
|
5
|
+
from scipy.misc import derivative
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class eigenmodes:
|
|
9
|
+
def __init__(self):
|
|
10
|
+
self.num_x = 10000
|
|
11
|
+
|
|
12
|
+
self.lambda_cantilever = np.zeros(20)
|
|
13
|
+
self.a_lambda_cantilever = np.zeros(20)
|
|
14
|
+
self.j1_cantilever = np.zeros(20)
|
|
15
|
+
self.y_cantilever = np.zeros((20, self.num_x))
|
|
16
|
+
self.y_xx_cantilever = np.zeros((20, self.num_x))
|
|
17
|
+
|
|
18
|
+
self.lambda_clamped_hinged = np.zeros(20)
|
|
19
|
+
self.a_lambda_clamped_hinged = np.zeros(20)
|
|
20
|
+
self.j1_clamped_hinged = np.zeros(20)
|
|
21
|
+
self.y_clamped_hinged = np.zeros((20, self.num_x))
|
|
22
|
+
self.y_xx_clamped_hinged = np.zeros((20, self.num_x))
|
|
23
|
+
|
|
24
|
+
self.lambda_hinged_hinged = np.zeros(20)
|
|
25
|
+
self.j1_hinged_hinged = np.zeros(20)
|
|
26
|
+
self.y_hinged_hinged = np.zeros((20, self.num_x))
|
|
27
|
+
self.y_xx_hinged_hinged = np.zeros((20, self.num_x))
|
|
28
|
+
|
|
29
|
+
self.lambda_clamped_clamped = np.zeros(20)
|
|
30
|
+
self.a_lambda_clamped_clamped = np.zeros(20)
|
|
31
|
+
self.j1_clamped_clamped = np.zeros(20)
|
|
32
|
+
self.y_clamped_clamped = np.zeros((20, self.num_x))
|
|
33
|
+
self.y_xx_clamped_clamped = np.zeros((20, self.num_x))
|
|
34
|
+
|
|
35
|
+
self.J_2_hinged_hinged = np.zeros(20)
|
|
36
|
+
self.J_2_clamped_hinged = np.zeros(20)
|
|
37
|
+
self.J_2_clamped_clamped = np.zeros(20)
|
|
38
|
+
self.J_2_cantilever = np.zeros(20)
|
|
39
|
+
|
|
40
|
+
self.J_3_hinged_hinged = np.zeros(20)
|
|
41
|
+
self.J_3_clamped_hinged = np.zeros(20)
|
|
42
|
+
self.J_3_clamped_clamped = np.zeros(20)
|
|
43
|
+
self.J_3_cantilever = np.zeros(20)
|
|
44
|
+
|
|
45
|
+
# Functions for the lambda-values
|
|
46
|
+
|
|
47
|
+
def equation_cantilever_cal(self, lambda_val):
|
|
48
|
+
return np.cosh(lambda_val) * np.cos(lambda_val) + 1
|
|
49
|
+
|
|
50
|
+
def equation_clamped_hinged_cal(self, lambda_val):
|
|
51
|
+
return np.tanh(lambda_val) - np.tan(lambda_val)
|
|
52
|
+
|
|
53
|
+
def equation_hinged_hinged_cal(self, lambda_val):
|
|
54
|
+
return np.sin(lambda_val)
|
|
55
|
+
|
|
56
|
+
def equation_clamped_clamped_cal(self, lambda_val):
|
|
57
|
+
return np.cosh(lambda_val) * np.cos(lambda_val) - 1
|
|
58
|
+
|
|
59
|
+
# Functions for a lambda
|
|
60
|
+
|
|
61
|
+
def a_lambda_cantilever_cal(self, lambda_values):
|
|
62
|
+
return (np.sinh(lambda_values) + np.sin(lambda_values)) * (
|
|
63
|
+
np.cosh(lambda_values) + np.cos(lambda_values)
|
|
64
|
+
) ** (-1)
|
|
65
|
+
|
|
66
|
+
def a_lambda_clamped_hinged_cal(self, lambda_values):
|
|
67
|
+
return (np.sinh(lambda_values) - np.sin(lambda_values)) * (
|
|
68
|
+
np.cosh(lambda_values) - np.cos(lambda_values)
|
|
69
|
+
) ** (-1)
|
|
70
|
+
|
|
71
|
+
def a_lambda_hinged_hinged_cal(self, lambda_values):
|
|
72
|
+
return (lambda_values) * 0
|
|
73
|
+
|
|
74
|
+
def a_lambda_clamped_clamped_cal(self, lambda_values):
|
|
75
|
+
return (np.sinh(lambda_values) - np.sin(lambda_values)) * (
|
|
76
|
+
np.cosh(lambda_values) - np.cos(lambda_values)
|
|
77
|
+
) ** (-1)
|
|
78
|
+
|
|
79
|
+
def solving_eigenvalues(self):
|
|
80
|
+
guess_cantilever = 0
|
|
81
|
+
guess_clamped_hinged = 0
|
|
82
|
+
guess_hinged_hinged = 0
|
|
83
|
+
guess_clamped_clamped = 0
|
|
84
|
+
|
|
85
|
+
for i in range(0, 20, 1):
|
|
86
|
+
if i == 0:
|
|
87
|
+
guess_cantilever = 1.874
|
|
88
|
+
guess_clamped_hinged = 3.92
|
|
89
|
+
guess_clamped_clamped = 4.73
|
|
90
|
+
|
|
91
|
+
elif i == 1:
|
|
92
|
+
guess_cantilever = 4.68
|
|
93
|
+
guess_clamped_hinged = 7.06
|
|
94
|
+
guess_clamped_clamped = 7.85
|
|
95
|
+
elif i == 2:
|
|
96
|
+
guess_cantilever = 7.84
|
|
97
|
+
guess_clamped_hinged = 10.21
|
|
98
|
+
guess_clamped_clamped = 10.99
|
|
99
|
+
else:
|
|
100
|
+
guess_cantilever = (
|
|
101
|
+
2 * (i + 1) - 1
|
|
102
|
+
) * np.pi / 2 - 0.02 # Important: i+1, because of the formulation for the eigenfrequencies
|
|
103
|
+
guess_clamped_hinged = (
|
|
104
|
+
i + 1 + 0.25
|
|
105
|
+
) * np.pi # Otherwise the convergance for the eigenfrequencies won't work, because a lower frequency value
|
|
106
|
+
guess_clamped_clamped = (i + 1 + 0.5) * np.pi # is calculated
|
|
107
|
+
|
|
108
|
+
guess_hinged_hinged = (
|
|
109
|
+
i + 1
|
|
110
|
+
) * np.pi # The hinged-hinged always equals to i * np.pi
|
|
111
|
+
|
|
112
|
+
print(guess_hinged_hinged)
|
|
113
|
+
|
|
114
|
+
self.lambda_cantilever[i] = newton(
|
|
115
|
+
self.equation_cantilever_cal, guess_cantilever
|
|
116
|
+
)
|
|
117
|
+
self.lambda_clamped_hinged[i] = newton(
|
|
118
|
+
self.equation_clamped_hinged_cal, guess_clamped_hinged
|
|
119
|
+
)
|
|
120
|
+
self.lambda_hinged_hinged[i] = newton(
|
|
121
|
+
self.equation_hinged_hinged_cal, guess_hinged_hinged
|
|
122
|
+
)
|
|
123
|
+
self.lambda_clamped_clamped[i] = newton(
|
|
124
|
+
self.equation_clamped_clamped_cal, guess_clamped_clamped
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
def calculation_a_lambda(self):
|
|
128
|
+
for i in range(0, 20, 1):
|
|
129
|
+
self.a_lambda_cantilever[i] = self.a_lambda_cantilever_cal(
|
|
130
|
+
self.lambda_cantilever[i]
|
|
131
|
+
)
|
|
132
|
+
self.a_lambda_clamped_hinged[i] = self.a_lambda_clamped_hinged_cal(
|
|
133
|
+
self.lambda_clamped_hinged[i]
|
|
134
|
+
)
|
|
135
|
+
self.a_lambda_clamped_clamped[i] = self.a_lambda_clamped_clamped_cal(
|
|
136
|
+
self.lambda_clamped_clamped[i]
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
def calculating_j1(self):
|
|
140
|
+
self.x_values = np.linspace(0, 1, num=self.num_x)
|
|
141
|
+
for i in range(0, 20, 1):
|
|
142
|
+
for j in range(0, len(self.x_values), 1):
|
|
143
|
+
self.y_hinged_hinged[i][j] = np.sin(
|
|
144
|
+
self.lambda_hinged_hinged[i] * self.x_values[j]
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
self.y_clamped_clamped[i][j] = (
|
|
148
|
+
np.sin(self.lambda_clamped_clamped[i] * self.x_values[j])
|
|
149
|
+
- np.sinh(self.lambda_clamped_clamped[i] * self.x_values[j])
|
|
150
|
+
+ self.a_lambda_clamped_clamped[i]
|
|
151
|
+
* (
|
|
152
|
+
np.cosh(self.lambda_clamped_clamped[i] * self.x_values[j])
|
|
153
|
+
- np.cos(self.lambda_clamped_clamped[i] * self.x_values[j])
|
|
154
|
+
)
|
|
155
|
+
)
|
|
156
|
+
self.y_clamped_hinged[i][j] = (
|
|
157
|
+
np.sin(self.lambda_clamped_hinged[i] * self.x_values[j])
|
|
158
|
+
- np.sinh(self.lambda_clamped_hinged[i] * self.x_values[j])
|
|
159
|
+
+ self.a_lambda_clamped_hinged[i]
|
|
160
|
+
* (
|
|
161
|
+
np.cosh(self.lambda_clamped_hinged[i] * self.x_values[j])
|
|
162
|
+
- np.cos(self.lambda_clamped_hinged[i] * self.x_values[j])
|
|
163
|
+
)
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
self.y_cantilever[i][j] = (
|
|
167
|
+
np.sin(self.lambda_cantilever[i] * self.x_values[j])
|
|
168
|
+
- np.sinh(self.lambda_cantilever[i] * self.x_values[j])
|
|
169
|
+
+ self.a_lambda_cantilever[i]
|
|
170
|
+
* (
|
|
171
|
+
np.cosh(self.lambda_cantilever[i] * self.x_values[j])
|
|
172
|
+
- np.cos(self.lambda_cantilever[i] * self.x_values[j])
|
|
173
|
+
)
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
self.j1_hinged_hinged[i] = integrate.simps(
|
|
177
|
+
self.y_hinged_hinged[i][:] ** 2, x=self.x_values
|
|
178
|
+
)
|
|
179
|
+
self.j1_clamped_hinged[i] = integrate.simps(
|
|
180
|
+
self.y_clamped_hinged[i][:] ** 2, x=self.x_values
|
|
181
|
+
)
|
|
182
|
+
self.j1_clamped_clamped[i] = integrate.simps(
|
|
183
|
+
self.y_clamped_clamped[i][:] ** 2, x=self.x_values
|
|
184
|
+
)
|
|
185
|
+
self.j1_cantilever[i] = integrate.simps(
|
|
186
|
+
self.y_cantilever[i][:] ** 2, x=self.x_values
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
def numerical_derivative(self, data, delta_x):
|
|
190
|
+
"""
|
|
191
|
+
Compute the numerical derivative of the given data using central difference quotient.
|
|
192
|
+
:param data: List of function values.
|
|
193
|
+
:param delta_x: Spacing between the x-values.
|
|
194
|
+
:return: List of derivative values.
|
|
195
|
+
"""
|
|
196
|
+
derivative = []
|
|
197
|
+
for i in range(1, len(data) - 1):
|
|
198
|
+
df = (data[i + 1] - data[i - 1]) / (2 * delta_x)
|
|
199
|
+
derivative.append(df)
|
|
200
|
+
return derivative
|
|
201
|
+
|
|
202
|
+
def second_derivative(self, data, delta_x):
|
|
203
|
+
# Compute the first derivative
|
|
204
|
+
first_derivative = self.numerical_derivative(data, delta_x)
|
|
205
|
+
|
|
206
|
+
# Compute the second derivative from the first derivative
|
|
207
|
+
return self.numerical_derivative(first_derivative, delta_x)
|
|
208
|
+
|
|
209
|
+
def calculating_j2(self):
|
|
210
|
+
for i in range(0, 20, 1):
|
|
211
|
+
y_xx_temp_cantilever = self.second_derivative(
|
|
212
|
+
self.y_cantilever[i][:], 1 / self.num_x
|
|
213
|
+
)
|
|
214
|
+
self.y_xx_cantilever[i][2:-2] = y_xx_temp_cantilever
|
|
215
|
+
|
|
216
|
+
y_xx_temp_hinged_hinged = self.second_derivative(
|
|
217
|
+
self.y_hinged_hinged[i][:], 1 / self.num_x
|
|
218
|
+
)
|
|
219
|
+
self.y_xx_hinged_hinged[i][2:-2] = y_xx_temp_hinged_hinged
|
|
220
|
+
|
|
221
|
+
y_xx_temp_clamped_hinged = self.second_derivative(
|
|
222
|
+
self.y_clamped_hinged[i][:], 1 / self.num_x
|
|
223
|
+
)
|
|
224
|
+
self.y_xx_clamped_hinged[i][2:-2] = y_xx_temp_clamped_hinged
|
|
225
|
+
|
|
226
|
+
y_xx_temp_clamped_clamped = self.second_derivative(
|
|
227
|
+
self.y_clamped_clamped[i][:], 1 / self.num_x
|
|
228
|
+
)
|
|
229
|
+
self.y_xx_clamped_clamped[i][2:-2] = y_xx_temp_clamped_clamped
|
|
230
|
+
|
|
231
|
+
self.J_2_cantilever[i] = integrate.simps(
|
|
232
|
+
self.y_xx_cantilever[i][:] ** 2, x=self.x_values
|
|
233
|
+
)
|
|
234
|
+
self.J_2_hinged_hinged[i] = integrate.simps(
|
|
235
|
+
self.y_xx_hinged_hinged[i][:] ** 2, x=self.x_values
|
|
236
|
+
)
|
|
237
|
+
self.J_2_clamped_hinged[i] = integrate.simps(
|
|
238
|
+
self.y_xx_clamped_hinged[i][:] ** 2, x=self.x_values
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
self.J_2_clamped_clamped[i] = integrate.simps(
|
|
242
|
+
self.y_xx_clamped_clamped[i][:] ** 2, x=self.x_values
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
def calculating_j3(self):
|
|
246
|
+
for i in range(0, 20, 1):
|
|
247
|
+
self.J_3_cantilever[i] = integrate.simps(
|
|
248
|
+
self.y_cantilever[i][:], x=self.x_values
|
|
249
|
+
)
|
|
250
|
+
self.J_3_clamped_clamped[i] = integrate.simps(
|
|
251
|
+
self.y_clamped_clamped[i][:], x=self.x_values
|
|
252
|
+
)
|
|
253
|
+
self.J_3_clamped_hinged[i] = integrate.simps(
|
|
254
|
+
self.y_clamped_hinged[i][:], x=self.x_values
|
|
255
|
+
)
|
|
256
|
+
self.J_3_hinged_hinged[i] =integrate.simps(
|
|
257
|
+
self.y_hinged_hinged[i][:], x=self.x_values
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
def save_to_database(self, db_name="Database/eigenmodes.db"):
|
|
261
|
+
# Connect to the SQLite database
|
|
262
|
+
conn = sqlite3.connect(db_name)
|
|
263
|
+
cursor = conn.cursor()
|
|
264
|
+
|
|
265
|
+
# Create tables
|
|
266
|
+
cursor.execute(
|
|
267
|
+
"""
|
|
268
|
+
CREATE TABLE IF NOT EXISTS eigenvalues (
|
|
269
|
+
id INTEGER PRIMARY KEY,
|
|
270
|
+
lambda_cantilever REAL,
|
|
271
|
+
lambda_clamped_hinged REAL,
|
|
272
|
+
lambda_hinged_hinged REAL,
|
|
273
|
+
lambda_clamped_clamped REAL
|
|
274
|
+
)
|
|
275
|
+
"""
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
cursor.execute(
|
|
279
|
+
"""
|
|
280
|
+
CREATE TABLE IF NOT EXISTS a_lambda (
|
|
281
|
+
id INTEGER PRIMARY KEY,
|
|
282
|
+
a_lambda_cantilever REAL,
|
|
283
|
+
a_lambda_clamped_hinged REAL,
|
|
284
|
+
a_lambda_clamped_clamped REAL
|
|
285
|
+
)
|
|
286
|
+
"""
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
cursor.execute(
|
|
290
|
+
"""
|
|
291
|
+
CREATE TABLE IF NOT EXISTS J1 (
|
|
292
|
+
id INTEGER PRIMARY KEY,
|
|
293
|
+
J1_cantilever REAL,
|
|
294
|
+
J1_clamped_hinged REAL,
|
|
295
|
+
J1_hinged_hinged REAL,
|
|
296
|
+
J1_clamped_clamped REAL
|
|
297
|
+
)
|
|
298
|
+
"""
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
cursor.execute(
|
|
302
|
+
"""
|
|
303
|
+
CREATE TABLE IF NOT EXISTS J2 (
|
|
304
|
+
id INTEGER PRIMARY KEY,
|
|
305
|
+
J2_cantilever REAL,
|
|
306
|
+
J2_clamped_hinged REAL,
|
|
307
|
+
J2_hinged_hinged REAL,
|
|
308
|
+
J2_clamped_clamped REAL
|
|
309
|
+
)
|
|
310
|
+
"""
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
cursor.execute(
|
|
314
|
+
"""
|
|
315
|
+
CREATE TABLE IF NOT EXISTS J3 (
|
|
316
|
+
id INTEGER PRIMARY KEY,
|
|
317
|
+
J3_cantilever REAL,
|
|
318
|
+
J3_clamped_hinged REAL,
|
|
319
|
+
J3_hinged_hinged REAL,
|
|
320
|
+
J3_clamped_clamped REAL
|
|
321
|
+
)
|
|
322
|
+
"""
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
# Delete existing data to avoid duplicate entries
|
|
326
|
+
cursor.execute("DELETE FROM eigenvalues")
|
|
327
|
+
cursor.execute("DELETE FROM a_lambda")
|
|
328
|
+
cursor.execute("DELETE FROM J1")
|
|
329
|
+
cursor.execute("DELETE FROM J2")
|
|
330
|
+
cursor.execute("DELETE FROM J3")
|
|
331
|
+
|
|
332
|
+
# Insert data
|
|
333
|
+
for i in range(20):
|
|
334
|
+
cursor.execute(
|
|
335
|
+
"""
|
|
336
|
+
INSERT INTO eigenvalues (lambda_cantilever, lambda_clamped_hinged, lambda_hinged_hinged, lambda_clamped_clamped)
|
|
337
|
+
VALUES (?, ?, ?, ?)
|
|
338
|
+
""",
|
|
339
|
+
(
|
|
340
|
+
self.lambda_cantilever[i],
|
|
341
|
+
self.lambda_clamped_hinged[i],
|
|
342
|
+
self.lambda_hinged_hinged[i],
|
|
343
|
+
self.lambda_clamped_clamped[i],
|
|
344
|
+
),
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
cursor.execute(
|
|
348
|
+
"""
|
|
349
|
+
INSERT INTO a_lambda (a_lambda_cantilever, a_lambda_clamped_hinged, a_lambda_clamped_clamped)
|
|
350
|
+
VALUES (?, ?,?)
|
|
351
|
+
""",
|
|
352
|
+
(self.a_lambda_cantilever[i], self.a_lambda_clamped_hinged[i],self.a_lambda_clamped_clamped[i])
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
cursor.execute(
|
|
356
|
+
"""
|
|
357
|
+
INSERT INTO J1 (J1_cantilever, J1_clamped_hinged, J1_hinged_hinged, J1_clamped_clamped)
|
|
358
|
+
VALUES (?, ?, ?, ?)
|
|
359
|
+
""",
|
|
360
|
+
(
|
|
361
|
+
self.j1_cantilever[i],
|
|
362
|
+
self.j1_clamped_hinged[i],
|
|
363
|
+
self.j1_hinged_hinged[i],
|
|
364
|
+
self.j1_clamped_clamped[i],
|
|
365
|
+
),
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
cursor.execute(
|
|
369
|
+
"""
|
|
370
|
+
INSERT INTO J2 (J2_cantilever, J2_clamped_hinged, J2_hinged_hinged, J2_clamped_clamped)
|
|
371
|
+
VALUES (?, ?, ?, ?)
|
|
372
|
+
""",
|
|
373
|
+
(
|
|
374
|
+
self.J_2_cantilever[i],
|
|
375
|
+
self.J_2_clamped_hinged[i],
|
|
376
|
+
self.J_2_hinged_hinged[i],
|
|
377
|
+
self.J_2_clamped_clamped[i],
|
|
378
|
+
),
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
cursor.execute(
|
|
382
|
+
"""
|
|
383
|
+
INSERT INTO J3 (J3_cantilever, J3_clamped_hinged, J3_hinged_hinged, J3_clamped_clamped)
|
|
384
|
+
VALUES (?, ?, ?, ?)
|
|
385
|
+
""",
|
|
386
|
+
(
|
|
387
|
+
self.J_3_cantilever[i],
|
|
388
|
+
self.J_3_clamped_hinged[i],
|
|
389
|
+
self.J_3_hinged_hinged[i],
|
|
390
|
+
self.J_3_clamped_clamped[i],
|
|
391
|
+
),
|
|
392
|
+
)
|
|
393
|
+
|
|
394
|
+
# Commit changes and close connection
|
|
395
|
+
conn.commit()
|
|
396
|
+
conn.close()
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
test_class = eigenmodes()
|
|
400
|
+
|
|
401
|
+
test_class.solving_eigenvalues()
|
|
402
|
+
|
|
403
|
+
print("Testing for the cantilever")
|
|
404
|
+
print(test_class.lambda_cantilever)
|
|
405
|
+
print("Testing for the clamped hinged beam")
|
|
406
|
+
print(test_class.lambda_clamped_hinged)
|
|
407
|
+
|
|
408
|
+
print("Testing for the hinged hinged beam")
|
|
409
|
+
print(test_class.lambda_hinged_hinged)
|
|
410
|
+
print("Testing for the clamped clamped beam")
|
|
411
|
+
print(test_class.lambda_clamped_clamped)
|
|
412
|
+
|
|
413
|
+
test_class.calculation_a_lambda()
|
|
414
|
+
test_class.calculating_j1()
|
|
415
|
+
test_class.calculating_j2()
|
|
416
|
+
test_class.calculating_j3()
|
|
417
|
+
|
|
418
|
+
test_class.save_to_database()
|