Streamlines of A Free Vortex
We think a case of
, .
Then, when we think about velocity of this flow along x and y axis.
Then we can get Figure1.
However, when we think about inertial frame of reference.
In this particular case, velocity is equivalent to this formula.
[v_{moving} = v_{static} - v_{frame}]
Hence, we just add constant V in u.
Thus, we can get Figure 2.
import matplotlib.pyplot as plt import numpy as np x = np.linspace(-2,2,1000); y = np.linspace(-2,2,1000); C = 1; V = 1; U = 0; u = -C*y[:,np.newaxis]/(x**2 + y[:,np.newaxis]**2) - V; v = C*x/(x**2 + y[:,np.newaxis]**2) - U; speed = np.sqrt(u*u + v*v) plt.figure() plt.streamplot(x, y, u, v, density=(2,2), color='k', linewidth=100*speed/speed.max()) plt.show()
#two free vortices
import matplotlib.pyplot as plt import numpy as np x = np.linspace(-2,2,1000); y = np.linspace(-2,2,1000); C = 5; D = -1; V = 0; U = 0; x0 = 1; x1 = -1; u = -C*y[:,np.newaxis]/(2*np.pi*((x-x0)**2 + y[:,np.newaxis]**2)) - D*y[:,np.newaxis]/(2*np.pi*((x-x1)**2 + y[:,np.newaxis]**2)) - V; v = C*(x-x0)/(2*np.pi*((x-x0)**2 + y[:,np.newaxis]**2)) + D*(x-x1)/(2*np.pi*((x-x1)**2 + y[:,np.newaxis]**2)) - U; speed = np.sqrt(u*u + v*v) plt.figure() plt.streamplot(x, y, u, v, density=(2,2), color='k', linewidth=100*speed/speed.max()) plt.show()