# How to Create a Multiple Point Vortice Vector Field

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 29, 2013, 23:38 How to Create a Multiple Point Vortice Vector Field #1 New Member   Angus Hutchison Join Date: May 2013 Posts: 6 Rep Power: 6 Sponsored Links 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. Code: ``` 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``` Thanks in advance! Last edited by AHutchison; July 30, 2013 at 05:46.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36 Andy Cong FLUENT 0 September 10, 2006 20:09 charles CFX 3 February 28, 2006 21:01 Atit CFX 0 October 28, 2004 14:53 Chie Min CFX 5 July 12, 2001 23:19