CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   (CFX POST) Rotational Speed (http://www.cfd-online.com/Forums/cfx/22829-cfx-post-rotational-speed.html)

 ARJUN July 11, 2006 05:43

(CFX POST) Rotational Speed

Dear friends,

I am very much new to CFD and use CFX 10.0 for my simulation of a compressor stage (R1/S1). For the analysis I specify a shaft speed of (-12000 [rev min^-1]) in CFX Pre. Now in post I have a macro line to creat the "output.dat" file and print required results there. I want the tool to print the same value of rotational speed (-12000 [rev min^-1]) using custom CFX post Macro. Guess I am missing something here.

How can I obtain this same value of rotational speed (-12000 [rev min^-1]) and print it on to the "output.dat" file.

I would be very grateful if you could help me out.

Best regards....

 Dr. Bian July 11, 2006 08:52

Re: (CFX POST) Rotational Speed

You can get "omega" from the result file. If the unit is I-P, then RPM=omega*9.5463. Anyway, print out omega first, then you would know what is the conversion constant.

 ARJUN July 11, 2006 10:43

Re: (CFX POST) Rotational Speed

Dear Dr. Bian,

Thank you very much for the solution.

I would be much obliged if you could kindly let me know how could I print omega from the result file using a custom macro i.e. what should be the syntax within the macro for getting this readily available (CFXpre INPUT) value. I tried a lot of combination but in vain.

Thanking once again.

Best regards, Arjun

 Robin July 11, 2006 12:49

Re: (CFX POST) Rotational Speed

The rotational speed of your domain is provided in Post as a CEL variable named "Angular Velocity".

 ARJUN July 12, 2006 04:41

Re: (CFX POST) Rotational Speed

Dear Robin,

As I am new to CFX especially in CFX macros. Could you kindly give me an exact syntax which I need to write within the macro so that I could print the rotational speed of my domain which is provided in Post as a CEL variable named "Angular Velocity". as an output in a file (for example I write the following to get the total pressure:

! \$Pt1 = massFlowAveAbs("Total Pressure in Stn Frame","R1 Inlet"); # Total pressure at rotor1 inlet, Pa

Best regards, Arjun

 Robin July 12, 2006 14:28

Re: (CFX POST) Rotational Speed

Hi Arjun,

Use the "evaluate()" Perl function. It evaluates any expression and returns the value and units as a string. You can also use this insteead of the massFlowAveAbs() funtion. For example:

(\$Pt1,\$Pt1_units)=evaluate('massFlowAveAbs(Total Pressure in Stn Frame)@R1 Inlet');

Note the single quotes. If you use double quotes, you will need to escape the @ character or Perl will choke. To get the rotational speed:

(\$omega, \$omega_units)=evaluate('Angular Velocity');

As an alternative to your macro, you could always populate a table with the expressions you want and simply export the table to a csv or html file instead.

Regards, Robin

 ARJUN July 13, 2006 04:49

Re: (CFX POST) Rotational Speed

Dear Robin,

Thank you very much for the solution.

It has solved the problem. I now can calculate using the equation;

abs(omega) = (3.14 * RPM) / 30

the speed.

So the obtained RPM value is 12006.076302498 (target value: 12000).

Is this slight difference due to the mathematical solver? Is their any scope of bringing the value down close to the true value of 12,000 RPM?

Thank you very much once again. I am very much grateful to you.

Best regards, Arjun

 Robin July 13, 2006 09:56

Re: (CFX POST) Rotational Speed

Hi Arjun,

Try using 'pi' instead of 3.14.

Regards, Robin

 Dr. Bian July 13, 2006 20:35

Re: (CFX POST) Rotational Speed

Like what Robin said, you can get omega by similar gramma. I am not very good at perl command of ccl. But I would suggest you to look at some demo .cse files in the CFX folder for pump, etc. From that, you can learn more. I just modified those files to calculate and print out the performance report.

 Dr. Bian July 13, 2006 20:38

Re: (CFX POST) Rotational Speed

I would say omega is an existing variable when you are in the CFX post. I calculate rpm from omega. Meanwhile, the table Robin mentioned is also very useful and more direct.

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