A computational physics study evaluating analytical and numerical solution profiles for kinematics within dissipative fluid media.
This work details the numerical simulation of a two-dimensional projectile traversing dissipative media under linear and quadratic velocity-dependent drag regimes. A fixed-step fourth-order Runge-Kutta (RK4) integration scheme is implemented utilizing a vectorized state-space representation to constrain the global truncation error to
The computational engine evaluates equations of motion where closed-form analytical solutions are unavailable due to non-linear velocity coupling terms in the vector fields.
-
Version 2.1 (Current - Verification Framework): Implements an automated validation framework comparing manual vector state-space representations against adaptive-step
scipy.integrate.solve_ivproutines to isolate code artifacts and compute absolute spatial residuals. -
Version 2.0 (Fourth-Order Runge-Kutta Engine): The kinematic engine implements a fourth-order Runge-Kutta (RK4) integration routine. By performing four distinct derivative evaluations per temporal increment
$\Delta t$ , the global truncation error is bounded to$O(\Delta t^4)$ . This modification preserves trajectory tracking stability across wider step intervals than first-order approximations. -
Version 1.0 (First-Order Forward Euler Baseline): The initial baseline uses a forward Euler time-stepping routine built explicitly with built-in Python list structures to verify kinematics in an environment free of external dependencies. Because the global error accumulation scales linearly with the time step,
$O(\Delta t)$ , stable convergence requires minimized step bounds ($\Delta t \to 0$ ). This limitation establishes the numerical baseline that requires the transition to vectorized RK4 and adaptivescipy.integratearchitectures in later versions.
For all evaluated physical models, the initial conditions are mapped from Newton's second law of motion:
To resolve this system computationally, the second-order differential equation is decomposed into a system of coupled first-order ordinary differential equations (ODEs):
Under vacuum conditions, the dissipative force vector is zero (
- Equations of Motion:
- Analytical Baseline Solutions:
-
System Parameters: Constant gravitational acceleration is set to
$g = 9.81 , \text{m/s}^2$ . The resulting path forms a spatially symmetric parabola where horizontal velocity component$v_x$ remains constant across the temporal domain.
The linear drag model assumes resistance forces are directly proportional to the instantaneous velocity vector:
- Equations of Motion:
where
- Analytical Baseline Solutions:
-
System Parameters: The drag damping parameter is determined by Stokes' law,
$b = 6 \pi \eta r$ , where$\eta$ represents the dynamic fluid viscosity and$r$ denotes the spherical projectile radius. The equations remain uncoupled, and the velocity vector asymptotically approaches a vertical terminal velocity vector:
For macroscopic objects operating at high Reynolds numbers (
- Equations of Motion:
where
-
System Parameters: Atmospheric air density is modeled at sea level (
$\rho = 1.225 , \text{kg/m}^3$ ), the projectile cross-sectional area is defined as$A = \pi r^2$ , and the dimensionless drag coefficient is pinned at$C_d = 0.47$ for a rigid sphere. The absolute speed term couples the horizontal and vertical expressions, breaking analytical tractability and requiring deterministic numerical integration. The terminal velocity limit is defined by:
The continuous differential kinematic components are discretized over fixed temporal steps
To prevent the localized numerical tracking drift inherent to first-order approximations, Version 2.0 shifts to a vectorized state-space representation. The absolute kinematic state is encapsulated within the state vector
The continuous time-evolution equation
Implementing the derivative evaluation using vectorized NumPy arrays matches standard state-space mechanics while lowering execution time relative to native loops.
Verification of the core numerical stepping routines is handled via a two-tier validation design.
The numerical output from the custom integration loop under linear fluid resistance was mapped directly against the exact exponential closed-form solution. The maximum local divergence was bounded within an absolute error ceiling of
To audit the vectorized RK4 computational engine under coupled non-linear conditions, trajectories were benchmarked against the adaptive-step scipy.integrate.solve_ivp implementation using its fourth-order/fifth-order Dormand-Prince (RK45) variant.
Because the verification baseline uses an adaptive time grid, a cubic one-dimensional interpolation routine was used to map the baseline results onto the fixed
Evaluating the transition from an idealized vacuum baseline to velocity-dependent fluid resistance regimes yields the following trajectory properties:
-
Spatial Parity Breakdown: In the vacuum limit, spatial symmetry is preserved about the trajectory vertex. The introduction of linear or quadratic fluid drag introduces non-conservative forces that continuously dissipate system kinetic energy along the integrated path length. This asymmetry causes the local spatial gradient (
$dy/dx$ ) during the descent phase to exceed that of the ascent phase, systematically decreasing both the maximum altitude ($y_{\text{max}}$ ) and total horizontal range ($x_{\text{range}}$ ).
-
Launch Angle Depolarization: Under aerodynamic resistance, the launch angle optimizing horizontal displacement shifts below the classic analytical limit of
$45^\circ$ , typically operating within the$35^\circ \le \theta \le 40^\circ$ envelope. This optimization is bounded by the mass-to-cross-sectional-area ratio ($m/A$ ), as lower-elevation launch vectors compress the integrated temporal exposure to horizontal deceleration components.
-
Mass-Dependent Inertial Scaling: In a vacuum vector field, kinematics are independent of projectile mass. In dissipative media, mass governs the scaling of deceleration terms (
$k = \frac{c}{m}$ ). Heavier objects exhibit greater structural inertia, allowing them to resist aerodynamic damping forces longer and match ideal parabolic paths closer than low-mass configurations.
-
Algorithmic Convergence Stability: Testing under an expanded step interval (
$\Delta t = 0.1,\text{s}$ ) exposes severe localized truncation errors in the first-order Euler scheme, which overestimates energy injection and paths. The fourth-order RK4 arrangement maintains coordinate stability and preserves tracking boundaries under coarse step profiles.
The performance differentiation between the initial baseline and the updated version depends on the scaling behavior of the Local Truncation Error (LTE) and Global Truncation Error (GTE).
The forward Euler method truncates the system's local Taylor series expansion at the first derivative layer:
The Local Truncation Error scales as
The RK4 arrangement uses four strategically weighted derivative evaluations across the step interval to cancel out lower-order Taylor series error residuals up to the fourth order:
This constraints the Local Truncation Error to
Consequently, reducing the simulation step size by a factor of 10 decreases the global error margin of the Euler method by one order of magnitude, whereas the RK4 engine error drops by four orders of magnitude (
Ensure a standard Python environment is configured with the necessary scientific processing dependencies:
pip install matplotlib numpy scipyTo initiate the simulation engine and generate the complete suite of analytical and numerical verification plots inside the local workspace, execute the target module from the root directory:
python src/projectile_sim_v2.pyThe baseline model assumes a constant atmospheric density (
where
To simulate asymmetric pressure fields generated by projectile angular velocity, the state-space system can be modified to incorporate the Magnus lift force. The lateral force per unit length is formulated as:
where
While the RK4 scheme bounds local truncation errors effectively, it is non-symplectic and exhibits long-term artificial dissipation or inflation in conservative limits. To evaluate the transition behavior as drag coefficients approach zero (
- Taylor, J. R. (2005). Classical Mechanics. University Science Books. [ISBN: 978-1891389220].
- Annotation: Provides the baseline Newtonian formulation and analytical terminal velocity bounds governing the system's uncoupled states.
- Press, W. H., Teukolsky, S. A., Vetterling, W. T., & Flannery, B. P. (2007). Numerical Recipes: The Art of Scientific Computing (3rd ed.). Cambridge University Press. [ISBN: 978-0521880688].
-
Annotation: Establishes the mathematical constraints and algorithmic structure of the
$O(\Delta t^4)$ Runge-Kutta integration sequence utilized in the core engine.
-
Annotation: Establishes the mathematical constraints and algorithmic structure of the
- Parker, G. W. (1977). Projectile motion with air resistance quadratic in the speed. American Journal of Physics, 45(7), 606-610. [DOI: 10.1119/1.10711].
-
Annotation: Contextualizes the analytical intractability of the coupled quadratic velocity terms, necessitating the discrete matrix formulations in
projectile_sim_v2.py.
-
Annotation: Contextualizes the analytical intractability of the coupled quadratic velocity terms, necessitating the discrete matrix formulations in
- Dormand, J. R., & Prince, P. J. (1980). A family of embedded Runge-Kutta formulae. Journal of Computational and Applied Mathematics, 6(1), 19-26. [DOI: 10.1016/0771-050X(80)90013-3].
-
Annotation: The foundational derivation of the adaptive-step RK45 method utilized by the
scipy.integrate.solve_ivpbaseline during spatial residual cross-validation.
-
Annotation: The foundational derivation of the adaptive-step RK45 method utilized by the
This simulation framework maps the limitations of closed-form analytical mechanics when applied to dissipative environments. While uncoupled, conservative systems remain analytically tractable, the inclusion of non-linear velocity terms necessitates the use of discrete numerical step-integration routines to approximate state trajectories.
Quantitative cross-validation between the fixed-step fourth-order Runge-Kutta scheme and adaptive scipy.integrate baselines confirms that the manual derivative implementations are mathematically consistent and free of structural discretization artifacts. The bounded residual errors verify that the state-space matrix formulation provides a stable computational platform for tracking localized kinematic paths under non-conservative vector fields.





