dynamic biomechanical simulation of thoracic cage

Introduction

A client asked me to build a dynamic engineering model of the thoracic cage with which we can run “what if?” scenarios against. Applying Newton’s laws of motion and Runge-Kutta, I produced the following results. Following the videos presented below, I partially detail my methodology and propose steps for improving the work:

Results

The first of the following movies shows the rib cage and vertebral column responding to forces placed on vertebrates T1, T2, T3, and T7. Cartilages (costal, disc, etc.) are mathematically modeled but not shown. Discs and joints are simulated as linear spring and damper combinations, much like a car’s suspension system is often modeled by automotive engineers. Vertebrate L5 is fixed in space. Gravity is not active:

The second movie shows an unsupported vertebral column buckling under its one weight. (In this case, gravity is active). Again, discs and joints are modeled as linear spring/damper combinations. Vertebrate L5 is again fixed in space.

Brief Methodology

I can’t share my code, as it is proprietary, but here is basically what is going on:

  • I obtained a X3D model of the skeleton from http://www.web3d.org/x3d/content/Basic/Medical/index.html (the file I used is “SkeletonCompleteNoNormals.x3d”), and extracted the coordinates describing the bones I needed.
  • Equations of motion for translation and rotation of each bone (with respect to other bones) are expressed in first-order form such that one can apply Runge-Kutta.
  • I treated joint forces and moments as linear spring/damper systems.
  • Chose Java to express this work, for two reasons:
    • I suspect, but am not certain, that it is faster than using the Numpy/Scipy stack in Python.
    • I wanted to enforce a highly object-oriented design. This can be done in Python, but Python makes sloppy OOP easier.

Potential Improvements

Just to get the damn thing working, I risked gimbal lock and chose to use Euler angles and a rotation matrix. Applying quaternions instead would prove more prudent.

The assumption of linearity in the joint forces can be revised. Also, I can make these forces direction-dependent. 

About Me

Emily Marie Williams holds a B.S. in Mechanical Engineering, and has mostly worked in bioinformatics and data science over the last decade. She writes for badassdatascience.com and performs as Napalm Fatale.

Post Author: badassdatascience

Leave a Reply

Your email address will not be published.