ericghara / ShockForce

This project models a motorcycle front suspension and generates interactive animations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ShockForce

OVERVIEW

This is a tool to both educate and inform riders about how common, easily changed parameters affect a motorcycle suspension. This program renders a series of graphs where a single suspension parameter is changed in linear space and assembles them into an animation. The UI was created using Qt (pyQt5) and the data visualization with Matplotlib. The data itself is calculated by a "homespun" class using a methodology described below.

EXAMPLES

*** Click each chart to open an interactive animation -- These are previews ***
Air gap animation Preload animation
Airgap sweep from 0 to 10.5 cm in 0.05 cm increments Airgap sweep from 0 to 10.5 cm in 0.05 cm increments
Spring rate animation
Spring rate sweep from 0 to 1.3 kg/mm in 0.01 kg/mm increments

INSTALL GUIDE

  1. Clone the repository.
cd $SAVE_DIR
git clone https://github.com/ericghara/ShockForce/
cd ShockForce
  1. Install dependencies (preferably in a new python 3.8 virtual environment).
pip install -r requirements.txt
  1. Run program
python main.py

METHODOLOGY

  • The geometry of the fork is based around a 2015 Yamaha FZ-07, but general trends should apply to all motorcycles with damper rod forks.
  • Only static forces are modeled. Dynamic forces (shock damping) are not modeled.
  • Static forces are broken down into:
    1. Spring Forces:
      • Modeled as an ideal spring (spring rate: 0.87 kg/mm, unless otherwise specified)
    2. Gas Forces:
      • Calculated using ideal gas law. These forces arise from isothermal compression of air in the headspace as the fork (motorcycle front suspension) compresses.
  • For the variable being modeled (air gap, spring preload or spring rate), ShockForce sweeps through a range of values, traveling from user specified beginning to end values in user defined increments. For each variable value in the sweep, the forces across the full range of fork travel are modeled.

About

This project models a motorcycle front suspension and generates interactive animations

License:MIT License


Languages

Language:Python 100.0%