Hi All,

I would like to use matplotlib's streamplot function to display the fluid flow 
in the stokesCavity example. Furthermore, I would like to extend this for my 
own simulations of fluid flow (following the same code as stokesCavity but with 
different BCs) for an irregular mesh generated from Gmsh. 

With the stokesCavity example, I initially thought I would be able to call the 
streamplot function right away using: 
matplotlib.pyplot.streamplot(X, Y, xVelocity.value, yVelocity.value), however, 
all these variables are 1D arrays rather than NxN arrays. With a rectangular 
grid creating code to change the 1D arrays into NxN may not be too bad, but for 
an irregular grid this task seems daunting.

Then I thought the code for the matplotlibVectorViewer function could be 
adjusted since matplotlib's streamplot() and quiver() functions take the same 
arguments. I looked at the code in the file 
FiPy-3.0/fipy/viewers/matplotlibViewer/matplotlibVectorViewer.py, but I'm lost 
as to what code to adjust or if I'm adjusting code in the right area.

In short, is there a way to change the matplotlibVectorViewer function from 
plotting quiver() to plotting streamplot()?

Thanks everyone for your time,
Ryan Smith
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to