-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathi.py
More file actions
60 lines (49 loc) · 904 Bytes
/
Copy pathi.py
File metadata and controls
60 lines (49 loc) · 904 Bytes
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
import numpy as np
import matplotlib.pyplot as plt
import math
rho = 1.293
A1 = 0.45
CD = 1.2
w=0
m = 80
F= 400
fc=488
v=0
t=0
x=0
dt=0.1
X=[]
T=[]
V=[]
A_1=[]
while t<10:
A=A1*(1-0.25*(math.e**(-(t/0.67)**2)))
D=0.5*rho*CD*A*(v-w)**2
Fc=fc*(math.e**(-(t/0.67)**2))
Fv=-25.58*v
a=(F+Fc+Fv-D)/m
x=x+v*dt
v=v+a*dt
t+=dt
X.append(x)
T.append(t)
V.append(v)
A_1.append(a)
plt.plot(T,X)
plt.xlabel('Vreme (s)')
plt.ylabel('Predjen put(m)')
plt.title('Funkcija predjenog puta od vremena')
plt.grid(True)
plt.show()
plt.plot(T,V)
plt.xlabel('Vreme (s)')
plt.ylabel('Brzina(m/s)')
plt.title('Funkcija brzine od vremena')
plt.grid(True)
plt.show()
plt.plot(T,A_1)
plt.xlabel('Vreme (s)')
plt.ylabel('Ubrzanje(m/s^2)')
plt.title('Funkcija ubrzanja od vremena')
plt.grid(True)
plt.show()