File:Sim-free-fall-drag-plot-matplotlib.svg

Original file(SVG file, nominally 576 × 432 pixels, file size: 39 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary edit

Description
English: Simulated free fall of a styrofoam ball (r = 10cm; ρ = 20kg/m³) with air resistance
Date
Source Own work
Author MikeRun
SVG development
InfoField
 
The SVG code is valid.
 
This vector image was created with Python.
Source code
InfoField

Python code

Python matplotlib code
# Simulation: Freier Fall einer Styroporkugel (d = 10cm; ρ = 20kg/m³) mit Luftwiderstand

## Konstanten:
g =	       9.81 # m/s²  (Fallbeschleunigung Erde)
m =        0.08	# kg    (Masse des Körpers)
c_w =	   0.45	#       (Luftwiderstandsbeiwert)
A =        0.03 # m²    (Fläche des Körpers normal zur Bewegungsrichtung)
rho =      1.29 # kg/m³ (Dichte des Mediums)

## Anfangsbedingungen:
s_0 =    100    # m     (Anfangshöhe)
v_0 =      0    # m/s   (Anfangsgeschwindigkeit)

## Genauigkeit:
dt =       0.2  # s     (Zeitschritt)

## Simulation:
list_t = []
list_s = []
s = s_0
v = v_0
t = 0
while s > 0:
    list_t.append(t)
    list_s.append(s)
    F = (-m*g) + (-0.5*c_w*A*rho*abs(v)*v)
    a = F/m
    s += v * dt
    v += a * dt
    t += dt

## Textausgabe:
print("Falldauer: ", round(t,3), " s")
print("Endgeschwindigkeit:", round(v,3), "m/s")

## Diagramm:
import matplotlib.pyplot as plt
plt.plot(list_t, list_s, 'ro')
plt.ylabel('Höhe (m)')
plt.xlabel('Zeit (s)')
plt.title('Simulation: Freier Fall einer Styroporkugel mit Luftwiderstand aus '+str(s_0)+'m')
plt.show()

Licensing edit

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current10:16, 17 July 2023Thumbnail for version as of 10:16, 17 July 2023576 × 432 (39 KB)MikeRun (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata