CFX! CFX Expression Language(CEL) 5.5 2001AEA Technology
CFX 5.5 © 2001AEA Technology 4-1 CFX Expression Language (CEL)
CFX! Introduction CEL-CFX Expression language CEL is an interpreted declarative language which enables users to enhance simulations without recourse to external fortran routines It uses mathematical expressions for physical quantities as opposed to using fixed values Access to CFX-5 internal variables(including solution variables) Can use built-in mathematical functions Can be used on any form which has an Expression Editor button Examples to use CeL Complex boundary conditions Variable material properties Variable initial conditions Extra terms to the governing equations 5.5 2001AEA Technology
CFX 5.5 © 2001AEA Technology 4-2 Introduction CEL - CFX Expression Language. - CEL is an interpreted, declarative language which enables users to enhance simulations without recourse to external fortran routines. - It uses mathematical expressions for physical quantities as opposed to using fixed values. - Access to CFX-5 internal variables (including solution variables). - Can use built-in mathematical functions. - Can be used on any form which has an Expression Editor button. - Examples to use CEL: > Complex boundary conditions. > Variable material properties. > Variable initial conditions. > Extra terms to the governing equations
CFX! Values and expressions CEL can be used to generate both values and expressions Values Values are constants Different units for dimensional values are available from the Select units list Expressions Expressions are mathematical combinations of predefined values, system variables(.g u, v, w.),numerical constants and other predefined expressions Can use in-line units when creating expression e.g,X+5m Expressions and values may be entered directly into physical quantity forms or they may be developed in the expression editor and referred to by name 5.5 2001AEA Technology
CFX 5.5 © 2001AEA Technology 4-3 Values and Expressions CEL can be used to generate both values and expressions. - Values. > Values are constants. > Different units for dimensional values are available from the Select Unitslist. - Expressions. > Expressions are mathematical combinations of predefined values, system variables (e.g. u, v, w ...), numerical constants, and other predefined expressions. > Can use in-line units when creating expression. * e.g., x + 5 [m]. Expressions and values may be entered directly into physical quantity forms, or they may be developed in the expression editor and referred to by name
CFX! Rules for Expressions Rules for expressions Variables and expressions are case sensitive Always use brackets to specify the order of operations For multiple line expression, use operators to separate each line e. g, A+ B/C A+ B /C Expressions must be dimensionally consistent for addition and subtraction operations 1.0/mm7+0.45/yvds7 (valid) >2,5/3m~-1-(3.0ms^-1^~1 (valid) 0/mm7+0.3/kg invalid) 5.5 2001AEA Technology
CFX 5.5 © 2001AEA Technology 4-4 Rules for Expressions Rules for Expressions - Variables and expressions are case sensitive - Always use brackets to specify the order of operations - For multiple line expression, use operators to separate each line > e.g., A+ B/C A+ B /C - Expressions must be dimensionally consistent for addition and subtraction operations > 1.0[mm] + 0.45[yds] (valid) > 2.5[s m^-1] - (3.0[m s^-1])^-1 (valid) > 1.0[mm] + 0.3[kg] (invalid)
CFX! Rules for expressions Rules for expressions Fractional and decimal powers are allowed (valid) 1.0^0.5 (valid) The units of expressions are not declared They are the result of units in the expression (alkg m-3/*6/ms-l/ has units of/ kg m-2s-1/ 5.5 2001AEA Technology
CFX 5.5 © 2001AEA Technology 4-5 Rules for Expressions Rules for Expressions - Fractional and decimal powers are allowed > a^1/2 (valid) > 1.0^0.5 (valid) - The units of expressions are not declared. They are the result of units in the expression > (a[kg m^-3] * b[m s^-1]) has units of [kg m^-2 s^-1]