CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   relative velocity postprocessing (http://www.cfd-online.com/Forums/main/66779-relative-velocity-postprocessing.html)

Salman July 23, 2009 20:56

relative velocity postprocessing
 
Hi,
I am simulating an axial fan using Multiple reference frame (MRF). The model consists of 2 stationary zones and 1 rotating (rotor) zone. After having a converged solution, I am unable to view the relative velocity vectors. They are the same as the absolute velocity vectors. I have exported all the related data to ensight and same behaviour is observed there too. Can anybody help me that how can i have the relative velocity data either in Fluent or in ensight for postprocessing like streamlines and relative velocity vectors.
Thanks in advance

kevincolburn July 24, 2009 10:47

Relative Velocity in EnSight
 
In EnSight, you can use the calculator functions to create the relative velocity vectors, using the absolute velocity (read in), and the motion you prescribed (constant). I suspect that you will have to break out the X and Y components of Cartesian velocity from your Omega velocity. Using the coordinates as well to determine the radius for transferal of your rotational velocity to Cartesian.
-kevin (kevin@ensight.com)

Salman July 24, 2009 14:46

Hi,
thanks for the kind advice. Infact I wanted to avoid this vector calculations but i think I must do that.
Anyhow, my axis of rotation is +y. Down here is some sort of attempt to have the relative velocity. Please check, if possible, for errors, if any.

c: abs vel, u: circumferential vel, w: rel vel, N: rpm
c=u +w ------> w = c - u
u= omega * r = [(2*pi*N/60) * sqrt(x^2+z^2)]
u_x = abs(u) * cos(theta)
u_y = abs(u) * sin(theta)

Now : w_x = c_x - u_x
w_z = c_z -u_z

and w = sqrt [(w_x)^2 + (w_y)^2]

Please guide me also if I am doing something wrong or missing anything....
thanks a lot

kevincolburn July 24, 2009 21:14

I think that you are correct there. On the face of it, your equations look correct. Your method is certainly correct. You can do this either through the calculator, or through python routine (therefore use again/document/adjust).
-kevin

Salman July 25, 2009 04:44

Thank you very much for sparing the time...
I have no idea about python routine. I am sorry, I am a sort of beginner in Ensight!!!!
If you think that its a better approach or less time consuming, then I can go through it. I hope I can find it in the user guide documents.
Salman

kevincolburn July 26, 2009 06:04

1 Attachment(s)
Something like this should work for you. I have not tested it out on a real case, but it should work. Save the file off as a ".py" extension. (You can use most editors to edit the text file). Within EnSight, go to File --> command and select the "python" tab. Click on edit python routine (and specify the file), and then select "Run script".
Example python routine attached.

Salman July 27, 2009 08:59

thanks for the kind effort. I hope it will work as you guided. I have one more question:
I have two fluid zones, rotating and stationary. In ensight, they are numbered as 1 and 2 respectively (Part ID). Now for the command "ensight.part.select_all()", I am a bit confused. Should it be written as "ensight.part.select_all(1,2)" to select these two parts? Please confirm if I am right otherwise advise. I will be grateful
Salman

kevincolburn July 27, 2009 09:08

the syntax would be : ensight.part.select_begin(1,2) to grab just parts #1 and #2. You can also reference Chapter 6 in the "Interface Manual" in your EnSight installation for more detail on syntax.

Salman July 27, 2009 09:35

Thank you very much.


All times are GMT -4. The time now is 12:05.