Features Models Quick Start JSON Format Outputs ↓ Download on GitHub Donate to Gaza Appeal

A multibody dynamics simulator for biomechanics research and education.

Developed by Dr Gregory Tierney at Ulster University

Scroll
Capabilities

What OpenMBD can do

A general-purpose rigid body simulator designed for biomechanics research, sports science, and mechanical systems analysis.

Constrained Multibody Dynamics

Full articulated rigid body simulation with revolute, spherical, and free joints.

PHYSICS ENGINE
Ellipsoid Contact Model

Bodies are represented as collections of ellipsoids. Penalty-based contact forces with configurable stiffness curves handle contact and collisions without discontinuities.

CONTACT
🦴
Physiological Joint Limits

AAOS-sourced range-of-motion constraints for hips, knees, ankles, shoulders, elbows, wrists, and spine.

BIOMECHANICS
Visual Model Editor

A standalone HTML5 model editor lets you inspect and modify body geometry, joint transforms, inertia, and contact force curves without running Python.

TOOLING
📊
Rich Data Export

Automatic CSV export of kinematics, contact force history, and a plain-text simulation summary after every run.

ANALYSIS
🎬
GIF Animation Export

Every simulation automatically captures frame-by-frame renders and stitches them into a GIF on completion.

OUTPUT
Getting Started

Up and running in minutes

OpenMBD runs on Python 3.8+ with standard scientific libraries. No compilation, no build system.

01
Clone the repository

Download the full project from GitHub including all model files and the HTML model editor.

git clone https://github.com/GTBiomech/OpenMBD cd openmbd
02
Install dependencies

OpenMBD has exactly three third-party dependencies. NumPy is used for physics, matrix, and quaternion math. Matplotlib drives the 3D viewport, live rendering, and the analysis tab plots. Pillow creates GIF export after each run.

pip install numpy matplotlib pillow
03
Launch the simulator

Run the main entry point. The GUI opens with the Setup tab where you choose a model, set initial conditions, and configure physics parameters.

python openmbd_simulator.py
04
Run a simulation

Select a model file (e.g. openmbd_male.json), set an initial position and velocity, then click FinalizeRun. Results auto-export as CSV and GIF.

05
Explore the Model Editor

Open openmbd_model_editor.html directly in your browser. No Python needed — edit body geometry, joint transforms, and contact force curves, then export a new JSON.

# Or just double-click openmbd_model_editor.html open openmbd_model_editor.html
📁 Project structure — openmbd/
openmbd_simulator.pyentry point
physics_engine.pycore integrator
physics_rigid_body.pybody state
physics_constraints.pyjoint constraints
physics_joint_limits.pyROM limits
physics_utils.pyquaternion math
models_parser.pyJSON → engine
models_multibody.pykinematics
models_config.pysim config
geometry_ellipsoid.py
geometry_mesh_generator.py
ui_main_window.py
ui_setup_tab.py
ui_run_tab.py
ui_analysis_tab.py
ui_controls.py
openmbd_model_editor.htmlbrowser tool
openmbd_male.json
openmbd_female.json
openmbd_car.json
openmbd_bicycle.json
Model Format

The OpenMBD JSON schema

Every model is a self-contained JSON file. Bodies, joints, geometry, and contact properties are all defined in one place. Readable and version-controllable.

Figure 3 — OpenMBD JSON model schematic
bodiesobjectrequired
"{body_name}"object
massnumberkgreq
inertia[6]Ixx Iyy Izz Ixy Iyz Ixz kg·m²
center_of_mass[3]local xyz, m
ellipsoidsarray
namestring
dimensions[3]semi-axes a b c, m
local_position[3]offset from body origin
local_orientation[4×4]transform matrix
force_curve[[d,F]…]penetration → force (N)
jointsarrayrequired
namestring
typestring"fixed" | "revolute" | "spherical" | "free"
parentstringbody name or "GROUND"
childstringbody name
T1[4×4]parent anchor transform
T2[4×4]child anchor transform
T2_inv[4×4]inverse of T2
{
  "bodies": {
    "pelvis": {
      "mass": 11.22,
      "inertia": [0.0955, 0.0594, 0.0914, 0, 0, 0],
      "center_of_mass": [0, 0, 0.006],
      "ellipsoids": [
        {
          "name": "pelvis_main",
          "dimensions": [0.14, 0.10, 0.09],
          "local_position": [0, 0, 0],
          "local_orientation": /* 4×4 matrix */,
          "force_curve":
            [[0, 0], [0.01, 10000]]
        }
      ]
    }
  },
  "joints": [
    {
      "name": "hipL",
      "type": "spherical",
      "parent": "pelvis",
      "child": "thighL",
      "T1": /* parent anchor 4×4 */,
      "T2": /* child anchor 4×4 */,
      "T2_inv": /* inverse of T2 */
    }
  ]
}
Outputs

What you get after every run

OpenMBD auto-exports three files the moment a simulation completes. Everything is timestamped so runs never overwrite each other.

📈
Output CSV

Full time-series state for every rigid body in the model, sampled at the recording interval.

Time
PosX / PosY / PosZ — world position
QuatW/X/Y/Z — orientation
VelX/Y/Z — linear velocity
AngVelX/Y/Z — angular velocity
AccX/Y/Z — linear acceleration
AngAccX/Y/Z — angular acceleration
ForceX/Y/Z — accumulated force
TorqueX/Y/Z — accumulated torque
📋
Summary Text File

Human-readable run report with all simulation parameters and statistics.

Duration — total sim time (s)
Time step dt
Friction coefficient
Contact damping
Total contacts recorded
Joint constraints
Model paths & ICs
🎬
Animated GIF

Frame-by-frame capture of the 3D viewport stitched into a shareable animation. Generated automatically with Pillow — no extra steps needed.

RGBA capture — direct from renderer
Loop — infinite by default
Timestamped filename

Start simulating
today

OpenMBD is free, open source, and runs anywhere Python runs.