All published worksheets from http://sagenb.org
Image: ubuntu2004
Joris Vankerschaver
In this worksheet, we take a look at potential flow around a cylinder with circulation. We study the effect of varying the circulation on the topology of the streamlines. The standard reference for this system is Batchelor, paragraph 6.6.
Sage has some capabilities to calculate the stream function directly from the complex potential. However, in the interest of speed it is best to define psi directly.
Note that psi becomes unbounded when we approach the origin. If we were to feed psi to the contour_plot command directly, this singularity would obscure all other features of the plot. To avoid this, we define a new function which returns infinity when evaluated on a point inside the circle. These points will be left out of the contour_plot.