声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1950|回复: 4

[求助]如何用apdl语言获得已定义组件的节点个数?

[复制链接]
发表于 2006-5-18 14:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
我要在apdl 中用这个参量,怎么获得?<BR>求教!!!!
回复
分享到:

使用道具 举报

发表于 2006-5-19 07:33 | 显示全部楼层

回复:(ddarjing)[求助]如何用apdl语言获得已定义组...

ansys中可以用*get命令获取信息。如: <BR>*get,xx,node,i,loc,x 可以获取第i个节点的x坐标,即把第i个节点的x坐标赋给xx. <BR>通过内嵌函数,我们可以很方便的实现上述过程: xx=nx(i), nx(i)就是ansys的一个内嵌函数。 <BR>下面我把ansys所有的内嵌函数都列举出来供各位师兄师姐们参考: <BR>1. distnd( i,j) — I,j 两点的距离 <BR>2. node(x,y,z) — 提取距离位置(x,y,z)最近的节点号 <BR>3. kp(x,y,z) — 提取距离位置(x,y,z)最近的关键点号 <BR><BR>4.基本函数: <BR>ABS(x) Absolute value of x. <BR>SIGN(x,y) Absolute value of x with sign of y. y=0 results in positive sign. <BR>EXP(x) Exponential of x (ex). <BR>LOG(x) Natural log of x (ln (x)). <BR>LOG10(x) Common log of x (log10(x)). <BR>SQRT(x) Square root of x. <BR>NINT(x) Nearest integer to x. <BR>MOD(x,y) Remainder of x/y. y=0 returns zero (0). <BR>RAND(x,y) Random number (uniform distribution) in the range x to y (x = lower bound, y = upper bound). <BR><BR>GDIS(x,y) Random sample of a Gaussian (normal) distribution with mean x and standard deviation y. <BR><BR>SIN(x), COS(x), TAN(x) Sine, Cosine, and Tangent of x. x is in radians by default, but can be changed to degrees with *AFUN. <BR><BR>SINH(x), COSH(x), TANH(x) Hyperbolic sine, Hyperbolic cosine, and Hyperbolic tangent of x. <BR><BR>ASIN(x), ACOS(x), ATAN(x) Arcsine, Arccosine, and Arctangent of x. x must be between -1.0 and +1.0 for ASIN and ACOS. Output is in radians by default, but can be changed to degrees with *AFUN. Range of output is -pi/2 to +pi/2 for ASIN and ATAN, and 0 to pi for ACOS. <BR><BR>ATAN2(y,x) Arctangent of y/x with the sign of each component considered. Output is in radians by default, but can be changed to degrees with *AFUN. Range of output is -pi to +pi. <BR><BR>VALCHR (CPARM Numerical value of CPARM (if CPARM is non-numeric, returns 0.0). <BR><BR>CHRVAL (PARM) Character value of numerical parameter PARM. Number of decimal places depends on magnitude. <BR><BR>UPCASE CPARM Upper case equivalent of CPARM. <BR><BR>LWCASE (CPARM) Lower case equivalent of CPARM. <BR><BR>5. kx(i) :表示关键点i 的x坐标值;同理:ky(i);kz(i) <BR>6. nx(i) :表示节点i 的x坐标值;同理:ny(i);nz(i) <BR>7. nsel(k)是节点k在就是1,不在就是0 <BR>8. NDNEXT(N).: Next higher node number above N in selected set (or zero if none found). <BR>9. NELEM(ENUM,NPOS): returns the node number in position NPOS for element ENUM. Node number at position 1,2,... or 20 of elementN, where npos is 1,2,...20 <BR>10. UX(N), UY(N), UZ(N). :X, Y, or Z structural displacement or vector sum. <BR>11. ROTX(N), ROTY(N), ROTZ(N):X, Y, or Z structural rotation or vector sum <BR>12. TEMP(N).:Temperature <BR>13. PRES(N).:Pressure <BR>14. VX(N), VY(N), VZ(N).:X, Y, or Z fluid velocity or vector sum <BR>15. ENKE(N):Turbulent kinetic energy (FLOTRAN). <BR>16. ENDS(N).:Turbulent energy dissipation (FLOTRAN). <BR>17. CENTRX(N), CENTRY(N), and CENTRZ(N) always retrieve the element centroid in global Cartesian coordinates, and are determined from the selected nodes on the elements. <BR>18. ELADJ(N,face):Element number adjacent to face 1,2,...6.。Number assigned to the attribute Name, where Name = MAT, TYPE, REAL, ESYS, PSTAT, LIVE attribute. A zero is returned if the element is unselected. If Name = PSTAT (valid for p-elements only), a 1 is returned if the element <BR>19. ESEL(N).:Select status of element N: -1 = unselected, 0 = undefined <BR>20. ELNEXT(N):Next higher element number above N in selected set (or zero if none found). <BR>21. KSEL(N).:Select status of keypoint N: -1 = unselected, 0 = undefined, 1 = selected. <BR>22. KPNEXT(N).:Next higher keypoint number above N in selected set (or zero if none found). <BR>23. LSEL(N).:Select status of line N: -1=unselected, 0=undefined, 1=selected. <BR>24. LSNEXT(N):Next higher line number above N in the selected set (or zero if none found). <BR>25. LX(n,lfrac):return the X coordinate location of line N at the length fraction lfrac (0.0 to 1.0).同理,LY(n,lfrac);LZ(n,lfrac) <BR><BR>26. <BR>LSX(L,LFRAC) X slope of line L at length fraction LFRAC (0.0 to 1.0). <BR><BR>LSY(L,LFRAC) Y slope of line L at length fraction LFRAC (0.0 to 1.0). <BR><BR>LSZ(L,LFRAC) Z slope of line L at length fraction LFRAC (0.0 to 1.0). <BR><BR>27. ASEL(N).:Select status of area N: -1=unselected, 0=undefined, 1=selected. <BR>28. VSEL(N).:Select status of volume N: -1=unselected, 0=undefined, 1=selected. <BR>29. VLNEXT(N).:Next higher volume number above N in selected set (or zero if none found). <BR><BR>30.距离函数: <BR>DISTND(N1,N2) Distance between nodes N1 and N2. <BR>DISTKP(K1,K2) Distance between keypoints K1 and K2. <BR>DISTEN(E,N) Distance between the centroid of element E and node N. Centroid is determined from the selected nodes on the element. <BR><BR>31.角度函数 (缺省单位为弧度,单位变换用 *AFUN 命令) <BR>ANGLEN(N1,N2,N3) Subtended angle between two lines (defined by three nodes where N1 is the vertex node). Default is in radians. <BR><BR>ANGLEK(K1,K2,K3) Subtended angle between two lines (defined by three keypoints where K1 is the vertex keypoint). Default is in radians. <BR><BR>32.最近实体函数 <BR>NNEAR(N) Selected node nearest node N. <BR>KNEAR(K) Selected keypoint nearest keypoint K. <BR>ENEARN(N) Selected element nearest node N. The element position is calculated from the selected nodes <BR><BR>33.面积函数 <BR>AREAND(N1,N2,N3) Area of the triangle with vertices at nodes N1, N2, and N3. <BR><BR>AREAKP(K1,K2,K3) Area of the triangle with vertices at keypoints K1, K2, and K3. <BR><BR>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. <BR><BR>34.法向函数: <BR>NORMNX(N1,N2,N3) X-direction cosine of the normal to the plane containing nodes N1, N2, and N3. <BR><BR>NORMNY(N1,N2,N3) Y-direction cosine of the normal to the plane containing nodes N1, N2, and N3. <BR><BR>NORMNZ(N1,N2,N3) Z-direction cosine of the normal to the plane containing nodes N1, N2, and N3. <BR><BR>NORMKX(K1,K2,K3) X-direction cosine of the normal to the plane containing keypoints K1, K2, and K3. <BR><BR>NORMKY(K1,K2,K3) Y-direction cosine of the normal to the plane containing keypoints K1, K2, and K3. <BR><BR>NORMKZ(K1,K2,K3) Z-direction cosine of the normal to the plane containing keypoints K1, K2, and K3. <BR><BR>35.相邻实体函数 <BR>ENEXTN(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. <BR><BR>NELEM(E,NPOS) Node number in position NPOS (1--20) of element E. <BR><BR>36.面函数 <BR>ELADJ(E,FACE) 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. <BR><BR>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.) <BR><BR>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. <BR><BR>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. <BR><BR>
发表于 2006-5-19 11:09 | 显示全部楼层
*get,nnode,node,,count
 楼主| 发表于 2006-5-19 18:28 | 显示全部楼层
<P>十分感谢!!!!!!!!!!!!!</P>
发表于 2009-10-10 17:54 | 显示全部楼层
学习了,写写1楼的大大
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-30 10:06 , Processed in 0.058881 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表