This simulator is a computational physics tool that couples fluid mechanics (drag-limited fall) with elastic wave propagation.
1. User Input Parameters
The user defines the initial conditions that dictate the system's energy:
Fall Time: Timed from release until the impact sound is heard.
Mass: Directly influences inertia and the final impact force.
Drag Coefficient and Area: Selected based on the object (steel sphere, rock, or cube). This determines how much air resistance opposes the fall.
Well Geometry: The user can modify the well's width by dragging the on-screen marker, which dynamically updates the material map.
2. Trajectory Calculation (Quadratic Drag)
Unlike simple free-fall, this simulator uses quadratic air resistance, which reflects real-world conditions.
Terminal Velocity: First, we calculate the maximum speed the object would reach if air resistance perfectly balanced gravity:
Depth: Obtained by integrating the equation of motion:
3. Impact Force Calculation
We apply the Work-Energy Theorem. We assume the ground deforms by a very small distance to stop the object:
The result is divided by to display it in kilogram-force (kgf), which is more intuitive for the user.
4. Wave Equation Simulation (Acoustic/Elastic)
To visualize the impact, the simulator solves the 2D Wave Equation using the Finite-Difference Time-Domain (FDTD) method:
In the code, this translates to a grid of nodes where each point
depends on its neighbors and its previous state:
Discrete Laplacian: We calculate the difference in pressure/displacement between a node and its four immediate neighbors.
Velocity Map: The value changes drastically between air (slow velocity) and earth (fast velocity), creating refraction and reflection at the well walls.
Damping: Energy loss is applied at the canvas edges to prevent infinite bouncing (absorbing boundary conditions).
5. Visualization and Seismograph
Main Canvas: Translates the matrix values into colors. Positive values are blue (compression) and negative values are red (rarefaction) over a background that distinguishes soil from air.
Seismograph: Real-time plot of a single specific node (the "sensor") located on the surface, allowing the user to see the arrival time of the seismic wave after impact.