Whipped up a streamline simulation using potential energy equations I just learned in AVDASI 1. Since you can run Python code on iOS now, I can make these graphs in realtime during lectures :) .
The following components can be added to the graph either in code or clicking on the graph itself:
- Sources
- Sinks
- Vortices (both clockwise and anticlockwise)
- Doublets
In code, you can add components on the sources = [] line. To operate the graph, there are 6 clicks per refresh.
Note at the bottom there are 6 sequential options. The first click will place a source, second a sink, etc.
The 6th click (Clear), will remove all components from the graph, returning it to initial conditions.
If you wish to not place a certain component down,
clicking between the top left corner and the red dot will ignore the input.
Stagnation points are automatically plotted on the graph (depicted by the red 'x' marks). The tolerance can be changed, as points are searched for and not calculated directly (resulting in multiple points on the graph).
Ideally you should be able to either define bodies or select a number of streamlines to use as a body. This would be extremely helpful in visualizing flow around an object.
The main_ipad.py script should be run in Pythonista (3.6). This version is actually more straightforward and useful than the standalone Matplotlib version. To operate, left and right arrow cycle the types of components, while the up and down arrow change the strength by 1 (using shift changes the strength by 5). Pressing M will change touch modes between Add and Inspect. Keyboard required for key input.


