-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
65 lines (42 loc) · 1.21 KB
/
main.py
File metadata and controls
65 lines (42 loc) · 1.21 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
# MANJKA:
# KNJIŽNJICA MATERIALOV
# PROGRAM ZA KLASIČEN IZRAČUN REBRA
#
# https://github.com/galtay/hilbertcurve
#%%
def izrisKlasicnihReber():
materiali = Q_f()[0]
Q_f_materiali = Q_f()[1]
round_to_tenths = [round(num,3) for num in Q_f_materiali]
for i,num in enumerate(round_to_tenths):
print(f'Q materiala: {materiali[i]} je {num}')
# importing modules
import matplotlib.pyplot as plt
# izris rezultatov
plt.bar(materiali, Q_f_materiali, color ='maroon', width = 0.4)
plt.xlabel("Različni materiali")
plt.ylabel("Prenos toplote [W]")
plt.title("Prenos toplote v okolico skozi rebra")
plt.show()
#%%
def Q_f():
from klasicnoRebro import izracunKlasicnegaRebra
# definiranje materialov, ki nas zanimajo
materiali = ['PMMA','ABS', 'aluminij', 'zelezo', 'baker']
# izračun za vsak material
Q_f_materiali = []
for material in materiali:
Q_f_materiali.append(izracunKlasicnegaRebra(material, 0.2, 0.005))
return materiali, Q_f_materiali
#%%
izrisKlasicnihReber()
#%%
Q_f()
#%%
#def Primerjava():
Q_materiali = Q_f()[1]
Q_max = max(Q_materiali)
<<<<<<< HEAD
=======
>>>>>>> a2187144ed01cdae70ccd6e61d7cfaae06c9ade9
# %%