Calculating Vorticity
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 
Re: Calculating Vorticity
I am using CFx4, sorry

Re: Calculating Vorticity
If you have the velocity gradients (should be available in the code), then getting the vorticity is straightforward.

Re: Calculating Vorticity
Hi,
But how do i obtain the code, using cfx analyse or do i have to create a fortran subroutine to output this? 
Re: Calculating Vorticity
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

Re: Calculating Vorticity
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, 
Re: Calculating Vorticity
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. 
Re: Calculating Vorticity
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

Re: Calculating Vorticity
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 
Re: Calculating Vorticity
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 
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 
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. 
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 
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. 
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 
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/ 
Hi Ghorrocks,
I am using CFX12. I can't find "vorticity" in variables. Why? Quote:

I found '"Velocity.Curl" in CFXpost. It is the vorticiy I guess.

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 
All times are GMT 4. The time now is 15:17. 