Use Pysim

PySim is used with Python in which a simulations is set up, simulated and analysed. To see how you would simulate a simple Van der Pol oscillator have a look at the following example:

from pysim.simulation import Sim
from import VanDerPol
import matplotlib.pyplot as plt

#Create a Simulation
sim = Sim()

#Create, setup and add a system to simulation
sys = VanDerPol()"x")

#Simulate and plot the results

Connected systems and other solvers

Of course much more can be done, the example above uses only one system while most simulations would use several systems connected. It is also possible to use other solvers instead of the default Runge Kutta 4 solver used above. The following solvers are currently available:

  • Runge Kutta 4
  • Cash Karp
  • Dormand Prince 5

Creating own systems

It is also possible to create your own systems in either C++ or Python. All systems are representations of differential equations, having a state as well as inputs and outputs.


The complete documentation for PySim can be found at