已阅读5页,还剩14页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Chapter 11 CFX Expression Language (CEL),Introduction to CFX,CEL - CFX Expression Language Allows the user to create equations (can be functions of solution/system variables) that can be used in CFX-Pre and CFD-Post Example:,CEL,The syntax rules are the same as those for conventional arithmetic. Operators are written as: + (addition) - (subtraction) * (multiplication) / (division) (exponentiation) Variables and expressions are case sensitive (example: t vs. T) Expressions must be dimensionally consistent for addition and subtraction operations (example: 1.0 mm + 0.45 yds is OK) You cannot add values with inconsistent dimensions Fractional and decimal powers are allowed (example: a(1/2) + 1.00.5) Units of expressions are not declared they are the result of units in the expression (example: a kg m-3 * b m s-1 has units of kg m-2 s-1 Some constants are also available in CEL for use in expressions: e Constant: 2.7182818 g Acceleration due to gravity: 9.806 m s-2 pi Constant: 3.1415927 R Universal Gas Constant: 8314.5 m2 s-2 K-1,CEL Rules,Numerical functions and operators are also available in CEL Right-click when creating expressions for a complete list Custom functions with User Fortran can also be created,Function Operands Dimensions x Operands Values Results Dimensions sin(x) Angle Any Dimensionless cos(x) Angle Any Dimensionless tan(x) * Angle Any Dimensionless asin(x) Dimensionless -1 x 1 Angle acos(x) Dimensionless -1 x 1 Angle atan(x) Dimensionless Any Angle exp(x) Dimensionless Any Dimensionless loge(x) Dimensionless 0 1m, 1, 0) In this case, if the result is precisely equal to 1m, the result is (res1+res2)/2 *step(x) is 0 for negative x, 1 for positive x and 0.5 for x=0. * note that tan(x) is undefined for np/2 where n=1, 3, 5 . * both x and y must have the same dimensions.,Built In Functions,x Direction 1 in Reference Coordinate Frame y Direction 2 in Reference Coordinate Frame z Direction 3 in Reference Coordinate Frame r Radial spatial location, r = (x2+y2)0.5 theta Angle, arctan(y/x) t Time u Velocity in the x coordinate direction v Velocity in the y coordinate direction w Velocity in the z coordinate direction p (absolute) Pressure ke Turbulent kinetic energy ed Turbulent eddy dissipation T Temperature sstrnr Shear strain rate density Density rNoDim Non-dimensional radius (rotating frame only) viscosity Dynamic Viscosity Cp Specific Heat Capacity at Constant Pressure cond Thermal Conductivity AV name Additional Variable name mf Mass Fraction,Solver variables are available for use in any expression Below is a partial list of the available system variables: When creating expressions, right-click to access a full list,Depending on your physics, some variables will not be valid e.g. you need to solver heat transfer to use T,Solver Variables,How To Create Expressions,To add more expressions (similar method in CFD-Post),How To Create Expressions,Right-click in the Definition window to access Variables, Constants, Functions, Locators and existing Expressions,where is the shear strain rate,Creating a variable viscosity Viscosity of a shear thickening fluid:,Solver Variable and Expression Name are both accessed via the right mouse button,CEL in CFX-Pre: Example 1,Alternatively, an expression can be entered directly into a field,CEL in CFX-Pre: Example 1,Using an “if” Function Set inlet temperature to 300 K for the first 19 iterations then raise it to 320 K after 20 iterations,Solver variable accessed with the right mouse button,Note: On the 21st iteration inlet temp = 310 K,CEL in CFX-Pre: Example 2,You can also define your own 1-D linear, or 3-D cloud of points interpolation functions,Import data points or add manually,User Functions,Example: Having the timestep change with iteration number as shown here,Timestep size is in seconds,Continued on next slide.,User Functions: Example,Iteration Number is dimensionless,Example: Having the timestep change with iteration number as shown here,User Functions: Example,Integrated quantities can be used in expressions to evaluate variables over some location Examples: Calculate the area average of Cp on an isosurface: areaAve(Cp)iso1 Mass flow of particular fluid through a locator: oil.massFlow()slice1 Available in CFX-Pre and CFD-Post Usage is more strict in CFX-Pre E.g. the argument supplied to the function must be a variable, not an expression “” syntax must always supply a named location used in the physics definition A boundary condition name, a domain name, a monitor point name, etc. To reference general mesh regions use the syntax “REGION:” Phases/components can be referenced using: . E.g. Air.Nitrogen.massFlow()outlet,Integrated Quantities,Integrated Quantities,Some functions allow an x, y or z operator: area_x()boundary gives the area projected in the x-direction force_z()wall gives the z component of the force on the wall See documentation for a full list These functions also allow an optional coordinate frame: force_z_MyCoord()wall gives the z component of the force on the wall using the coordinate frame “MyCoord” Each function requires either 0 or 1 arguments areaAve requires 1 argument: areaAve(Temperature)Wall massFlow requires 0 arguments: massFlow()Inlet Return value units depend on the argument units areaAve(Temperature)Wall will return a value with units of Temperature,Below is a partial list of functions See documentation for a complete list Right-clicking when creating an expression will show most functions,Integrated Quantities,Integrated Quantities,Integrated Quantities,Useful Functions,The inside() function returns 1 when inside the specified location and 0 when outside Useful to limit the scope of a function
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年02月湖北省潜江市事业单位2024年统一公开招考124名工作人员笔试参考题库后附答案详解
- 2024年02月海南省琼海市2024年公开招聘事业单位工作人员(1号)53笔试参考题库后附答案详解
- 2024年02月广东省饶平县社会保险基金管理局2024年招考1名后勤服务人员笔试参考题库后附答案详解
- 2024年02月山东海事职业学院2024年公开招聘80名教师笔试参考题库后附答案详解
- 2024年02月南通职业大学暨部分市属事业单位2024年公开招考31名工作人员笔试参考题库后附答案详解
- 山西省临汾市霍州市2023-2024学年五年级下学期期中数学试题
- 古诗《杨慎·广心楼夜宿病中作》原文赏析
- 别样的自然景观之旅
- 2024年4月陕西咸阳市泾河新城第四小学教师招考聘用笔试参考题库附带答案详解
- 2024年3月黑龙江齐齐哈尔市梅里斯达斡尔族区事业单位招考聘用10人笔试参考题库附带答案详解
- 人教版小学二年级数学期中测试题
- 2024-2030年中国汽车塑料件行业市场行情动态及发展趋势预测报告
- 《陆上风电场工程施工安装技术规程》(NB/T 10087-2018 )
- (高清版)DZT 0211-2020 矿产地质勘查规范 重晶石、毒重石、萤石、硼
- 政府审计4版刘三昌习题参考答案
- 新质生产力研讨发言心得体会以新质生产力促进高质量发展三篇
- 肺结核的社区预防和健康宣教活动
- 《中国高血压防治指南》
- 2024年交通运输部北海航海保障中心招聘笔试冲刺题
- 如何在小学语文教学中渗透传统文化教育以统编本教材为例
- 案例二长期股权投资
评论
0/150
提交评论