第十四章CEL表达式语言

上传人:pu****.1 文档编号:485533936 上传时间:2023-06-02 格式:DOC 页数:15 大小:126KB
返回 下载 相关 举报
第十四章CEL表达式语言_第1页
第1页 / 共15页
第十四章CEL表达式语言_第2页
第2页 / 共15页
第十四章CEL表达式语言_第3页
第3页 / 共15页
第十四章CEL表达式语言_第4页
第4页 / 共15页
第十四章CEL表达式语言_第5页
第5页 / 共15页
点击查看更多>>
资源描述

《第十四章CEL表达式语言》由会员分享,可在线阅读,更多相关《第十四章CEL表达式语言(15页珍藏版)》请在金锄头文库上搜索。

1、第十四章14:CFX 表达式语言 (CEL)CFX Expression Language (CEL) is an interpreted, declarative language that has been developed to enable CFX users to enhance their simulations without recourse to writing and linking separate external Fortran routines.You can use CEL expressions anywhere a value is required for

2、 input in ANSYS CFX.CEL can be used to: Define material properties that depend on other variables. Specify complex boundary conditions. Add terms to the solved equations.You can also monitor the value of an expression during the solution using monitor points.Important: There is some CEL that works e

3、lsewhere in ANSYS CFX, but not in CFD-Post. Any expression created in CFX-Pre and used as a Design Exploration output parameter could potentially cause fatal errors during the Design Exploration run, so you should create all expressions for Design Exploration output parameters in CFD-Post.Values and

4、 ExpressionsCEL can be used to generate both values and expressions. Values are dimensional (that is, with units) or dimensionless constants. The simplest type of definition is the dimensionless value, for example:b = 3.743You can also specify a value with units, for example:g = 9.81 m s-2The dimens

5、ions of the quantities of interest for CFD calculations can be written in terms of mass, length, time, temperature and angle. The concept of units is fundamental to the behavior of values and expressions.Values can be used directly, or they can be used as part of an expression. For example, you can

6、use an expression to add two values together:=+In this example, you may want to predefineand, but this is not required. However, in order to add two quantities together,they must have the same dimension; that is, it is meaningful to add a quantity in inches to one expressed in meters, but it is not

7、meaningful to add one expressed in kilograms to one in square feet.Expressions can also be functions of other (predefined) expressions:=+Units follow the conventions in the rest of CFX, in that a calculation has a set of solution units (by default, SI units), and that any quantity can be defined eit

8、her in terms of the solution units, or any other set of units with the correct form.An expression does not have its own units string, but if it references quantities that have dimensions, these will determine the resulting units for the expression. For example, if an expression depends inversely on

9、the square of the xcoordinate, then it hasimplied dimensionsof length to the power -2.1.Using Locators in ExpressionsA CFX simulation has physics areas and mesh areas; physics areas are boundaries while mesh areas are regions. These two types of area can occupy completely different spaces in a simul

10、ation; however, there is no requirement that area names be unique between physics and mesh. This can lead to ambiguities when you use these names in expressions.To avoid these ambiguities, ANSYS CFX first checks to see if is a physics name; if this is not found, the name is checked in the list of me

11、sh names. Thus if in1 is both the name of a physics area and the name of a mesh area, is taken to indicate the physics area.ANSYS CFX also has REGION CEL syntax so that you can identify a named area as being a mesh area. Thus to identify the mesh area in1, you would use the syntax:REGION:in1Note tha

12、t if does not appear as a physics name or a mesh name, the expression fails.CFX Expression Language StatementsThe CFX Expression Language is declarative. You declare the name and definition of the expression using expression language statements. The statements must conform to a predefined syntax tha

13、t is similar to Fortran mathematical statements and to C statements for logical expressions.The statement must consist of the following: a number, optionally with associated units. This defines aconstant. Constants without units are termeddimensionless. for mathematical expressions, one or more refe

14、rences to mathematical constants, system variables, or existing user variables, separated by+(addition),-(subtraction),*(multiplication),/(division) and(exponentiation), with optional grouping of these by parentheses. The syntax rules for these expressions are the same as those for conventional arit

15、hmetic. for logical expressions involving relational operators, one or more references to mathematical constants or results from mathematical expressions, separated by=(is less than or equal to),(is greater than) and=(is greater than or equal to) with optional grouping of these by parentheses. for logical expressions involving logical operators, one or more references to logical constants or results from relational operations separated by!(negation),&(logical AND) and|(logical OR), with optional grouping by parentheses.1.Use of

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 医学/心理学 > 基础医学

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号