This tool simulates the vertical motion of one or more balls falling under gravity, with the option to include linear air resistance. It allows users to study how gravity, drag, initial height, and initial velocity influence the motion of falling objects over time.
The simulation supports multiple balls simultaneously, each with its own initial height and velocity. The tool computes the time evolution of position and velocity for every ball and visualizes their motion as height versus time.
The physical model is based on classical mechanics and solves the equations of motion numerically using a time-stepping approach.
First, the forces acting on each ball are defined. The gravitational force acts downward, while air resistance opposes the direction of motion and is proportional to velocity.
The equation of motion for a falling ball with linear air drag is:
\[ m \frac{dv}{dt} = -mg - kv \]
where \( v \) is the vertical velocity (positive upward), \( g \) is the gravitational acceleration, \( k \) is the linear air drag coefficient, and \( m \) is the mass of the ball.
Since mass appears in all terms, the acceleration can be written as:
\[ \frac{dv}{dt} = -g - \frac{k}{m} v \]
The position of the ball evolves according to:
\[ \frac{dh}{dt} = v \]
These coupled differential equations are solved numerically using an explicit time-stepping method. For a small time step \( \Delta t \), velocity and height are updated as:
\[ v_{n+1} = v_n + a_n \Delta t \]
\[ h_{n+1} = h_n + v_{n+1} \Delta t \]
where the acceleration at each step is:
\[ a_n = -g - \frac{k}{m} v_n \]
When a ball reaches the ground (\( h < 0 \)), its height is set to zero and its velocity is set to zero to model complete absorption upon impact.
By adjusting the number of balls, initial conditions, drag coefficient, and simulation duration, users can explore different physical scenarios such as free fall in vacuum, damped motion approaching terminal velocity, and the effect of air resistance on falling objects.