CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Plot swirl number along length of a tube (https://www.cfd-online.com/Forums/cfx/143432-plot-swirl-number-along-length-tube.html)

Pacca October 24, 2014 08:57

Plot swirl number along length of a tube
 
Hello everybody,

I'm doing some simulations with CFX of a swirling flow in a tube. After obtaining a solution, i defined in CFD-Post the swirl number as:
Code:

areaInt(Density*(X^2+Y^2)*sqrt(Velocity w^2)*sqrt((Velocity u^2)+(Velocity v^2)))@Plane 2/(maxVal(sqrt(X^2+Y^2))@Plane 2*areaInt(Density*(sqrt(X^2+Y^2))*Velocity w^2)@Plane 2)
where Plane 2 is a plane perpendicular to the axis direction Z
Now I'm trying to plot the variation of this variable along the length of the tube, creating a user defined variable SN. But I don't know how to plot it using different planes from Plane 2, because now if i plot SN I have only the same value along the length.
I searched some tutorial or doc but I can't understand how to do this...
I hope that someone can help me :)

ghorrocks October 26, 2014 05:58

You will probably have to export this from CFX (using file/export and specifying your line as the object and your variable as the output variable) and plot it in something else like excel, matlab, python or whatever you flavour of graphing software is.

Pacca October 26, 2014 06:24

Thank you for your answer!
The problem is that the variable SN is defined with the expression i wrote in the first post. In this expression there is the geometrical place @Plane 2, and so also exporting the data gives me only the value at that plane. Instead I want the plane to move along the Z axis to calculate the different values of SN...
I have to create one plane where evaluate the SN for every point of my plot or there is a way to do this automatically?

ghorrocks October 26, 2014 06:28

I fear you will have to create a plane at each location. Use a session file to make this easier. You get bonus points if you use a perl script looping structure. I only have a small brain which avoids perl whenever possible so I would just generate a text file which contains the full session file.

Pacca October 26, 2014 06:37

I have to admit that I'm new with this kind of stuff, I don't know how to make session files...do you now where I can find some help documents on this topic? Or do you know how to make this tipe of sesion file?
Again, thank you very much!

ghorrocks October 26, 2014 16:20

The best way to learn is to open up CFD-Post, and start recording a session file from the top menu. Do the operations you want to repeat and have a look at the text file it generates. Then edit the text file to do what you want and replay it the generate your data.

Pacca October 27, 2014 14:42

Thank you very much! I solved my problems :)


All times are GMT -4. The time now is 07:45.