|July 29, 2013, 23:38||
How to Create a Multiple Point Vortice Vector Field
Join Date: May 2013
Posts: 6Rep Power: 5
I want to create a vector field with multiple point vortices in a checkerboard arrangement with alternating rotational directions. I have written a code in python to create a single point vortex in the middle of my grid (see below) but would like to know how to go about creating this multiple point vector field.
from math import * from pylab import * # Set limits and number of points in grid xmax = 10 xmin = -xmax NX = 30 ymax = 10 ymin = -ymax NY = 30 # Make grid and calculate vector components x1 = linspace(xmin, xmax, NX) y1 = linspace(ymin, ymax, NY) X1, Y1 = meshgrid(x1, y1) S21 = -(X1)**2 - (Y1)**2 # This is the radius squared Bx1 = -Y1/S21 By1 = +X1/S21 figure() QP = quiver(X1,Y1,Bx1,By1) quiverkey(QP, 0.85, 1.05, 1.0, '1 mT', labelpos='N') # Set the left, right, bottom, top limits of axes dx = (xmax - xmin)/(NX-1) dy = (ymax - ymin)/(NY-1) axis([xmin-dx, xmax+dx, ymin-dy, ymax+dy]) show() end
Last edited by AHutchison; July 30, 2013 at 05:46.
|Thread||Thread Starter||Forum||Replies||Last Post|
|BlockMeshmergePatchPairs||hjasak||OpenFOAM Native Meshers: blockMesh||11||August 15, 2008 07:36|
|How can I create a rotating monitoring point?||Andy Cong||FLUENT||0||September 10, 2006 20:09|
|how to create the formatted point data for icemcfd||charles||CFX||3||February 28, 2006 21:01|
|Can't see the point, streamline and line in Post||Atit||CFX||0||October 28, 2004 14:53|
|CFX4.3 -build analysis form||Chie Min||CFX||5||July 12, 2001 23:19|