meta data for this page
  •  

This is an old revision of the document!


Auswertung Gruppe 310

Vorgehen - Messung 1

Um die Fallzeit des Besenstiels mit der Länge l=1.28(m) zu bestimmen, wurden auf dem Boden eine Markierung neben den Schreibtisch gemacht um den Besenstiel immer vom gleichen Ort fallen lasse zu können. Auf dem Schreibtisch wurden 5 verschiedene Markierungen geklebt um verschiedene Winkel messen zu können (siehe Foto 1). Anschließend wurden mithilfe von der App “iLevel” die Winkel bestimmt und pro Winkel werden nun jeweils 5 Fallzeiten manuell aufgenommen (siehe Tabelle 1).

Computerprogramm

englische Variante

Zunächst zur allg. Berechnung des Winkels in Abhgkt. zur Zeit

ExplizitesEulerVerfahren.py
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. import math
  4.  
  5. #Variablen und Konstanten
  6. tmax=2
  7. dt=0.01 #10 ms
  8. g=9.81
  9. l=1.45 # m
  10. tau=math.sqrt(2*l/(3*g))
  11. vPhi0=0 #zero initial phi-velocity
  12. phi0=0.25
  13.  
  14. t=[]
  15. phi=[]
  16. vPhi=[]
  17.  
  18. # initial values
  19. phi.append(phi0)
  20. vPhi.append(vPhi0)
  21. i=0
  22.  
  23. #Explizites Euler Verfahren/ Iteration
  24. while True:
  25. vPhi.append(vPhi[i] +dt*math.sin(phi[i])/(tau**2))
  26. phi.append(phi[i]+dt*vPhi[i])
  27.  
  28. i+=1
  29.  
  30. if phi[i] >= math.pi/2:
  31. break
  32.  
  33. # Berechnung Auftreffzeitpunkt
  34. tmax=len(phi)*dt
  35. print(tmax)
  36.  
  37. #erzeuge Zeiten
  38. t=np.arange(0,tmax,dt)
  39.  
  40. # Erzeuge eine Figure.
  41. fig = plt.figure(figsize=(9, 4))
  42. fig.set_tight_layout(True)
  43.  
  44. # Plotte das Winkel-Zeit-Diagramm.
  45. ax1 = fig.add_subplot(1, 1, 1)
  46. ax1.set_xlabel("t [s]")
  47. ax1.set_ylabel("phi [rad]")
  48. ax1.grid()
  49. #ax1.plot(t, vPhi, ".b", label="Vphi")
  50. ax1.plot(t, phi, ".r", label="Phi")
  51. ax1.legend()
  52.  
  53. plt.show()
StartwinkelFallzeit.py
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. import math
  4.  
  5. #variables and constants
  6. tmax=2
  7. dt=0.01 #stepsize
  8. g=9.81
  9. l=1.45 # m
  10. tau=math.sqrt(2*l/(3*g))
  11. vPhi0=0 #zero initial phi-velocity
  12.  
  13. #method to solve the diff-eq.
  14. def solver2(phi0,stepT):
  15. t=[] #generate lists
  16. phi=[]
  17. vPhi=[]
  18.  
  19. # initial values
  20. phi.append(phi0)
  21. vPhi.append(vPhi0)
  22. i=0
  23.  
  24. while True: #iterations according to Euler
  25. vPhi.append(vPhi[i] +stepT*math.sin(phi[i])/(tau**2))
  26. phi.append(phi[i]+stepT*vPhi[i])
  27.  
  28. i+=1 #next step
  29.  
  30. if phi[i] >= math.pi/2: # stick has reached ground at 90°
  31. break
  32.  
  33. tmax=len(phi)*stepT #calculate elapsed time
  34. t=np.arange(0,tmax,stepT)
  35. return (tmax,t,phi) #return tupel with fall-time + time and angle arrays
  36.  
  37. #initial angles
  38. initPhi=np.arange(0.25,1.3,0.05)
  39.  
  40. def calcTs(step): #calc the fall time for different initial phi
  41. ts=[]
  42.  
  43. for i in initPhi: #generate list of times
  44. ts.append(solver2(i,step)[0]) #first element in return tuple is tmax
  45.  
  46. return ts
  47.  
  48.  
  49. steps=np.array([0.1,0.05,0.01,0.001])
  50.  
  51. times=[]
  52. for m in steps:
  53. times.append(calcTs(m))
  54.  
  55.  
  56. # Erzeuge eine Figure.
  57. fig = plt.figure(figsize=(7, 5))
  58. fig.set_tight_layout(True)
  59.  
  60. # Plotte das Diagramm.
  61. ax1 = fig.add_subplot(1, 1, 1)
  62. ax1.set_xlabel("phi0 [rad]")
  63. ax1.set_ylabel("T [s]")
  64. ax1.grid()
  65.  
  66. ax1.plot(initPhi, times[0], ".b", label=f"dt={steps[0]}")
  67. ax1.plot(initPhi, times[1], ".r", label=f"dt={steps[1]}")
  68. ax1.plot(initPhi, times[2], ".g", label=f"dt={steps[2]}")
  69. ax1.plot(initPhi, times[3], "xm", label=f"dt={steps[3]}")
  70. ax1.legend()
  71.  
  72. #anzeigen
  73. plt.show()

Tabellen

98.0° 115.4° 127.3° 136.8° 143.4°
1. 0.93 0.69 0.91 0.65 0.64
2. 1.07 0.64 0.65 0.83 0.46
3. 0.97 0.79 0.56 0.75 0.37
4. 0.99 0.7 0.63 0.48 0.49
5. 1.09 0.76 0.74 0.53 0.49

Fotos

You could leave a comment if you were logged in.