From 85c8c1bd80fc49c3a1dfb52d422cccf955106ab5 Mon Sep 17 00:00:00 2001 From: Stein_van_vliet Date: Wed, 28 Feb 2024 15:53:46 +0100 Subject: [PATCH] scenario A implementatie --- src/casus.py | 58 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/src/casus.py b/src/casus.py index 30e70bb..5a8550d 100644 --- a/src/casus.py +++ b/src/casus.py @@ -9,23 +9,44 @@ 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] +F_eff = 0 + +v_kar = 2.1 #[m/s] s_kar = 0 #[m] +time = 20 +dt = 0.01 + F_list = [] v_list = [] s_list = [] t_list = [] +""" +#SCENARIO 1a +Fn = Fz*mp.cos(mp.radians(20)) +Fzt = Fz*mp.sin(mp.radians(20)) +F_rol = Fn*mu_r for i in range(round(10/dt)): + + a_kar = F_eff/(m/4) + v_kar = v_kar+a_kar*dt + s_kar = s_kar+v_kar*dt + F_eff = (F_aan-F_rol-Fzt) + + F_list.append(F_eff) + v_list.append(v_kar) + s_list.append(s_kar) + t_list.append(dt*i) +#""" + +# """ +#SCENARIO 2a +Fn = Fz +F_rol = Fn*mu_r + +for i in range(round(time/dt)): if(v_kar < 0): F_rol=0 F_eff=0 @@ -39,6 +60,27 @@ for i in range(round(10/dt)): v_list.append(v_kar) s_list.append(s_kar) t_list.append(dt*i) +#""" + +""" +#SCENARIO 3a +Fn = Fz*mp.sin(mp.radians(20)) +Fzt = Fz*mp.cos(mp.radians(20)) +F_rol = Fn*mu_r + +for i in range(round(10/dt)): + + a_kar = F_eff/(m/4) + v_kar = v_kar+a_kar*dt + s_kar = s_kar+v_kar*dt + F_eff = (F_aan-F_rol+Fzt) + + 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)