Coder Social home page Coder Social logo

ericghara / shockforce Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14.49 MB

This project models a motorcycle front suspension and generates interactive animations

License: MIT License

Python 100.00%
motorcycles data-visualisation modeling qt5 matplotlib-animation

shockforce's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.