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.
*** Click each chart to open an interactive animation -- These are previews ***
![]() |
![]() |
---|---|
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 sweep from 0 to 1.3 kg/mm in 0.01 kg/mm increments |
- Clone the repository.
cd $SAVE_DIR
git clone https://github.com/ericghara/ShockForce/
cd ShockForce
- Install dependencies (preferably in a new python 3.8 virtual environment).
pip install -r requirements.txt
- Run program
python main.py
- 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:
- Spring Forces:
- Modeled as an ideal spring (spring rate: 0.87 kg/mm, unless otherwise specified)
- 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.
- Spring Forces:
- 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.