-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsavei.py
More file actions
459 lines (409 loc) · 20.1 KB
/
savei.py
File metadata and controls
459 lines (409 loc) · 20.1 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
import tkinter as tk
from tkinter import *
from tkinter import ttk
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image, ImageTk
def math(): # computing
# get input values
gas = gas_input.get() # gas type options
rho = float(rho_input.get()) # particle density
To_C = float(To_input.get()) # gas temperature
ER = float(ER_input.get()) # expansion ratio
Tm_C = float(Tm_input.get()) # melting temp
dp = float(dp_input.get()) # particle size
Lex = float(Lex_input.get()) # expansion region length
Po = float(Po_input.get()) # gas pressure
Cp = float(Cp_input.get()) # particle specific heat
uts_Pa = float(uts_input.get()) # tensile strength
dp_min = dp * 0.9 # particle size +-10%
dp_max = dp * 1.1
To = To_C + 273.15 # c to k
Tm = Tm_C + 273.15
uts = uts_Pa * 1000000 # pa to mpa
k_min = 0.5 # assume fitting parameter range
k_max = 0.7
k = (k_min + k_max) / 2 # best line of fit
CVR_min = 1.5 # ~range for erosive effects
CVR_max = 3
CVR = (CVR_min + CVR_max) / 2
# generate temp and pressure range
K = np.linspace(20+273.15, Tm, 1000) # in kelvin
P = np.linspace(5, 70, 1000)
d = np.linspace(5, 100, 1000)
# call n define equations based on gas type
if gas == 'Helium':
def v_he(dp, rho, ER, Lex, Po, To): # particle impact velocity
eq1 = -389.3 + 91760.3 * ((dp * rho) ** -0.402) + \
4.133 * Po + 0.357 * To - 0.00282 * rho + 1653 * Lex - \
12.85 * ER + 0.0056 * Po * dp - 0.00257 * To * dp
return eq1
v = v_he(dp, rho, ER, Lex, Po, To) # prediction
trend = [v_he(dp, rho, ER, Lex, Po, To) for To in K] # trendline plot1
trend2 = [v_he(dp, rho, ER, Lex, Po, To)
for Po in P] # trendline plot2
trend3 = [v_he(dp, rho, ER, Lex, Po, To)for dp in d] # trendline plot3
plt.subplot(1, 3, 1)
plt.fill_between(K - 273.15, [v_he(dp_min, rho, ER, Lex, Po, To) for To in K],
[v_he(dp_max, rho, ER, Lex, Po, To) for To in K],
alpha=0.2) # plot1 range of error
plt.subplot(1, 3, 2)
plt.fill_between(P, [v_he(dp_min, rho, ER, Lex, Po, To) for Po in P],
[v_he(dp_max, rho, ER, Lex, Po, To) for Po in P],
alpha=0.2) # plot2 range of error
plt.subplot(1, 3, 3)
plt.fill_between(d, [v_he(dp_min, rho, ER, Lex, Po, To) for dp_min in d],
[v_he(dp_max, rho, ER, Lex, Po, To) for dp_max in d],
alpha=0.2) # plot3 range of error
def Tp_he(dp, rho, ER, Lex, Po, To, Cp): # particle impact temp
eq2 = -103.29 - 858.46 * ((rho / dp ** 3) ** -0.151) + 337.7 * \
((rho / dp ** 3) ** -0.302) - 68.93 * ((rho / dp ** 3) ** -0.453) + \
0.019 * Po + 0.577 * To - 494.4 * Lex - 3.998 * ER + \
61.996 * ((Cp * dp ** 3) ** 0.1522)
return eq2
def vcr_he(k, Cp, Tm, Tp_he, uts, rho): # critical impact velocity
eq3 = k * np.sqrt(Cp * (Tm - Tp_he) + 16 *
(uts / rho) * ((Tm - Tp_he) / (Tm - 293)))
return eq3
vcr = vcr_he(k, Cp, Tm, Tp_he(dp, rho, ER, Lex,
Po, To, Cp), uts, rho) # prediction
trend_cr = [vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho) for To in K] # trendline plot1
trend_cr2 = [vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho) for Po in P] # trendline plot2
trend_cr3 = [vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho) for dp in d] # trendline plot3
plt.subplot(1, 3, 1)
plt.fill_between(K - 273.15,
[vcr_he(k_min, Cp, Tm, Tp_he(dp, rho, ER, Lex,
Po, To, Cp), uts, rho) for To in K],
[vcr_he(k_max, Cp, Tm, Tp_he(dp, rho, ER, Lex,
Po, To, Cp), uts, rho) for To in K],
alpha=0.2) # plot1 range of error
plt.subplot(1, 3, 2)
plt.fill_between(P,
[vcr_he(k_min, Cp, Tm, Tp_he(dp_min, rho, ER, Lex,
Po, To, Cp), uts, rho) for Po in P],
[vcr_he(k_max, Cp, Tm, Tp_he(dp_max, rho, ER, Lex,
Po, To, Cp), uts, rho) for Po in P],
alpha=0.2) # plot2 range of error
plt.subplot(1, 3, 3)
plt.fill_between(d,
[vcr_he(k_min, Cp, Tm, Tp_he(dp_min, rho, ER, Lex,
Po, To, Cp), uts, rho) for dp_min in d],
[vcr_he(k_max, Cp, Tm, Tp_he(dp_max, rho, ER, Lex,
Po, To, Cp), uts, rho) for dp_max in d],
alpha=0.2) # plot3 range of error
def ver_he(CVR, vcr): # erosion impact velocity
eq4 = CVR * vcr # CVR = v/vcr -- critical velocity ratio
return eq4
ver = ver_he(CVR, vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) # prediction
trend_er = [ver_he(CVR, vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for To in K] # trendline plot1
trend_er2 = [ver_he(CVR, vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for Po in P] # trendline plot1
trend_er3 = [ver_he(CVR, vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for dp in d] # trendline plot3
plt.subplot(1, 3, 1)
plt.fill_between(K - 273.15,
[ver_he(CVR_min, vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for To in K],
[ver_he(CVR_max, vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for To in K],
alpha=0.2) # plot1 range of error
plt.subplot(1, 3, 2)
plt.fill_between(P,
[ver_he(CVR_min, vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for Po in P],
[ver_he(CVR_max, vcr_he(k, Cp, Tm, Tp_he(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for Po in P],
alpha=0.2) # plot2 range of error
plt.subplot(1, 3, 3)
plt.fill_between(d,
[ver_he(CVR_min, vcr_he(k, Cp, Tm, Tp_he(
dp_min, rho, ER, Lex, Po, To, Cp), uts, rho)) for dp_min in d],
[ver_he(CVR_max, vcr_he(k, Cp, Tm, Tp_he(
dp_max, rho, ER, Lex, Po, To, Cp), uts, rho)) for dp_max in d],
alpha=0.2) # plot3 range of error
elif gas == 'Nitrogen':
def v_n(dp, rho, ER, Lex, Po, To):
eq1 = -713.4 + 30661 * ((dp * rho) ** -0.264) - \
190739 * ((dp * rho) ** -0.528) + 1.15 * Po + 0.254 * To + \
0.003 * rho + 800 * Lex - 4.65 * ER + 0.019 * dp * Po - \
0.0011 * dp * To
return eq1
v = v_n(dp, rho, ER, Lex, Po, To)
trend = [v_n(dp, rho, ER, Lex, Po, To) for To in K]
trend2 = [v_n(dp, rho, ER, Lex, Po, To) for Po in P]
trend3 = [v_n(dp, rho, ER, Lex, Po, To) for dp in d]
plt.subplot(1, 3, 1)
plt.fill_between(K - 273.15, [v_n(dp_min, rho, ER, Lex, Po, To) for To in K],
[v_n(dp_max, rho, ER, Lex, Po, To) for To in K], alpha=0.2)
plt.subplot(1, 3, 2)
plt.fill_between(P, [v_n(dp_min, rho, ER, Lex, Po, To) for Po in P],
[v_n(dp_max, rho, ER, Lex, Po, To) for Po in P], alpha=0.2)
plt.subplot(1, 3, 3)
plt.fill_between(d, [v_n(dp_min, rho, ER, Lex, Po, To) for dp_min in d],
[v_n(dp_max, rho, ER, Lex, Po, To) for dp_max in d], alpha=0.2)
def Tp_n(dp, rho, ER, Lex, Po, To, Cp):
eq2 = 75.4 + 5.368 * np.log(dp) + 0.205 * To + 0.161 * To * np.log(dp) - \
0.071 * Po - 0.0057 * rho - 307.7 * Lex - 2.04 * ER
return eq2
def vcr_n(k, Cp, Tm, Tp_n, uts, rho):
eq3 = k * np.sqrt(Cp * (Tm - Tp_n) + 16 *
(uts / rho) * ((Tm - Tp_n) / (Tm - 293)))
return eq3
vcr = vcr_n(k, Cp, Tm, Tp_n(dp, rho, ER, Lex, Po, To, Cp), uts, rho)
trend_cr = [vcr_n(k, Cp, Tm, Tp_n(dp, rho, ER, Lex,
Po, To, Cp), uts, rho) for To in K]
trend_cr2 = [vcr_n(k, Cp, Tm, Tp_n(
dp, rho, ER, Lex, Po, To, Cp), uts, rho) for Po in P]
trend_cr3 = [vcr_n(k, Cp, Tm, Tp_n(
dp, rho, ER, Lex, Po, To, Cp), uts, rho) for dp in d]
plt.subplot(1, 3, 1)
plt.fill_between(K - 273.15,
[vcr_n(k_min, Cp, Tm, Tp_n(dp, rho, ER, Lex,
Po, To, Cp), uts, rho) for To in K],
[vcr_n(k_max, Cp, Tm, Tp_n(dp, rho, ER, Lex,
Po, To, Cp), uts, rho) for To in K],
alpha=0.2)
plt.subplot(1, 3, 2)
plt.fill_between(P,
[vcr_n(k_min, Cp, Tm, Tp_n(dp_min, rho, ER, Lex,
Po, To, Cp), uts, rho) for Po in P],
[vcr_n(k_max, Cp, Tm, Tp_n(dp_max, rho, ER, Lex,
Po, To, Cp), uts, rho) for Po in P],
alpha=0.2)
plt.subplot(1, 3, 3)
plt.fill_between(d,
[vcr_n(k_min, Cp, Tm, Tp_n(dp_min, rho, ER, Lex,
Po, To, Cp), uts, rho) for dp_min in d],
[vcr_n(k_max, Cp, Tm, Tp_n(dp_max, rho, ER, Lex,
Po, To, Cp), uts, rho) for dp_max in d],
alpha=0.2)
def ver_n(CVR, vcr):
eq4 = CVR * vcr
return eq4
ver = ver_n(CVR, vcr_n(k, Cp, Tm, Tp_n(
dp, rho, ER, Lex, Po, To, Cp), uts, rho))
trend_er = [ver_n(CVR, vcr_n(k, Cp, Tm, Tp_n(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for To in K]
trend_er2 = [ver_n(CVR, vcr_n(k, Cp, Tm, Tp_n(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for Po in P]
trend_er3 = [ver_n(CVR, vcr_n(k, Cp, Tm, Tp_n(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for dp in d]
plt.subplot(1, 3, 1)
plt.fill_between(K - 273.15,
[ver_n(CVR_min, vcr_n(k, Cp, Tm, Tp_n(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for To in K],
[ver_n(CVR_max, vcr_n(k, Cp, Tm, Tp_n(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for To in K],
alpha=0.2)
plt.subplot(1, 3, 2)
plt.fill_between(P,
[ver_n(CVR_min, vcr_n(k, Cp, Tm, Tp_n(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for Po in P],
[ver_n(CVR_max, vcr_n(k, Cp, Tm, Tp_n(
dp, rho, ER, Lex, Po, To, Cp), uts, rho)) for Po in P],
alpha=0.2) # plot2 range of error
plt.subplot(1, 3, 3)
plt.fill_between(d,
[ver_n(CVR_min, vcr_n(k, Cp, Tm, Tp_n(
dp_min, rho, ER, Lex, Po, To, Cp), uts, rho)) for dp_min in d],
[ver_n(CVR_max, vcr_n(k, Cp, Tm, Tp_n(
dp_max, rho, ER, Lex, Po, To, Cp), uts, rho)) for dp_max in d],
alpha=0.2) # plot3 range of error
else:
v_result.config(text="Error: select process gas", fg='red',
cursor='pirate', font=("Calibri", 22))
return
# results
vcr_label = tk.Label(window, text="Critical Velocity",
bg='#efc700', fg='black')
vcr_label.grid(row=18, column=0, sticky='ew')
vcr_result.config(text=f"{vcr:.2f} m/s",
bg='#efc700', fg='black') # critical velocity
ver_label = tk.Label(window, text="Erosion Velocity",
bg='#ff7575', fg='black')
ver_label.grid(row=18, column=1, sticky='ew')
ver_result.config(text=f"{ver:.2f} m/s",
bg='#ff7575', fg='black') # erosion velocity
v_label = tk.Label(window, text="Particle Impact Velocity",
bg='#00b102', fg='black', cursor='heart')
v_label.grid(row=20, column=0, columnspan=2, sticky='ew')
v_result.config(text=f"{v:.2f} m/s", bg='#00b102', fg='black', font=("Calibri", 26, "bold"),
cursor='heart') # predicted velocity
# convert trend values to a list
trendline = list(trend)
trendline2 = list(trend2)
trendline3 = list(trend3)
trendline_cr = list(trend_cr)
trendline_cr2 = list(trend_cr2)
trendline_cr3 = list(trend_cr3)
trendline_er = list(trend_er)
trendline_er2 = list(trend_er2)
trendline_er3 = list(trend_er3)
# plot predictions
plt.subplot(1, 3, 1) # v vs t
C = K-273.15 # plot x-axis
plt.plot(C, trendline) # impact trend
plt.plot(To_C, v, 'ro') # predicted point
plt.annotate(f'{v:.0f}', xy=(To_C, v), xycoords='data',
xytext=(0, 8), textcoords='offset points', ha='center')
plt.plot(C, trendline_cr, '--') # cr trend
plt.plot(To_C, vcr, 'ro') # critical point
plt.annotate(f'{vcr:.0f}', xy=(To_C, vcr), xycoords='data',
xytext=(0, 8), textcoords='offset points', ha='center')
plt.plot(C, trendline_er, '--') # er trend
plt.plot(To_C, ver, 'ro') # erosion point
plt.annotate(f'{ver:.0f}', xy=(To_C, ver), xycoords='data',
xytext=(0, 8), textcoords='offset points', ha='center')
plt.title('Velocity-Temperature')
plt.xlabel('Temperature (°C)')
plt.ylabel('Velocity (m/s)')
plt.grid(True)
plt.subplot(1, 3, 2) # v vs p
plt.plot(P, trendline2)
plt.plot(Po, v, 'ro')
plt.annotate(f'{v:.0f}', xy=(Po, v), xycoords='data',
xytext=(0, 8), textcoords='offset points', ha='center')
plt.plot(P, trendline_cr2, '--')
plt.plot(Po, vcr, 'ro')
plt.annotate(f'{vcr:.0f}', xy=(Po, vcr), xycoords='data',
xytext=(0, 8), textcoords='offset points', ha='center')
plt.plot(P, trendline_er2, '--')
plt.plot(Po, ver, 'ro')
plt.annotate(f'{ver:.0f}', xy=(Po, ver), xycoords='data',
xytext=(0, 8), textcoords='offset points', ha='center')
plt.title('Velocity-Pressure')
plt.xlabel('Pressure (bar)')
plt.grid(True)
plt.subplot(1, 3, 3) # v vs d
plt.plot(d, trendline3,
label=f'Impact; {To_C:.0f}°C; {Po:.0f} bar; {dp:.0f} µm')
plt.plot(dp, v, 'ro')
plt.annotate(f'{v:.0f}', xy=(dp, v), xycoords='data',
xytext=(0, 8), textcoords='offset points', ha='center')
plt.plot(d, trendline_cr3, '--',
label=f'Critical; {To_C:.0f}°C; {Po:.0f} bar; {dp:.0f} µm') # cr trend
plt.plot(dp, vcr, 'ro')
plt.annotate(f'{vcr:.0f}', xy=(dp, vcr), xycoords='data',
xytext=(0, 8), textcoords='offset points', ha='center')
plt.plot(d, trendline_er3, '--',
label=f'Erosion; {To_C:.0f}°C; {Po:.0f} bar; {dp:.0f} µm') # er trend
plt.plot(dp, ver, 'ro')
plt.annotate(f'{ver:.0f}', xy=(dp, ver), xycoords='data',
xytext=(0, 8), textcoords='offset points', ha='center')
plt.title('Velocity-Size')
plt.xlabel('Size (µm)')
plt.legend()
plt.grid(True)
plt.suptitle('Particle Impact Velocity Analysis')
plt.show()
return
"""initiallize app"""
window = tk.Tk()
window.title("Savei")
# resizable window
window.minsize(694, 694)
window.maxsize(1920, 1080)
# window has two columns w equal weight
window.grid_columnconfigure(0, weight=1)
window.grid_columnconfigure(1, weight=1)
"""column 0"""
# gas type
gas_label = tk.Label(window, text="Process Gas")
gas_label.grid(row=1, column=0, padx=50, sticky='ew')
gas_options = ['Helium', 'Nitrogen']
gas_input = ttk.Combobox(window, width=16, values=gas_options, cursor='hand2')
gas_input.grid(row=2, column=0, padx=50, sticky='ew')
# particle size
dp_label = tk.Label(window, text="Particle Size [µm]", width=16)
dp_label.grid(row=4, column=0, padx=50, sticky='ew')
dp_input = tk.Entry(window, width=16)
dp_input.grid(row=5, column=0, padx=50, sticky='ew')
# density
rho_label = tk.Label(window, text="Particle Density [kg/m³]", width=16)
rho_label.grid(row=7, column=0, padx=50, sticky='ew')
rho_input = tk.Entry(window, width=16)
rho_input.grid(row=8, column=0, padx=50, sticky='ew')
# gas temperature
To_label = tk.Label(window, text="Heated Gas Temperature [°C]", width=16)
To_label.grid(row=10, column=0, padx=50, sticky='ew')
To_input = tk.Entry(window, width=16)
To_input.grid(row=11, column=0, padx=50, sticky='ew')
# melting temperature
Tm_label = tk.Label(
window, text="Particle Melting Temperature [°C]", width=16)
Tm_label.grid(row=13, column=0, padx=50, sticky='ew')
Tm_input = tk.Entry(window, width=16)
Tm_input.grid(row=14, column=0, padx=50, sticky='ew')
"""column 1"""
# expansion area ratio
ER_label = tk.Label(window, text="Expansion Ratio", width=16)
ER_label.grid(row=1, column=1, padx=50, sticky='ew')
ER_input = tk.Entry(window, width=16)
ER_input.grid(row=2, column=1, padx=50, sticky='ew')
# gas pressure
Po_label = tk.Label(window, text="Inlet Gas Pressure [bar]", width=16)
Po_label.grid(row=4, column=1, padx=50, sticky='ew')
Po_input = tk.Entry(window, width=16)
Po_input.grid(row=5, column=1, padx=50, sticky='ew')
# expansion region length
Lex_label = tk.Label(
window, text="Expansion Region Length with Standoff [m]", width=16)
Lex_label.grid(row=7, column=1, padx=50, sticky='ew')
Lex_input = tk.Entry(window, width=16)
Lex_input.grid(row=8, column=1, padx=50, sticky='ew')
# tensile strength
uts_label = tk.Label(window, text="Particle Tensile Strength [MPa]")
uts_label.grid(row=10, column=1, padx=50, sticky='ew')
uts_input = tk.Entry(window, width=16)
uts_input.grid(row=11, column=1, padx=50, sticky='ew')
# specific heat
Cp_label = tk.Label(window, text="Particle Specific Heat [J/kg-K]")
Cp_label.grid(row=13, column=1, padx=50, sticky='ew')
Cp_input = tk.Entry(window, width=16)
Cp_input.grid(row=14, column=1, padx=50, sticky='ew')
""""middle column"""
# logo
logo_path = 'assets/logo.png'
logo_image = Image.open(logo_path)
resized_logo = logo_image.resize((150, 150))
logo = ImageTk.PhotoImage(resized_logo)
logo_label = tk.Label(window, image=logo)
window.rowconfigure(0, weight=6) # configure the row to expand
# place in both columns n centered
logo_label.grid(row=0, column=0, columnspan=2, sticky='nsew')
# set window icon
window.tk.call('wm', 'iconphoto', window._w, logo)
# predictions
window.rowconfigure(16, weight=1)
button = tk.Button(window, text="Predict Velocity",
cursor='hand2', command=math)
button.grid(row=16, column=0, columnspan=2, padx=200, sticky='nsew')
window.rowconfigure(19, weight=1)
vcr_result = tk.Label(window, width=16, font=("Calibri", 18))
vcr_result.grid(row=19, column=0, sticky='nsew')
window.rowconfigure(19, weight=1)
ver_result = tk.Label(window, width=16, font=("Calibri", 18))
ver_result.grid(row=19, column=1, sticky='nsew')
window.rowconfigure(21, weight=2)
v_result = tk.Label(window, width=16, font=("Calibri", 26, "bold"))
v_result.grid(row=21, column=0, columnspan=2, sticky='nsew')
"""spaces"""
space1 = tk.Label(window)
space1.grid(row=3, column=0, columnspan=2, padx=50)
space2 = tk.Label(window)
space2.grid(row=6, column=0, columnspan=2, padx=50)
space3 = tk.Label(window)
space3.grid(row=9, column=0, columnspan=2, padx=50)
space4 = tk.Label(window)
space4.grid(row=12, column=0, columnspan=2, padx=50)
space5 = tk.Label(window)
space5.grid(row=15, column=0, columnspan=2, padx=50)
space6 = tk.Label(window)
space6.grid(row=17, column=0, columnspan=2, padx=50)
# run the main event loop
window.mainloop()