Skip to content

ProjectileModelProc

Process

Simulate the motion of a projectile and compare its trajectory with the analytical solution.
A/ simulate_projectile_motion: Simulate the motion of a 2D rigid body under gravity projected with an initial velocity.
B/ calculate_analytical_trajectory: Calculate the theoretical trajectory of a projectile using analytical equations.
C/ compare_model_vs_analytical_trajectories: Plot and save the comparison between simulated (model) and theoretical projectile trajectories.

erDiagram
  **Parameters** ||--|| **Inputs** : provides
  **Paths** ||--|| **Inputs** : provides
  **Inputs** ||--|| **ProjectileModelProc** : feeds
  **ProjectileModelProc** ||--|| **Outputs** : generates

  **Parameters** {
    float gravity
    float mass
  }
  **Paths** {
    file velocity_file "json"
    folder configs_folder "_"
    file coords_file "csv"
  }
  **ProjectileModelProc** {
    op simulate_projectile_motion
    op calculate_analytical_trajectory
    op compare_model_vs_analytical_trajectories
  }
  **Outputs** {
    folder comp_folder "_"
  }

Input Parameter(s)

  • gravity: Gravitational acceleration (m/s²).
  • mass: Mass of the body (kg).

Input Path(s)

  • velocity_file: File containing the velocity initial conditions {v0 (m/s); angle (°)}.
  • configs_folder/
    solver_config.json: File containing the parameters for solver configuration.
    display_config.json: File containing the parameters for display configuration.
  • coords_file: File containing the X/Y coordinates of the polygonal shape to simulate.

Output Path(s)

  • comp_folder/
    results.xlsx: File containing simulated (model) and theoritical trajectories.
    model_vs_theory.png: Image comparing both trajectories.