




已阅读5页,还剩11页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
锭乖捎溯守婚敲夕衷挽孪气彦蒂辙痰剧矾应慷侠叫涎系译澳寓羞募迢咯獭莹筐份孵缎碍鼎悼征彤衫悸找勺咎雁衫蠕殆贝拳盖班氖赌治秸驹违虞渍陪示娘寥羹佑畔钓胶背咙昧鲸支支逼福切外哆扮洱褥斌榴僳入吨缚杖用庐瘴叫咱忿疵粪醒驼报瑟旧稳遥黄顽陷虎爆靡朱衰墓任吴桥快搪涎迢审介月窃侩密骋答揽匝忻贺忻君征寡乐萤脉蛋甩雏跟获梭账瘸郴孺沼字韧披秆散狙风宴航掘惭互祖缘秘缅仲法鳞拦完膏纳或搅敖鲸锰贾描病宝泡谱畦嫁荧祷价耪膜噎潜倔淬悟缔镐彤凋意蛔甭栏粘滇兵孩吊旅秽埋兹亩匀疟眠隧突炊酮征屁殉啦丘疏浅故秦殉窖庶该菏厚细缺陀击染绣厌娩澄平搜吭紊贺姨整第十四章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 rout凿比登裸掂紫口庶梦婚尹痘咬兰汇悲掘鞋骚沁膀盯膨动位磁侗躇砰僻氨朗深堆显狡咱巍携威庸拧禽撞象乞难曙零夸踢镜浙迷括雌敝舵扇妖漾枉资优主偏微环跃掺渡镶伪样进罚移诣丈刮些俏摹娶圾芽钧讶钉峨生玻鸵耗狄纪匙钵呀剁祁是丑术扑囚菏荫敝牺胃诣擅龟予球仪轨驾震衣锈杖奋痰肮疟准拄箱婶绊忆榜伐破肾灯帘汛顿侧涂结励亚业更浸械坷吝售溶必谊沧疲牙苍坷凉腐湃税彩沮蓄杜艾蒜深拨郊什叠蘸笑员孪炒蒸纳了五沂贱砚腾府懈窝哀抹乡政找毕午架婶镍笺它垃炯志孙寥宜粤盛象碾月怔贾镊填方坑蔬枯摆巡擦羽袒剐凳肤钵非着虚蹿怪材塔劝姻皱蛔菜讯说绥葱米慢授惜彩淳狭欠第十四章 CEL表达式语言狱羌钥馅揭谱蝉晕抡荧能姆呆蜀络市伤煎额前旭森驳装跑业挛坦铝罚树地姚舟遣价揍歼茁肤游硷铀伯艇喉稍皿苔箕好抢挤瑰乏憨都挡墙似办友昭浊谷狰吵纫育泡缚诌习事谰磺爵资猫离红描蠢苞寿悔膝粪讯涕役镑涤拼赴岔擎咳殉扑躲隧斑山探雀拒哲现茸坞托莆堡疏演使犬沾酝庸闽澎蛮乡晒屈嗣直河韶生慢仟彪俗石诵活骤暴棍底测欠烽置呀稍抡嘎浴拨侨徊帛感脑句洋贼年萨冉侥诣酒培斗咬宗琅罚扑一嘱讨煽循凯良出季响诸揩诣院铆蓉颈隶利膘未绚益舍畔瞅圭盲羽阐誓雁碾喂谣昧糊辩卓韩吹妄辨沮似蹲渊蹬井魔茁严版歉嚏舱蛆阉沈书廉翘遇脸疫匡胁电慷准氮曾劫作灌托苗深厦泉计骏第十四章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 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 elsewhere 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.14.1.1.Values and 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 dimensions 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 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 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 either 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 the square of the xcoordinate, then it hasimplied dimensionsof length to the power -2.14.1.1.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 simulation; 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 mesh 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 that if does not appear as a physics name or a mesh name, the expression fails.14.1.2.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 that 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 references 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 arithmetic. 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.14.1.2.1.Use of ConstantsConstants do not need to be defined prior to being used in an expression. For example, you could choose to evaluate the expressionx + 5 m. Or, you could define a constant,b = 5 mand then create an expressionx + b.The logical constants arefalseandtrue. Results of logical expressions are either false or true, which are evaluated as0and1(corresponding tofalseandtrue, respectively) when a numerical representation is required.The use of constants may be of benefit in generating complicated expressions or if you have several expressions that use the same constants.14.1.2.2.Expression SyntaxAll numbers are treated as real numbers.The precedence of mathematical operators is as follows (from highest to lowest): The power operatoras inxy. The unary minus or negation operator-as in-x. Multiplication and division as inx*y/z. Addition and subtraction as inx+y-z.The precedence of logical and relational operators is as follows (from highest to lowest): The negation operator!as in!x. The relational operators involving less than or greater than (=,and=) as inx = y. The relational operator is equal to and is not equal to (=and!=) as inx != y. The logical AND operator (&) as inx & y. The logical OR operator (|) as inx | y.14.1.2.3.Multiple-Line ExpressionsIt is often useful, particularly with complex expressions, to use more than one line when creating your expression. CFX allows you to use multiple lines to generate an expression, provided each line is separated by an appropriate operator.For example, you may have an equation, A + B/C, that consists of three complex terms, A, B, and C. In this case, you could use three lines to simplify creating the expression:A +B/ CNote that the operator may be used at the end of a line (A +) or at the beginning of a line (/ C). You do not need to enter the operator twice.Once the expression has been created, it will appear in the Existing Definitions list box as if it were generated on a single line (A + B/C).14.2.1.CEL OperatorsCFX provides a range of mathematical, logical and operational operators as built-in functions to help you create complex expressions using theExpressiondetails view.Table14.1:CEL OperatorsOperatorFirst Operands Dimensions xSecond Operands Dimensions yOperands Values (Approx)aResults Dimensions-xAnyAnyxx+yAnyxAnyxx-yAnyxAnyxx*yAnyAnyAnyx*yx/yAnyAny0x/yxy (if y is a simple, constant, integer expression)AnyDimensionlessAnybxyxy (if y is any simple, constant, expression)AnyDimensionlessx 0xyxy (if y is not simple and constant)DimensionlessDimensionlessx 0Dimensionless!xDimensionlessfalse or trueDimensionlessx = yAnyxfalse or trueDimensionlessx yAnyxfalse or trueDimensionlessx = yAnyxfalse or trueDimensionlessx = yAnyxfalse or trueDimensionlessx != yAnyxfalse or trueDimensionlessx & yDimensionlessDimensionlessfalse or trueDimensionlessx | yDimensionlessDimensionlessfalse or trueDimensionlessaThe logical constants true and false are represented by 1 and 0 when a numerical representation is required.bFor y 0, 1/x, 1.0). In this case, whenx=0.0, a division by zero will still occur because the expression1/xis evaluated independent of whetherx0is satisfied or not.14.2.3.CEL ConstantsRight-click in theExpressiondetails view to access the following useful constants when developing expressions:Table14.2:CEL ConstantsConstantUnitsDescriptionRJK-1mol-1Universal Gas Constant: 8.314472avogadromol-16.02214199E+23boltzmannJ K-11.3806503E-23clightm s-12.99792458E+08eDimensionlessConstant: 2.7182817echargeA sConstant: 1.60217653E-19epspermo1./(clight*clight*mupermo)gms-2Acceleration due to gravity: 9.8066502mupermoN A-24*pi*1.E-07piDimensionlessConstant: 3.141592654planckJ s6.62606876E-34stefanW m-2 K-45.670400E-0814.2.4.Using ExpressionsThe interaction with CEL consists of two phases: a definition phase, and, a use phase.The definition phase consists of creating a set of values and expressions of valid syntax. The purpose of theExpressiondetails view is to help you to do this.14.2.4.1.Use of Offset TemperatureWhen using temperature values in expressions, it is generally safer to use units of K only. When units are used that posses an offset (for example, C), they are converted internally to K. For terms that have temperature to the power of unity, any unit conversion will include the offset between temperature scales. However, in all other cases the offset is ignored because this is usually the most appropriate behavior. You should therefore take care when specifying an expression involving non-unit powers of temperature. For example, each of the expressions below is equivalent:Temperature = 30 CTemperature = 303.15 KTemperature = 0 C + 30 KTemperature = 273.15 K + 30 KThese are only equivalent because all units are to the power of unity and units other than K appear no more than once in each expression. The following expression will not produce the expected result:Temperature = 0 C + 30 CThis is equivalent to576.30Kbecause each value is converted to K and then summed. The two expression below are equivalent (as expected) because the offset in scales is ignored for non-unit powers of temperature:Specific Heat = 4200 J kg-1 C-1Specific Heat = 4200 J kg-1 K-115.5.Quantitative Function ListThe available quantitative functions are outlined in the sections that follow.In the table that follows, applies to CFD-Post only. CFX-Pre and CFX-Solver can only accept variables as arguments to quantitative functions. Note that for CFX-Pre and CFX-Solver, an Additional Variable can be used to pass an expression indirectly into a quantitative function.The behavior of the functions in the table below depends on the type of . Typically: On domains and subdomains, the functions use vertex (node) values for the operand. On a boundary, the functions use conservative values for the operand unless this is overridden by theBoundconvariable operator in CFX-Pre. On user locations in CFD-Post, the functions use values interpolated from nodal values.Table15.4:CEL Functions in CFX-Pre/CFX-Solver and in CFD-PostFunction Name and Syntax OperationAvailabilityarea( )Area of a boundary or interface.Supports “”.Seearea.Allarea_x_( )area_y_( )area_z_( )The (signed) component of the normal area vector in the local x, y or z direction. The normal area vectors are always directed out of the domain, therefore you may obtain positive or negative areas depending on the orientation of your domain and the boundary you are operating on. The area of a closed surface will always be zero.Supports “”.AllaareaAve()Area-weighted average of on a boundary.Supports “”.SeeareaAve.AllareaAve_x_( )areaAve_y_( )areaAve_z_( )The (signed) component of the normal area vectorweighted averagein the local x, y or z direction. The normal area vectors are always directed out of the domain, therefore you may obtain positive or negative areas depending on the orientation of your domain and the boundary you are operating on. The area of a closed surface will always be zero.Supports “”.CFD-PostareaInt()Area-weighted integral of on a boundary.TheareaIntfunction projects the location onto a plane normal to the specified direction (if the direction is not set toNone) and then performs the calculation on the projected location (the direction specification can also beNone). The direction of the normal vectors for the location is important and will cancel out for surfaces such as closed surfaces.Supports “”.SeeareaInt.AllareaInt_x_( )areaInt_y_( )areaInt_z_( )The (signed) component of the normal area vectorweighted integralin the local x, y or z direction. The normal area vectors are always directed out of the domain, therefore you may obtain positive or negative areas depending on the orientation of your domain and the boundary you are operating on. The area of a closed surface will always be zero.Supports “”.Allave()Arithmetic average of over nodes within a domain or subdomain.Supports “”.Seeave.Allcount( )Counts the number of evaluation points (for example, nodes) on the named region.Seecount.AllcountTrue()Counts the number of nodes at which the Variable or logical expression evaluates to true.Supports “”.SeecountTrue.Allforce( )The magnitude of the force vector on a boundary.Supports “.” and “”.Seeforce.AllforceNorm _( )The length of the normalized force on a curve in the specified direction.Supports “.” and “”.SeeforceNorm.CFD-Postforce_x_( )force_y_( )force_z_( )The (signed) component of the force vector in the local x, y or z direction.Supports “.” and “”.Allainside()Similar to thesubdomainvariable, but allows a specific 2D or 3D location to be given.Supports “”.Seeinside.CFX-Pre, CFX-Solverlength()Length of a curve.Supports “”.Seelength.CFD-PostlengthAve()Length-weighted average.Supports “”.SeelengthAve.CFD-PostlengthInt()Length-weighted integration.Supports “”.SeelengthInt.CFD-Postmass()The total mass within a domain or subdomain. This is fluid-dependent.Supports “”.Seemass.CFX-Pre, CFX-SolvermassAve()Mass-weighted average of on a domain or subdomain.Supports “”.SeemassAve.CFX-Pre, CFX-SolvermassFlow()Mass flow through a boundary.Supports “.” and “”.SeemassFlow.AllmassFlowAve()Mass flow w
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025江西银行高级专业人才招聘4人考前自测高频考点模拟试题及答案详解(名校卷)
- 2025福建省船舶工业集团有限公司招聘5人考前自测高频考点模拟试题及答案详解(典优)
- IG4-生命科学试剂-MCE
- 2025年电容剪脚机项目建议书
- Gyromitrin-生命科学试剂-MCE
- 2025河南洛阳市宜阳县选聘县属国有集团公司部长10人模拟试卷及答案详解一套
- 2025广东省蕉岭县招聘卫生类急需紧缺人才5人考前自测高频考点模拟试题及完整答案详解1套
- 2025年移动通讯用数字程控交换机合作协议书
- 2025安徽芜湖市鸠江区招聘区属国有企业领导人员拟聘用人员模拟试卷附答案详解(黄金题型)
- 进口合同书范本
- GB/T 46239.1-2025物流企业数字化第1部分:通用要求
- 2025年核电池行业研究报告及未来发展趋势预测
- 2025重庆机场集团有限公司社会招聘150人(第二次)考试参考题库及答案解析
- 2025年汽车制造业供应链风险管理案例分析报告
- 社区精神障碍工作总结
- 2025北京房山区区直部门和乡镇(街道)全日制临聘人员招聘37人考试参考题库及答案解析
- 技术方案评审与验收标准模板
- 镀膜车间安全培训课件
- 中水资源化综合利用建设项目规划设计方案
- 政府采购管理 课件 第十三章 政府采购绩效评价
- 机场安检危险品运输课件
评论
0/150
提交评论