A versatile and light weight like a lynx! This headers only C++ library containing Ordinary Differentail Equations (ODE) solvers that can be used to simulate dynamical systems.
The following methods are currently included:
- Explicit Euler (also known as Forward Euler)
- Implicit Euler (also known as Euler Backward)
- 2nd Order Runge-Kutta
- 4th Order Runge-Kutta
A detailed description of the project and the included solvers can be found on my website.
- Eigen 3.3. On a debian based linux system (e.g. Ubuntu, Mint) install using
sudo apt install libeigen3-dev
- Matplotlibcpp. Submodule required for visualizating the results of the examples. Initialize using:
make update-submodules
.
Alternatively you can build without the examples by setting set(BUILD_EXAMPLES OFF)
in CMakeLists.txt.
Build the examples by running
make build-release
As an example of how to use the library multiple examples are included.
The Lorenz System is particular system of ordinary differential which has a chaotic solution for certain parameters of the system. In particular, the system dynamics for a set of parameters, where the lorenz system has two distinct attractors, is shown below.
Run the lorenz system example by using
make run-lorenz-example
.
As an example of how to use the library a mass-spring-damper system simulation is included.
Run the mass-spring-damper system example by using
make run-mass-spring-damper-example
.