CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

how to compute relative velocity from absolute?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 8, 2010, 07:03
Default how to compute relative velocity from absolute?
  #1
spk
Member
 
Join Date: Aug 2009
Posts: 67
Rep Power: 8
spk is on a distinguished road
Hi guys,

I simulate a centrifugal pump with MRF using Fuent.
MRF calculates only the absolute velocity.
I try to compute the corresponding relative velocity for the rotating zone using Ensight writing this python file:

# Select all of the parts in EnSight to calculate this new variable on
ensight.part.select_all()
# Break out the Coordinate components
ensight.variables.evaluate("cordX = Coordinates[X]")
ensight.variables.evaluate("cordY = Coordinates[Y]")
ensight.variables.evaluate("cordZ = Coordinates[Z]")
# Calculate U = circumferential velocity (N = 1350 rpm)
ensight.variables.evaluate("U = (2*3.1415927*1350/60)*SQRT(cordX^2+cordY^2)")
# Calculate component rotational velocity
ensight.variables.evaluate("theta = ATAN(cordX/cordY)")
ensight.variables.evaluate("U_X = ABS(U) * COS(theta)")
ensight.variables.evaluate("U_Y = ABS(U) * SIN(theta)")
# Now, activate (load) the absolute velocity
ensight.variables.activate("velocity")
# Calculate components of relative velocity
ensight.variables.evaluate("W_X = velocity[X] - U_X")
ensight.variables.evaluate("W_Y = velocity[Y] - U_Y")
# Calculate the magnitude of the relative velocity
ensight.variables.evaluate("W = SQRT(W_X^2 + W_Y^2)")


But it calculates only the arithmetic value of relative velocity,
no the direction of it.

Is there anyone who can help me?
Is there other way to solve my problem?

Thanks a lot,
spk
spk is offline   Reply With Quote

Old   July 8, 2010, 15:50
Default
  #2
agd
Senior Member
 
Join Date: Jul 2009
Posts: 218
Rep Power: 10
agd is on a distinguished road
This may be a stupid question, so pardon me if it is - if you have the components of the relative velocity (Wx,Wy), (and assuming you know the basis vectors of the relative coordinate system) then don't you have the information you need? Or is the code not working to return Wx and Wy? Or is the issue that you aren't sure about the direction of the basis vectors? It's not clear exactly what you are having a problem with.
agd is offline   Reply With Quote

Old   July 9, 2010, 04:36
Default
  #3
spk
Member
 
Join Date: Aug 2009
Posts: 67
Rep Power: 8
spk is on a distinguished road
Hi agd,

The problem is that fluent calculates only the absolute velocity and there is no way to see the relative velocity.
So, i use a postprocessing program (Ensight). I run the above python file and it computes the relative velocity (W, Wx, Wy) but the direction of vectors of relative velocity is the same with the corresponding of absolute velocity! I think that this code does not compute the direction of the relative velocity, but only the arithmetic value. Is there another way to see the relative velocity?
spk is offline   Reply With Quote

Old   July 9, 2010, 08:42
Default
  #4
agd
Senior Member
 
Join Date: Jul 2009
Posts: 218
Rep Power: 10
agd is on a distinguished road
When you say that the direction is the same are you referring to the basis vectors of the coordinate system, or are you saying that the relative velocity vectors are just uniformly scaled down from the absolute velocity vectors? In the first case, you would have the relative velocity vector as WxI + WyJ. In the second case, you would probably have an error in your script.
agd is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to derive relative velocity in MRFSimpleFoam? renyun0511 OpenFOAM Running, Solving & CFD 21 June 3, 2015 12:28
[UDF] Relative coordinates in logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 24 February 23, 2015 05:33
how to check absolute velocity values gaurav FLUENT 7 May 17, 2004 17:07
How Fluent compute slip velocity in cavitation? Giang T Vu FLUENT 1 May 5, 2004 04:42
Fluent-V5,Turbomachinery (stagnation pressure live its own life) Alberto Tamm Main CFD Forum 19 May 27, 1999 14:42


All times are GMT -4. The time now is 19:25.