# Calculating Vorticity

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

 March 17, 2004, 09:02 Calculating Vorticity #1 David Guest   Posts: n/a I am trying to calculate vorticity (3 D), is there a easier way to obtain this information than using a fortran user routine??? Thanks David

 March 17, 2004, 10:42 Re: Calculating Vorticity #2 David Guest   Posts: n/a I am using CFx4, sorry

 March 18, 2004, 07:14 Re: Calculating Vorticity #3 Bart Prast Guest   Posts: n/a If you have the velocity gradients (should be available in the code), then getting the vorticity is straightforward.

 March 18, 2004, 07:19 Re: Calculating Vorticity #4 David Guest   Posts: n/a Hi, But how do i obtain the code, using cfx analyse or do i have to create a fortran subroutine to output this?

 March 18, 2004, 07:24 Re: Calculating Vorticity #5 Bart Prast Guest   Posts: n/a I work in CFX post, do not know about cfx analysis. But having the velocity gradients in the results file, then you can create a new variable (vector) which is made up of the vorticity (components). A post processing program like fieldview can even calculate the rotation of the velocity field for you

 March 19, 2004, 10:45 Re: Calculating Vorticity #7 Gloria Gaynor Guest   Posts: n/a The USRSRC subroutine is intended to perform source terms within your transport equations, variables, etc... If you want to evaluate vorticity for post-processing only you should use USRTRN instead. Try it on this subroutine and see if you still get floating point errors. Cheers, G. G.

 March 19, 2004, 11:47 Re: Calculating Vorticity #8 David Guest   Posts: n/a hi, I have managed to get the fortran code to compile and run, but now the prob is that it is not storing the results in the output file .fo nor can i see the gradients of the velocity in cfx anaylse?? i must be doing something? wrong? can anybody help me please

 March 19, 2004, 18:06 Re: Calculating Vorticity #9 Jeff Guest   Posts: n/a David, Using USRTRN is a wise move. You can also put the code in an IF structure so that it is only executed when KSTEP.GE.NSTEP (this will only execute after the very last iteration). You've calculated the gradients, but not done anything with them. Create some passive user scalars (these start with USRDCC, see chapter 2 of user guide) and store your values in the scalars at each nodal value. These user scalars will then be available to plot in the post processor. Alternately, use CFX-5. CFX-4 is a dead code, and CFX-5 has an expert parameter flag that automatically stores vorticity in the results file. Jeff

 March 22, 2004, 07:55 Re: Calculating Vorticity #10 David Guest   Posts: n/a Hi, thanks for help, after learning how to user Fortran i managed to do it! (it was v. painful lol!!!) also thanks on the blocks structures Jeff, cheers David

 July 7, 2010, 12:20 #11 New Member   Antonio Join Date: Sep 2009 Posts: 12 Rep Power: 9 David, do you still have the fortran code or can you address to a formulation of the vorticity calculations given the velocities? thank you Antonio

 July 7, 2010, 19:12 #12 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 12,707 Rep Power: 98 Are you using CFX4? The fortran he discusses is in that very old version. If you are using CFX5 or higher it is already a variable you can select so no need to calculate it.

 July 7, 2010, 20:31 #13 New Member   Antonio Join Date: Sep 2009 Posts: 12 Rep Power: 9 I am using fortran for simulating the fluid flow not based on Navier Stokes but on lattice Boltzmann method! I would like to evaluate the vorticity, given the velocity vectors. Regards Antonio

 July 8, 2010, 08:33 #14 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 12,707 Rep Power: 98 Then why are you posting on a CFX forum? From the velocity you will need to evaluate the spatial derivatives and get the vorticity from there. a google search will find the definition of vorticity in a flash.

 July 8, 2010, 09:58 #15 New Member   Antonio Join Date: Sep 2009 Posts: 12 Rep Power: 9 I'm sorry about posting in the wrong space, but there is no space for programming. A person wrote about programming in this thread before, that's why. If you can address to a bettere section I'd be pleased to cahnge. Anyway given the definition of vorticity, doesn't mean you can evaluate it. The vorticity is, for the x direction, equal to: _x=(u_z(x,y+1,z)-u_z(x,y,z))-(u_z(x,y,z+1)-u_z(x,y,z)) since u/x=lim(x-->0)[u(x+x)-u(x)]/x hence I have to take the value of the next lattice minus the value at the lattice divided by one, which is the x. Apparently tihs doesn't give the expected result in terms of vorticity. I was reading something here: http://folk.uio.no/jks/matpiv/html/node31.html but I'm not sure and I wanted the opinions of CFD, since in CFD softwares the vorticity is evaluated automatically. Regards Antonio

 July 8, 2010, 18:44 #16 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 12,707 Rep Power: 98 Vorticity is simply the curl of the velocity field. See: http://en.wikipedia.org/wiki/Vorticity So you simply need to evaluate the spatial derivatives of velocity and get the vorticity from that. The equation you quote has the evaluation of the derivatives mixed up with the evaluation of the vorticity. That is a bad idea. This question was more suited to the main CFD forum - http://www.cfd-online.com/Forums/main/

July 15, 2010, 15:01
#17
Member

^_^
Join Date: Mar 2009
Posts: 36
Rep Power: 9
Hi Ghorrocks,
I am using CFX12. I can't find "vorticity" in variables. Why?

Quote:
 Originally Posted by ghorrocks Are you using CFX4? The fortran he discusses is in that very old version. If you are using CFX5 or higher it is already a variable you can select so no need to calculate it.

 July 15, 2010, 15:59 #18 Member   ^_^ Join Date: Mar 2009 Posts: 36 Rep Power: 9 I found '"Velocity.Curl" in CFX-post. It is the vorticiy I guess.

 June 15, 2011, 08:21 #19 New Member   Irfan Join Date: Jan 2011 Location: Netherlands Posts: 16 Rep Power: 7 Hi, Sorry to ask this question again. I was looking for variable "Vorticity" or "Velocity Curl"in CFX-Post but I could not find it. Does anyone knows is it available in CFX-11 or should I define it myself. Thanks in advance

 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 bearcharge Main CFD Forum 0 May 14, 2010 11:32 benconnell OpenFOAM 0 April 14, 2009 18:45 John Main CFD Forum 0 April 4, 2009 23:10 fw407 OpenFOAM Running, Solving & CFD 0 August 6, 2008 12:04 liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 18:27

All times are GMT -4. The time now is 10:17.