www.kxcad.net Home > CAE Index > ANSYS Index > ANSYS CFX Index
real Length("Location")Returns the value of length. For details, see length.
While using this function in Power Syntax the leading character is capitalized to avoid confusion with the Perl internal command “length.”
real areaAve("Variable", "Location", "Axis")Returns the area-weighted average of the variable. For details, see areaAve.
real areaInt("Variable", "Location", "Axis")Returns the result of the variable integrated over the 2D Location. For details, see areaInt.
real ave("Variable", "Location")Returns the arithmetic average of the variable. For details, see ave.
This is a special macro. For details, see Gas Compressor Performance. For example:
compressorPerform("Inlet", "Outlet", "Blade", "X", 600, 0.03, 10, 1.2)real count("Location")Returns the number of nodes on the location. For details, see count.
This is a special macro. For details, see Cp Polar Plot. For example:
cpPolar("Plane 1", "Y", 0.3, "X", "Inlet", 10000)real,string evaluate("Expression")Returns the value of the expression and the units. Only one expression can be evaluated each time the subroutine is executed.
The main advantage of using evaluate is that it takes any CEL expression. This means that you do not have to learn any other quantitative power syntax routines
described in this section. Also, evaluate will return the result units in addition to the value.
An example is:
evaluate("areaAve(Velocity v)\@Location 1")In this case, another subroutine is evaluated. The evaluate command takes an any expression as the argument, or more precisely, any expression that resolves to a quantity, i.e., you
cannot use:
"2*Pressure"
but you can use:
"2*minVal(Pressure)\@locator 1"
or
"100 [m]"
This is simply an alternative way of typing:
! $myVal = 2 * minVal("Pressure", "Location");The reason that the @ is escaped calling evaluate() is to avoid Perl treating it as a special character.
real forceNorm("Location", "Axis")Returns the forceNorm value. For details, see forceNorm.
A utility function that takes a CCL object and parameter name and returns the value of the parameter.
getValue("Object Name", "Parameter Name")Returns the value stored in Parameter Name.
Create a text object called Text 1.
In the Text String box, enter Here is a text string.
Click Apply to create the text object.
In the Command Editor dialog box, enter the following:
!string = getValue( "/TEXT:Text 1/TEXT ITEM: Text Item 1", "Text String"); ! print $string;
Click Process, and the string will be printed to your terminal window.
The same procedure can be carried out for any object.
real lengthAve("Variable", "Location")Returns the length-based average of the variable on the line locator. For details, see lengthAve.
real lengthInt("Variable", "Location")Returns the length-based integral of the variable on the line locator. For details, see lengthInt.
real massFlow("Location")Returns the mass flow through the 2D locator. For details, see massFlow.
real massFlowAve("Variable", "Location")Returns the calculated value of the variable. For details, see massFlowAve.
real massFlowInt("Variable","Location")Returns the calculated value of the variable. For details, see massFlowInt.
real maxVal("Variable", "Location")Returns the maximum value of the variable at the location. For details, see maxVal.
real minVal("Variable", "Location")Returns the minimum value of the variable at the location. For details, see minVal.
real probe("Variable", "Location")This calculation should only be performed for point locators described by single points. Incorrect solutions will be produced for multiple point locators.
Returns the value of the variable at the point locator. For details, see probe.
(real, real) range("Variable", "Location")Returns the minimum and maximum values of the variable at the location.
void showPkgs()
Returns a list of packages available which may contain other variables or subroutines in Power Syntax.
void showSubs("String packageName")Returns a list of the subroutines available in the specified package. If no package is specified, ANSYS CFX-Post is used by default.
void showVars("String packageName")Returns a list of the Power Syntax variables and their current value defined in the specified package. If no package is specified, ANSYS CFX-Post is used by default.
real sum("Variable", "Location")Returns the sum of the variable values at each point on the locator. For details, see sum.
real torque("Location", "Axis")Returns the computed value of torque at the 2D locator about the specified axis. For details, see torque.