17.1. Examples of Power Syntax

The following are some examples in which the versatility of power syntax is demonstrated. They become steadily more complex in the later examples.

Some additional, more complex, examples of Power Syntax subroutines can be found by viewing the session files used for the Macro Calculator. These are located in CFX/etc/. You can execute these subroutines from the Command Editor dialog box the same as calling any other Power Syntax subroutine. The required argument format is:

!cpPolar(<"BoundaryList">, <"SliceNormalAxis">,
   <"SlicePosition">, <"PlotAxis">, <"InletLocation">,
   <"ReferencePressure">)
!compressorPerform(<"InletLocation">, <"OutletLocation">,
   <"BladeLocation">, <"MachineAxis">, <"RotationalSpeed">,
   <"TipRadius">, <"NumBlades">, <"FluidGamma">)

These subroutines are loaded when CFD-Post is launched, so you do not need to execute the session files before using the functions.

Additional information on these macro functions is available in Gas Compressor Performance Macro and Cp Polar Plot Macro.

All arguments passed to subroutines should be enclosed in quotations, for example Plane 1 must be passed as "Plane 1" and Eddy Viscosity should be entered as "Eddy Viscosity". Any legal CFX Command Language characters that are illegal in Perl need to be enclosed in quotation marks.