x,y = np.meshgrid(np.linspace(-8,8,30),np.linspace(-8,8,30))
q=3
w=10
freq=2
wavelenght=0.6
r=x**2+y**2
u=np.zeros((len(x),len(y)))
v=np.zeros((len(x),len(y)))
for i in range(0,len(x)):
for j in range (0,len(y)):
if (r[i,j]<=q**(3/4)):
x[i,j]=0
y[i,j]=0
if (r[i,j]>q**(3/4)):
u[i,j]=freq*wavelenght
This is my velocity field and this is how it looks velocity field
I tried some tips I found on other questions similar to mine however I was getting blank graphs or lines that do not make any sense. I guess it's partly due to the zeros in the middle of the graph. What I would appreciate is a method to send massless particles from an initial point with an initial direction and to see how it moves in this field.
Thank you !
It depends what you really need. I can offer something I wrote, but there might be better python packages or functions that can do better. Since I do not really have your vector field, I just tested the code with a mesh-grid vector field coming from the restriction of some polynomial vector field onto the vertices of the mesh-grid. Feel free to use your own mesh-grid vector field