CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

How to Create a Multiple Point Vortice Vector Field

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 29, 2013, 23:38
Default How to Create a Multiple Point Vortice Vector Field
  #1
New Member
 
Angus Hutchison
Join Date: May 2013
Posts: 6
Rep Power: 4
AHutchison is on a distinguished road
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.
AHutchison is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -4. The time now is 18:08.