CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Calculating Vorticity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 17, 2004, 09:02
Default 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
  Reply With Quote

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

Old   March 18, 2004, 07:14
Default 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.
  Reply With Quote

Old   March 18, 2004, 07:19
Default 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?

  Reply With Quote

Old   March 18, 2004, 07:24
Default 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
  Reply With Quote

Old   March 18, 2004, 11:44
Default Re: Calculating Vorticity
  #6
David
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,

  Reply With Quote

Old   March 19, 2004, 10:45
Default 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.
  Reply With Quote

Old   March 19, 2004, 11:47
Default 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
  Reply With Quote

Old   March 19, 2004, 18:06
Default 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
  Reply With Quote

Old   March 22, 2004, 07:55
Default 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
  Reply With Quote

Old   July 7, 2010, 13:20
Default
  #11
New Member
 
Antonio
Join Date: Sep 2009
Posts: 12
Rep Power: 17
mortain is on a distinguished road
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
mortain is offline   Reply With Quote

Old   July 7, 2010, 20:12
Default
  #12
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   July 7, 2010, 21:31
Default
  #13
New Member
 
Antonio
Join Date: Sep 2009
Posts: 12
Rep Power: 17
mortain is on a distinguished road
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
mortain is offline   Reply With Quote

Old   July 8, 2010, 09:33
Default
  #14
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   July 8, 2010, 10:58
Default
  #15
New Member
 
Antonio
Join Date: Sep 2009
Posts: 12
Rep Power: 17
mortain is on a distinguished road
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:
\omega_x=(u_z(x,y+1,z)-u_z(x,y,z))-(u_z(x,y,z+1)-u_z(x,y,z))
since \partialu/\partialx=lim(\Deltax-->0)[u(x+\Deltax)-u(x)]/\Deltax hence I have to take the value of the next lattice minus the value at the lattice divided by one, which is the \Deltax.

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
mortain is offline   Reply With Quote

Old   July 8, 2010, 19:44
Default
  #16
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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/
ghorrocks is offline   Reply With Quote

Old   July 15, 2010, 16:01
Default
  #17
Member
 
^_^
Join Date: Mar 2009
Posts: 36
Rep Power: 17
Jasmine is on a distinguished road
Hi Ghorrocks,
I am using CFX12. I can't find "vorticity" in variables. Why?

Quote:
Originally Posted by ghorrocks View Post
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.
Jasmine is offline   Reply With Quote

Old   July 15, 2010, 16:59
Default
  #18
Member
 
^_^
Join Date: Mar 2009
Posts: 36
Rep Power: 17
Jasmine is on a distinguished road
I found '"Velocity.Curl" in CFX-post. It is the vorticiy I guess.
Jasmine is offline   Reply With Quote

Old   June 15, 2011, 09:21
Default
  #19
New Member
 
Irfan
Join Date: Jan 2011
Location: Netherlands
Posts: 16
Rep Power: 15
iffy is on a distinguished road
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
iffy is offline   Reply With Quote

Old   October 28, 2017, 21:13
Default
  #20
New Member
 
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9
hamed1983 is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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/
Dear Ghorrocks


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
Attached Images
File Type: png CFX5.png (35.4 KB, 37 views)
hamed1983 is offline   Reply With Quote

Reply


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


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


All times are GMT -4. The time now is 04:22.