# Cross Product in Vorticity Confinement

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

 May 12, 2010, 09:35 Cross Product in Vorticity Confinement #1 New Member     Join Date: Apr 2010 Posts: 8 Rep Power: 9 Sponsored Links When Vorticity confinement force is described, it's always written as follows: In the 2D case: how can i compute the cross product (ψ x w) ? Isn't ψ a vector (the gradient of a scalar field) and w a scalar (the vorticity in the 2D case is a scalar)? And isn't the cross product of a vector and a scalar undefined? When searchin in google for "Cross product of a scalar" the only site, that doesn't say ".. and a vector is not defined" is the following: http://eprints.nottingham.ac.uk/912/1/paper-submitted.pdf which says "(...) the cross product of a scalar and a vector is a × b = (−a*b_2, a*b_1)." I think that's also the way that nvidea implemented vorticity confinement in its example code. Can anybody explain this to me? is it really a cross product of a scalar and a vector? And why do 99% of the sites say this is impossible?

 May 12, 2010, 12:00 #2 Senior Member   Join Date: Jul 2009 Posts: 245 Rep Power: 12 Vorticity in 2D is not a scalar, it is a vector with one nonzero component directed out of the plane. So all vector operations are applicable.

 May 12, 2010, 13:05 #3 New Member     Join Date: Apr 2010 Posts: 8 Rep Power: 9 OK, thank you, that would solve the syntactical problem . but isn't vorticity defined as x w with w = (u,v)? or as wikipedia says: ? Or is the definition altered for 2D? How does the vector exactly look like, that should i use then in the cross product?

 May 12, 2010, 13:14 #4 Super Moderator     Praveen. C Join Date: Mar 2009 Location: Bangalore Posts: 259 Blog Entries: 6 Rep Power: 11 Thats correct. There is only one component of vorticity as you have written. It points in the z direction.

 May 13, 2010, 15:19 I got it :) #5 New Member     Join Date: Apr 2010 Posts: 8 Rep Power: 9 Ah, so you do a 3D-Cross-Product, even though your simulation is in 2D. Thank you very much for your help

May 14, 2010, 00:08
#6
Super Moderator

Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 259
Blog Entries: 6
Rep Power: 11
Quote:
 Originally Posted by Kastenfrosch Ah, so you do a 3D-Cross-Product, even though your simulation is in 2D. Thank you very much for your help
Yes, thats correct.

 July 30, 2010, 06:45 Minus sign confusion #7 Member   Tibor Nyers Join Date: Jul 2010 Location: Hungary Posts: 91 Rep Power: 10 Hi, I'm implementing Jos Stam's Stable Fluids method and I would like to add vorticity confinement to create a more detailed flow. My implementation is in 2D and I have a simple problem with the very last step: psi = [ psi_x, psi_y, 0] w = [ 0, 0, vort_z ] With the cross product: f_vc_x = dx * e * psi_y * vort_z f_vc_y = dx * e * psi_x * -vort_z My headache is that I've found in other source codes that my minus sign could be wrong (minus goes to the f_vc_x component instead of the y part). It's a simple cross product, but really can't figure out what is wrong. Am I missing something fundamental? Thanks! PS: hopefully, it's ok to post my question here since my problem is quite related.

 Tags cross product, scalar, vector, vorticity confinement

 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 benconnell OpenFOAM 0 April 14, 2009 18:45 John Main CFD Forum 0 April 4, 2009 23:10 maka OpenFOAM Pre-Processing 2 July 17, 2007 14:40 dingxi Main CFD Forum 3 October 18, 2006 13:13 pxyz Main CFD Forum 37 July 7, 2006 08:42