ManifoldID
This Python package provides various methods for finding influential manifolds in the phase space of 2-dimensional ordinary differential equations (ODEs) that are time independent (extensions to time-dependent systems are currently underway). Some tools available in this package include:
- A simple method for plotting phase portraits with both vector fields and trajectories.
- The finite-time Lyapunov exponent, as presented in Haller (2015) and Shadden et al. (2005).
- The trajectory divergence rate, as introduced in Nave, Nolan, and Ross (2019).
- The trajectory-normal repulsion rate, as introduced in Haller (2010), Section 9.
- The largest and smallest eigenvalue field of the Eulerian rate-of-strain tensor, as used in the detection of Objective Eulerian Coherent Structures Serra and Haller (2016).
Example Code
The code operates on functions that take in a two-dimensional vector and return a two-dimensional vector
.
def myFunction(y):
ydot = <something>
return ydot
Next, we can plot, for instance, the phase portrait using phase_plot
import manifoldid as mid
def duffing(y)
ydot = [y[1] ,y[0]-y[0]**3]
return ydot
xlims = [-1.5, 1.5]
ylims = [-1, 1]
mid.phase_plot(duffing, xlims, ylims)
Installation
manifoldid
will soon be available on pip
, but for now, you need to clone the github repository and run the setup.py file.
git clone https://github.com/gknave/ManifoldID.git
cd manifoldid
python setup.py install
To-do List
-
Parallelize!
Many methods in this package require the integration of many trajectories over a grid of initial conditions. Parallelizing the code would speed up performance and make it much more useable. -
Extend to non-autonomous systems
-
Extend to experimental data
Contribute
If you would like to be a part of this project moving forward, there's lots to do! Just send me an email at Gary.Nave@colorado.edu, and we can talk about how to make ManifoldID
even more awesome!
License
MIT License
Copyright (c) 2018 Gary Nave
This is research code. There will likely be bugs.