




已阅读5页,还剩5页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
定义参数(Parameters) 除非特别申明,否则下面这些说明将同时适用于标量参数和数组参数。如果是仅仅对数组有效的,将特别说明。 你可以给参数赋一个值或者将ANSYS中的一些数据代回赋给参数。如何从ANSYS中获得数据请看关于*GET及一些“在线获取函数(in-line get functions)”。下面我们将详细地讲解这些相关信息。 你可以使用*SET命令来定义参数并给参数赋值。下面我们举个简单的例子来说明:*SET,ABC,-24*SET,QR,2.07E11*SET,XORY,ABC*SET,CPARM,CASE1当然,你也可以使用“=”,就象C语言、FORTURN语言那样直接给参数赋值,这使用起来更加方便。使用的格式是:参数名=值。这里的参数名就是你将要给他赋值的参数,值就是数值或者字符或者字符串。对于字符参数而言,字符或者字符串必须加上单引号(在英文输入状态下,译者注),同时不超过8个字母(包括下划线在内)。下面举个例子:ABC=-24QR=2.07E11XORY=ABCCPARM=CASE1在用户图形界面UGI下,你也可以直接在对话框的输入窗口键入上面所说的命令,或者在菜单工具栏:Utility Menu Parameters Scalar Parameters产生的对话框中Selection的位置键入上述命令。下面我们再来重点讲解ANSYS中如何从程序中获得数据并赋值给参数。在ANSYS中,有两个强大的方法来完成这样的功能,其一是*GET函数,另外一个就是所谓的“在线查询函数”。*GET命令获得一个指定的数据并把它保存到一个指定的参数中去,而在线查询函数则可以直接在表达式中使用。每个查询函数都可以从某一个特定的项目中返回一个指定的数据。*GET命令(Utility Menu Parameters Get Scalar Data)从程序中返回一个项目(例如节点、线、面、关键点)的指定数据(例如节点编号、实常数、坐标等信息)。例如:*GET,A,ELEM,5,CENT,X 就是返回5号单元的质心X坐标并把它赋给参数A保存下来。*GET命令的格式如下:*GET,Par,Entity,ENTNUM,Item1,IT1NUM,Item2,IT2NUM其中:Par: 准备用来存储返回数据的参数名。Entity:要查询的项目的关键词。有效的有例如NODE, ELEM, KP, LINE, AREA, VOLU等等。完整的项目列表我们将在后面给出。ENTNUM:实体的编号,如果是0,则表示所有的实体。Item1:某个特定的实体的项目名。例如如果实体是ELEM,Item1可以是NUM(已经选定的最大或者最小单元号)或者是COUNT(已经选定的单元号码)。Item1的全部可用值将在后面列表详细说明。你可以认为*GET命令后面的申明就是个逐层展开的树状结构。从一般到具体。下面的一些例子示例了*GET命令的用法:*GET,BCD,ELEM,97,ATTR,MAT ! BCD = 97号单元的材料号*GET,V37,ELEM,37,VOLU ! V37 = 37号单元的体积*GET,EL52,ELEM,52,HGEN ! EL52 = 52号单元产生的热量*GET,OPER,ELEM,102,HCOE,2 ! OPER = 102号单元二个面的温度传导系数*GET,TMP,ELEM,16,TBULK,3 ! TMP = 16号单元面三的bulk温度*GET,NMAX,NODE,NUM,MAX ! NMAX = 最大的活动节点号码*GET,HNOD,NODE,12,HGEN ! HNOD = 12号节点产生的热量*GET,COORD,ACTIVE,CSYS ! COORD = 当前活动坐标系的号码以上是介绍*GET函数。下面我们再来详细介绍所谓的“在线查询函数。对于一些项目,你可以用在线查询函数来代替*GET命令。它可以直接将查询得到的值返回到参数表达式中。允这就使得你免去了先用*GET命令获得数据再将数据代入表达式这样的麻烦了。例如,假设你想计算两个节点的X坐标的平均值。你可以用如下的*GET来实现:1、 先把节点1的X坐标赋给L1:*GET,L1,NODE,1,LOC,X2、 再把节点2的X坐标赋给L2:*GET,L2,NODE,2,LOC,X3、 再计算:MID=(L1+L2)/2.而使用在线查询函数则就可以可以直接用NX(N)来获得第N号节点的X坐标。所以MID=(NX(1)+NX(2)/2就实现了上面三条语句才可以实现的功能。值得说明的是,*GET命令的声明(arguments,也就是后面的那些需要你指定的参数)同时也可以是一个参数或者是一个其他的查询函数。例如查询函数NELEM(ENUM,NPOS)返回ENUM号单元NPOS位置的节点编号。嵌套起来的综合函数NX(NELEM(ENUM,NPOS)就返回了那个节点的X坐标。明白了没有?附录:查询函数TableB.1*GET - Get Function Summary(Entity Status Get Function)实体状态查询函数(Description)详细说明NSEL(N)Status of node N: -1=unselected, 0=undefined, 1=selected.ESEL(E)Status of element E: -1=unselected, 0=undefined, 1=selected.KSEL(K)Status of keypoint K: -1=unselected, 0=undefined, 1=selected.LSEL(L)Status of line L: -1=unselected, 0=undefined, 1=selected.ASEL(A)Status of area A: -1=unselected, 0=undefined, 1=selected.VSEL(V)Status of volume V: -1=unselected, 0=undefined, 1=selected.译者注:这里的“状态”指的是其是否被选择或者是否存在。返回的是-1、0、1三个数值。分别表示没有被选择、没有被定义(不存在)以及被选择。值得一提的是,在ANSYS中,被选择的项目(面、线、关键点、节点等)将被做个标记(flag)。所有标记的项目形成一个集合。这个集合的成员直到你用命令LSEL、ESEL、ASEL、KSEL、NSEL等去改变他们的时候才会改变。特别需要注意的是,ANSYS默认经过刚定义的实体(线、面、关键点等)都是经过标志的。例如使用命令:LDELE, NL1, NL2, NINC, KSWP时,按照ANSYS Commands Reference上的说明:If NL1 = ALL, NL2 and NINC are ignored and all selected lines LSEL are deleted。可是,即使你没有使用LSEL命令,依旧将你所有的线全部删除了。于是我使用LSEL(L)函数来测试,发现所有刚刚定义的线全部都是1也就是说全部是被选定的。当你使用其他类似命令中参数ALL也都类似这样的情况!Next Selected EntityNDNEXT(N)Next selected node having a node number greater than N.ELNEXT(E)Next selected element having an element number greater than E.KPNEXT(K)Next selected keypoint having a keypoint number greater than K. LSNEXT(L)Next selected line having a line number greater than L.ARNEXT(A)Next selected area having an area number greater than A.VLNEXT(V)Next selected volume having a volume number greater than V.译者注:上面这些函数是用来选择实体的。例如:L, KPNEXT(3), KPNEXT(1)就实现了在关键点2与关键点4之间划了一条线。不过笔者实验的时候发现还有很多问题。LocationsCENTRX(E)Centroid X-coordinate of element E in global Cartesian coordinate system. Centroid is determined from the selected nodes on the element.CENTRY(E)Centroid Y-coordinate of element E in global Cartesian coordinate system. Centroid is determined from the selected nodes on the element.CENTRZ(E)Centroid Z-coordinate of element E in global Cartesian coordinate system. Centroid is determined from the selected nodes on the element.译者注:返回指定单元号的质心坐标。坐标系采用整体笛卡儿直角坐标系。质心是通过单元的节点来计算确定的。NX(N)X-coordinate of node N in the active coordinate system.NY(N)Y-coordinate of node N in the active coordinate system.NZ(N)Z-coordinate of node N in the active coordinate system.KX(K)X-coordinate of keypoint K in the active coordinate systemKY(K)Y-coordinate of keypoint K in the active coordinate systemKZ(K)Z-coordinate of keypoint K in the active coordinate system译者注:返回节点、关键点K的坐标。坐标系采用当前活动坐标系。Degree of Freedom ResultsUX(N)UX structural displacement at node N.UY(N)UY structural displacement at node N.UZ(N)UZ structural displacement at node N.ROTX(N)ROTX structural rotation at node N.ROTY(N)ROTY structural rotation at node N.ROTZ(N)ROTZ structural rotation at node N.查询节点的位移。这个很有用的。TEMP(N)Temperature at node N. For SHELL131 and SHELL132 elements with KEYOPT(3) = 0 or 1, use TBOT(N), TE2(N), TE3(N), . . ., TTOP(N) instead of TEMP(N).节点温度。对于SHELL131、132单元,如果KEYOPT(3)是0或者1,请用上述查询函数代替这个函数。PRES(N)Pressure at node N.节点N的压力VX(N)VX fluid velocity at node N.VY(N)VY fluid velocity at node N.VZ(N)VZ fluid velocity at node N.节点N处的流体X、Y、Z向速度LX(L,LFRAC)X-coordinate of line L at length fraction LFRAC (0.0 to 1.0).LY(L,LFRAC)Y-coordinate of line L at length fraction LFRAC (0.0 to 1.0).LZ(L,LFRAC)Z-coordinate of line L at length fraction LFRAC (0.0 to 1.0).LSX(L,LFRAC)X slope of line L at length fraction LFRAC (0.0 to 1.0).LSY(L,LFRAC)Y slope of line L at length fraction LFRAC (0.0 to 1.0).LSZ(L,LFRAC)Z slope of line L at length fraction LFRAC (0.0 to 1.0).译者注:返回某个线指定比例处的坐标。是什么坐标系请自己做个例子来确定。Nearest to LocationNODE(X,Y,Z)Number of the selected node nearest the X,Y,Z point (in the active coordinate system, lowest number for coincident nodes).KP(X,Y,Z)Number of the selected keypoint nearest the X,Y,Z point (in the active coordinate system, lowest number for coincident nodes).译者注:从选择集(什么是选择集见我前面的注释)中返回距离某坐标点(X,Y,Z)最近的节点、关键点。坐标系采用当前活动坐标系。如果几个点是一样的话,则返回编号小的那个一个点的数据。DistancesDISTND(N1,N2)Distance between nodes N1 and N2.DISTKP(K1,K2)Distance between keypoints K1 and K2.DISTEN(E,N)Distance between the centroid of element E and node N. Centroid is determined from the selected nodes on the element.译者注:返回节点之间、关键点之间以及单元质心与节点之间的距离。其他风复杂的距离关系计算,请自己用*GET命令来获得。Angles (in radians by default - see the *AFUN command)ANGLEN(N1,N2,N3)Subtended angle between two lines (defined by three nodes where N1 is the vertex node). Default is in radians.ANGLEK(K1,K2,K3)Subtended angle between two lines (defined by three keypoints where K1 is the vertex keypoint). Default is in radians.译者注:返回以N1为顶点,以N1-N2,N1-N3连线为边的角的角度。默认采用弧度,如果想改成角度,请使用*AFUN。同理,对于关键点也一样。Nearest to EntityNNEAR(N)Selected node nearest node N.KNEAR(K)Selected keypoint nearest keypoint K.ENEARN(N)Selected element nearest node N. The element position is calculated from the selected nodes.译者注:从选择集中选择一个距离某节点、关键点最近的节点、关键点;从选定的单元集合中选择一个距离某节点最近的单元。这个距离通过单元的质心来确定。AreasAREAND(N1,N2,N3)Area of the triangle with vertices at nodes N1, N2, and N3.AREAKP(K1,K2,K3)Area of the triangle with vertices at keypoints K1, K2, and K3.ARNODE(N)Area at node N apportioned from selected elements attached to node N. For 2-D planar solids, returns edge area associated with the node. For axisymmetric solids, returns edge surface area associated with the node. For 3-D volumetric solids, returns face area associated with the node. For 3D, select all the nodes of the surface of interest before using ARNODE.译者注:返回N1,N2,N3或者K1,K2,K3形成的三角形的面积;返回节点的面积意思是说该节点从单元中分配到的“面积”。对于二维是面积,对于三维,说的准确是什么意思我还没有仔细研究,好在不是做太理论研究的人估计一辈子也用不到这个函数。NormalsNORMNX(N1,N2,N3)X-direction cosine of the normal to the plane containing nodes N1, N2, and N3.NORMNY(N1,N2,N3)Y-direction cosine of the normal to the plane containing nodes N1, N2, and N3.NORMNZ(N1,N2,N3)Z-direction cosine of the normal to the plane containing nodes N1, N2, and N3.NORMKX(K1,K2,K3)X-direction cosine of the normal to the plane containing keypoints K1, K2, and K3.NORMKY(K1,K2,K3)Y-direction cosine of the normal to the plane containing keypoints K1, K2, and K3.NORMKZ(K1,K2,K3)Z-direction cosine of the normal to the plane containing keypoints K1, K2, and K3.译者注:返回由K1,K2,K3构成的平面的法线的X、Y、Z方向余弦。ConnectivityENEXTN(N,LOC)Element connected to node N. LOC is the position in the resulting list when many elements share the node. A zero is returned at the end of the list.译者注:返回与节点N连通的单元,LOC确定了在表单中的位置如果有很多个单元同享那个节点。具体表单按照什么顺序列出来,我没有实验过,还不清楚。NELEM(E,NPOS)Node number in position NPOS (1-20) of element E.译者注:返回某单元中NPOS位置的节点的节点编号。这个位置的编号最大不得超过20,因为ANSYS的单元中没有超过20个节点的?NODEDOF(N)Returns the bit pattern for the active DOFs at the specified node. bit 0 is UX, bit 1 is UY,. bit 5 is ROTZbits 6,7,8 are AX,AY,AZbits 9,10,11 are VX,VY,VZbit 18 is PRES, bit 19 is TEMP, bit 20 is VOLT, bit 21 is MAGbit 24 is EMF, bit 25 is CURRFor a node with UX,UY,UZ the return value will be 7 (bits 0,1,2)For a node with UX,UY,UZ,ROTX,ROTY,ROTZ the return value will be 63 (bits 0,1,2,3,4,5)这个是有关节点自由度的问题的。不是很懂,不过一般不做理论研究也用不到。想了解的,恐怕要看看ANSYS的理论手册了和详细了解ANSYS单元的一些细节问题了。FacesELADJ(E,FACE)For 2-D planar solids and 3-D volumetric solids, element adjacent to a face (FACE) of element E. The face number is the same as the surface load key number. Only elements of the same dimensionality and shape are considered. A -1 is returned if more than one is adjacent. NDFACE(E,FACE,LOC)Node in position LOC of a face number FACE of element E. The face number is the same as the surface load key number. LOC is the nodal position on the face (for an IJLK face, LOC=1 is at node I, 2 is at node J, etc.)NMFACE(E)Face number of element E containing the selected nodes. The face number output is the surface load key. If multiple load keys occur on a face (such as for line and area elements) the lowest load key for that face is output.ARFACE(E)For 2-D planar solids and 3-D volumetric solids, returns the area of the face of element E containing the selected nodes. For axisymmetric elements, the area is the full (360 degree) area.以上这些东东一般用不到,又没有完全搞清楚准确意思,大家想了解的自己去钻吧。ENKE(N)Turbulent kinetic energy (FLOTRAN) at node N.节点N处的动力学能量。搞湍流的人应该知道是什么意思。ENDS(N)Turbulent energy dissipation (FLOTRAN) at node N.VOLT(N)Electric potential at node N.MAG(N)Magnetic scalar potential at node N.AX(N)AX magnetic vector potential at node N.AY(N)AY magnetic vector potential at node N.AZ(N)AZ magnetic vector potential at node N.Returns information about the data base managerVIRTINQR(1)Number of pages in core.VIRTINQR(4)Page size in integer words.VIRTINQR(7)Maximum number of pages allowed on disk.VIRTINQR(8)Number of read/write operations on page.VIRTINQR(9)Maximum record number on page.VIRTINQR(11)Maximum pages touched.这些东东一般人也用不到。Returns the current value of ANSYS filtering keywords.KWGET(KEYWORD)Returns the current value the keyword specified by KEYWORD. See the ANSYS UIDL Programmers Guide for a list of keywords and values.Character String Functions Strings must be dimensioned (see *DIM) as a character parameter or enclosed in single apostrophes (char). 下面是一些字符串与标量(双精度数值)之间的转换。有些地方要用到。譬如一些显示操作有关的地方。Functions which return a double precision value of a numeric character string. VALCHR(a8)a8 is a decimal value expressed in a string. VALOCT (a8)a8 is an octal value expressed in a string. VALHEX(a8)a8 is a hex value expressed in a string.Functions which return an 8 character string of a numeric value. CHRVAL (dp)dp is a double precision variable. CHROCT (dp)dp is an integer value. CHRHEX(dp)dp is an integer value. 以下是一些字符串操作函数。感兴趣的自己研究。Functions which manipulate strings: StrOut i
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 龙岗区党校宿舍物业管理合同5篇
- 【《浅谈中小型企业人力资源开发与管理》4500字(论文)】
- 浙江省(温州)2026届九年级英语第一学期期末质量检测模拟试题含解析
- 新人培训计划
- 2026届内蒙古自治区兴安盟乌兰浩特市第十三中学英语九上期末预测试题含解析
- 2026届江苏省淮安市洪泽县九上化学期中达标检测模拟试题含解析
- 磁力泵转子培训
- 2026届湖南省耒阳市冠湘中学化学九上期中质量检测模拟试题含解析
- 2026届云南省保山市施甸县英语九上期末调研模拟试题含解析
- 2026届东营市重点中学九年级化学第一学期期中联考模拟试题含解析
- 情商课件教学课件
- 《机械制图》课件(共十一章)-上
- 2025年湖南公开遴选公务员考试(计算机专业知识)历年参考题库含答案详解(5套)
- 水利工程质量检测员网上继续教育考试题库及答案
- 化工石油消防安全知识培训课件
- 危险品运输资格(装卸管理人员)考试2025年题库及答案
- 2025辅导员考试大纲与试题及答案
- 测绘定密管理办法
- 第3节 跨学科实践:保护地球家园-教科版九年级《物理》上册教学课件
- 多租户隔离-第1篇-洞察及研究
- 巨量千川-内容创意(初级) 营销师认证考试题及答案
评论
0/150
提交评论