Matplotlib Animation With Multiple Subplots And Axes

To come

Full code:
Matplotlib Animation With Multiple Subplots and Axes

Leave a Comment

Filed under Dynamic Simulations using Python

Multiple Subplots And Axes With Matplotlib And Python

Plots are the best way to show simulation results.
Here are some examples of figures with multiple subplots and axes with Python and Matplotlib.
The example code can be found at the end of this post.
– N

Oscillation Decay

Multiple subplots and axes with Python and Matplotlib

Please find the complete code to generate the figure above at the end of this post.

Continue reading

Leave a Comment

Filed under Dynamic Simulations using Python

State Space Representation Of A Mass Spring Damper System

Hello,
I plan to write a bunch of posts about simulating dynamic systems using Python.
I will be using the mass-spring-damper (MSD) system as an example through those posts so here is a brief description of the typical MSD system in state space.

Mass-Spring-Damper System

MSD

Schematic of mass-spring-damper

The differential equation that describes a MSD is:

m \ddot{x} + c \dot{x} + k x = u

x : position of mass [m] at time t [s]
m : mass [kg]
c  : viscous damping coefficient [N s / m]
k  : spring constant [N / m]
u : force input [N]

Continue reading

Leave a Comment

Filed under Dynamic Simulations using Python