
[Sponsors] 
March 17, 2004, 08:02 
Calculating Vorticity

#1 
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, 09:42 
Re: Calculating Vorticity

#2 
Guest
Posts: n/a

I am using CFx4, sorry


March 18, 2004, 06:14 
Re: Calculating Vorticity

#3 
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, 06:19 
Re: Calculating Vorticity

#4 
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, 06:24 
Re: Calculating Vorticity

#5 
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 18, 2004, 10:44 
Re: Calculating Vorticity

#6 
Guest
Posts: n/a

I am still having probs: i am using cfx4 fortran routine called: usrsrc and added the following code into the the routine:
IPHASE = 1 CALL SETWRK('USRSRC','WORK ','VGRAD ',3*NCELL,JVGRAD) CALL SETWRK('USRSRC','WORK ','WGRAD ',3*NCELL,JWGRAD) CALL GRADV('USRSRC',IPHASE,U(1,IPHASE),V(1,IPHASE) + ,W(1,IPHASE),WORK(JUGRAD),WORK(JVGRAD) +,WORK(JWGRAD),XP,YP,ZP,VOL,AREA +,IBLK,IPVERT,IPNODN,IPFACN,IPNODF,IPNODB +,IPFACB,WORK,IWORK,CWORK) CALL DELWRK('USRSRC','WORK','UGRAD') but everytime i run the solver i get a floating point error, (without the routine the simulations runs fine) (the routine does compile) i am running a 3d cylinder with a helix structure wall inside and require to analyse the vorticity, can anyone please help , or point me in the right direction please, 

March 19, 2004, 09:45 
Re: Calculating Vorticity

#7 
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 postprocessing 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, 10:47 
Re: Calculating Vorticity

#8 
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, 17:06 
Re: Calculating Vorticity

#9 
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 CFX5. CFX4 is a dead code, and CFX5 has an expert parameter flag that automatically stores vorticity in the results file. Jeff 

March 22, 2004, 06:55 
Re: Calculating Vorticity

#10 
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: 15 
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: 17,365
Rep Power: 139 
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: 15 
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: 17,365
Rep Power: 139 
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: 15 
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: 17,365
Rep Power: 139 
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.cfdonline.com/Forums/main/ 

July 15, 2010, 15:01 

#17 
Member
^_^
Join Date: Mar 2009
Posts: 36
Rep Power: 16 

July 15, 2010, 15:59 

#18 
Member
^_^
Join Date: Mar 2009
Posts: 36
Rep Power: 16 
I found '"Velocity.Curl" in CFXpost. 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: 14 
Hi,
Sorry to ask this question again. I was looking for variable "Vorticity" or "Velocity Curl"in CFXPost but I could not find it. Does anyone knows is it available in CFX11 or should I define it myself. Thanks in advance 

October 28, 2017, 20:13 

#20  
New Member
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 8 
Quote:
I have a problem with vorticity in a render of CFX for wind tunnel simulation. The results has been attached but I do not exactly know whether they are correct or not because as it expected they should be in reciprocal colour along the ship breadth counter side. Please, advise me if you can. regards 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
vorticity boundary condition  bearcharge  Main CFD Forum  0  May 14, 2010 11:32 
vorticity calculation at symmetryplane  benconnell  OpenFOAM  0  April 14, 2009 18:45 
Vorticity IsoSurface  John  Main CFD Forum  0  April 4, 2009 23:10 
Problems in calculating the fluid traction on the current structure frame in 3D models  fw407  OpenFOAM Running, Solving & CFD  0  August 6, 2008 12:04 
How to update polyPatchbs localPoints  liu  OpenFOAM Running, Solving & CFD  6  December 30, 2005 17:27 