Skip to content
This repository was archived by the owner on Oct 12, 2024. It is now read-only.

WalJT/CoolHandyODESolver

 
 

Repository files navigation

CoolHandyODESolver

A fork of pyplane to make some changes & improvements without breaking upstream. Here are the things I want to implement:

  • It's a Web app now
  • Export systems (JSON for re-import) and results (PDF)

TODO for release

  • Skeleton WebUI re-implementing inputs and graph plotting from Qt5 UI
  • Read information passed by user
    • Store equations as strings to be parsed by sympy
    • plot limits as numbers (float)
    • Parameters (key:value pairs, should probably be a dict)
  • Generate a plot from information passed when a button is clicked
  • Rename package source directory & package to CoolHandyODESolver
  • Clean README (Remove or rewrite PyPLANE docs)

TODO for future

  • Clean requirements
    • Standardize on anaconda and setup environment.yml
  • Remove Qt5 code
  • [ ] Dynamically add more parameters
    • Automatically add when non-mathematical symbol detected in equation

PyPLANE

An open source replacement to the traditional DFIELD and PPLANE applications for solving systems of ODEs

Default 2D system 2D system with trajectories 1D system with trajectories

About

PyPLANE is an open source Python application used for the visualisation and (numerical/graphical) solving of systems of ODEs. PyPLANE is released under the GPL-3.0

Installing Pyplane

PyPLANE is available on the Snap Store for Linux

Get it from the Snap Store

Quick Start

If you are using Linux and have installed via the Snap store PyPLANE should appear in your application launcher. If you use Windows or Mac instead, or don't use the Snap store on Linux, you can clone the repository from GitHub and run the top-level run.py file using Python 3. Note that you will need to have installed the following Python libraries for this method:

  • NumPy
  • SymPy
  • SciPy
  • Matplotlib
  • PyQt5

The code snippet below will set up a Python environment to run PyPLANE in isolation without affecting the global Python install. The required libraries listed above will also be installed:

Linux

Ensure that git, and Python3 and the corresponding venv package (python3-venv on Ubuntu) are installed. Then clone the PyPLANE repository and set up the virtual environment as follows.

$ git clone https://github.com/m-squared96/PyPLANE
$ cd PyPLANE/
$ python3 -m venv env
$ source env/bin/activate
$ pip install -r requirements.txt

PyPLANE can then be launched using:

$ cd /path/to/PyPLANE
$ source env/bin/activate
$ python3 ./run.py

One way or another, you should now have launched PyPLANE!

Quick User Guide

The Phase Space Plot

The phase space plot on the right hand side of the application GUI can be interfaced directly with the mouse. By double-clicking on the plot a trajectory is plotted, with the click-coordinates used as an initial condition.

Furthermore, nullclines and fixed points can be toggle on/off from the Edit menu.

Editing the System

One of PyPLANE's main features is its ability to analyse both one- and two-dimensional systems. To change the number of dimensions select the appropriate option from the Dimensions menu.

On the one-dimensional interface, the only dependent variable is x, with the independent variable being t. For two dimensions the dependent variables are x and y.

In the text box(es) in the top left of the screen, the user can define the expressions used for the system's derivative(s). Any symbols in the text boxes should conform to one of the points below:

  • Mathematical operators/functions (i.e. +,-,*,/,sin,cos etc.);
  • References to the dependent or independent variables (t,x,y);
  • References to parameters;

Parameters are constants which can take any value; they can be edited in the text boxes provided below the axes limits. Any constant parameters referenced in the derivative definitions should be defined in the boxes provided.

About

Fork of m-squared96/PyPLANE to make some changes and improvements without breaking upstream.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%