coole sim
This commit is contained in:
parent
02e97eff57
commit
850224704c
44
src/casus.py
Normal file
44
src/casus.py
Normal file
@ -0,0 +1,44 @@
|
||||
import math as mp
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
g = 1.62 #[m/s^-2]
|
||||
mu_w = 0.9
|
||||
mu_r = 0.1
|
||||
m = 6 #[kg]
|
||||
r = 0.075 #[m]
|
||||
|
||||
Fz = m*g/4
|
||||
|
||||
dt = 0.01
|
||||
|
||||
#SCENARIO 2a
|
||||
F_aan = 0 #[N]
|
||||
Fn = Fz
|
||||
F_rol = Fn*mu_r
|
||||
F_eff = 50
|
||||
v_kar = 0 #[m/s]
|
||||
s_kar = 0 #[m]
|
||||
|
||||
F_list = []
|
||||
v_list = []
|
||||
s_list = []
|
||||
t_list = []
|
||||
|
||||
for i in range(round(10/dt)):
|
||||
if(v==0)
|
||||
F_eff = F_eff+(F_aan-F_rol)
|
||||
a_kar = F_eff/(m/4)
|
||||
v_kar = v_kar+a_kar*dt
|
||||
s_kar = s_kar+v_kar*dt
|
||||
|
||||
F_list.append(F_eff)
|
||||
v_list.append(v_kar)
|
||||
s_list.append(s_kar)
|
||||
t_list.append(dt*i)
|
||||
|
||||
plt.plot(t_list,F_list)
|
||||
plt.plot(t_list,v_list)
|
||||
plt.plot(t_list,s_list)
|
||||
plt.legend(['Kracht','Snelheid','Afstand'])
|
||||
plt.show()
|
Loading…
Reference in New Issue
Block a user