STREAM PLOT FLOW EQUATION PLOTTING IN PYTHON

STREAM PLOT FLOW EQUATION PLOTTING IN PYTHON

Video link for better understanding



 %matplotlib qt  # to make a pop up in jupyter this line only required if you are using jupyter compiler

import numpy as np
import matplotlib.pyplot as plt
def floweq(x,y):
    u,v = y**3/3+2*x-x**2*y , x*y**2-2*y-x**3/3
    #u,v = -2*x*np.sin(y),2*y*np.cos(y)
    #u,v =-x,-y
    return u,v
l = 8.0
n = 101
x1 =np.linspace(-l,l,n)
x2 =np.linspace(-l,l,n)
X1,X2 = np.meshgrid(x1,x2)
U,V = floweq(X1,X2)
vels =(U**2+V**2)**0.5
lw = 4*vels/np.max(vels)
plt.figure()
plt.streamplot(X1,X2,U,V,arrowsize =2,arrowstyle ='->',density =2,linewidth =lw) #,cmap =plt.cm.jet,color =vels,
plt.show()




Post a Comment

2 Comments

  1. When determining which technique of sheet metallic slicing is best for you want to} take into consideration the components of flexibility, speed, accuracy, finish, value and automation. There are a few of} basic properties of aluminum that have an effect on} how it may be} minimize. One issue which helps aluminum is that it is a comparatively delicate metallic. This means that chisels, snips, hacksaws and hand shears are efficient on the thinner gauges. If your working from a CNC machining storage or custom job store a few of} inexpensive tools can get you well on your method.

    ReplyDelete
  2. Free Slots are digital slot machines that you can play free of charge, without wagering any real cash. They work equally to real casino slots, the place a player spins the reels in hopes to win the betting line. Herbert S. Mills additional perpetuated the popularity of the Bell machines. By growing the reliability and lowering the 1xbet cost of|the worth of} manufacturing slots, Mills was place to} ship these machines all through the brand new} territories of the United States.

    ReplyDelete

if you are not getting it then ask i am glad to help