19.1. User CEL Functions and Routines

User CEL functions enable you to create your own functions in addition to the predefined CEL functions (such as sin, cos, step, and so on). You can then use these functions in any expression where a CEL function can be used. A user CEL function passes an argument list to a subroutine that you have written, and then uses the returned values from the subroutine to set values for the quantity of interest. The figure below demonstrates the concept.

All variables that are available for use in standard CEL expressions are also available for use in User CEL Expressions. A list of these variables is available in Variables and Predefined Expressions Available in CEL Expressions in the CFX Reference Guide.

Details on creating user CEL functions in CFX-Pre and defining quantities via an expression with an argument list are available. For details, see:

Details on creating shared libraries and compiling subroutines are available. For details, see Shared Libraries.

Examples of using user CEL functions are available. For details, see User CEL Examples.