当前位置:服务支持 >  软件文章 >  ANSYS“get”函数列表及使用技巧

ANSYS“get”函数列表及使用技巧

阅读数 4
点赞 0
article_banner

自己收藏并与大家分享,来自于ANSYS的help

“get函数”可用于某些项,并可用于代替*get命令。函数返回值并在函数被输入的地方使用它,绕过了用参数名存储值和在要使用值的地方输入参数名的需要。

例如,假设要计算两个节点的平均X位置。使用*GET命令,参数L1可以指定节点1的X位置,参数L2可以指定节点2的X位置。然后,可以从mid=(L1+L2)/2计算mid位置:

*GET,L1,NODE,1,LOC,X

*GET,L2,NODE,2,LOC,X

MID=(L1+L2)/2

但是,使用返回节点N的X位置的节点位置“get ”函数NX(N),可以直接计算MID,而不需要中间参数L1和L2:

MID=(NX(1)+NX(2))/2

除非另有说明,否则Get函数返回活动坐标系中的值。

Get函数参数本身可能是参数或其他Get函数。get函数NELEM(E,NPOS)返回元素编号E的NPOS位置的节点号。组合函数NX(NELEM(E,NPOS))返回该节点的X位置。

下表列出了按功能分组的可用get函数。*GET命令还列出GET函数作为*GET items的替代项(如果适用)

Table 1: *GET - Get Function Summary

"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.

Next Selected Entity

NDNEXT(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.

Locations

CENTRX(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 system

KY(K) Y-coordinate of keypoint K in the active coordinate system

KZ(K) Z-coordinate of keypoint K in the active coordinate system

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 Location

NODE(X,Y,Z) Number of the selected node nearest the X,Y,Z point (in the active coordinate system, lowest number for coincident nodes). A number higher than the highest node number indicates that the node is internal (generated by program).

KP(X,Y,Z) Number of the selected keypoint nearest the X,Y,Z point (in the active coordinate system, lowest number for coincident keypoints).

Distances

DISTND(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.

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.

Nearest to Entity

NNEAR(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.

Areas

AREAND(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 3–D, select all the nodes of the surface of interest before using ARNODE.

Normals

NORMNX(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.

Connectivity

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.

NELEM(E,NPOS) Node number in position NPOS (1--20) of element E.

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 ROTZ

bit 8 is AZ

bits 9,10,11 are VX,VY,VZ

bit 18 is PRES, bit 19 is TEMP, bit 20 is VOLT, bit 21 is MAG

bit 24 is EMF, bit 25 is CURR

For 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)

Faces

ELADJ(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.

Model Information

EATT(E,VAL) Element attribute number assigned to element E. Use VAL = 1 for MATT, 2 for TYPE, 3 for REAL, and 4 for SECN.

RCON(R,LOC) Real constant value for real table R and location LOC.

General Contact Information

SECTOMAT(Sect1,Sect2) Material ID to be used for general contact between sections Sect1 and Sect2.

SECTOREAL(Sect1,Sect2) Real constant ID to be used for general contact between sections Sect1 and Sect2.

Degree of Freedom Results

UX(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).

PRES(N) Pressure at node 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.

VOLT(N) Electric potential at node N.

MAG(N) Magnetic scalar potential at node N.

AZ(N) AZ magnetic vector potential at node N.

Returns information about the database manager

VIRTINQR(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 Mechanical APDL filtering keywords.

KWGET(KEYWORD) Returns the current value the keyword specified by KEYWORD.

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 is the output string (or character parameter) Str1 and Str2 are input strings. Strings are a maximum of 128 characters. (see *DIM)

StrOut = STRSUB(Str1, nLoc,nChar) Get the nChar substring starting at character nLoc in Str1.

StrOut = STRCAT(Str1,Str2) Add Str2 at the end of Str1.

StrOut = STRFILL(Str1,Str2,nLoc) Add Str2 to Str1 starting at character nLoc.

StrOut = STRCOMP(Str1) Remove all blanks from Str1

StrOut = STRLEFT(Str1) Left-justify Str1

nLoc = STRPOS(Str1,Str2) Get starting location of Str2 in Str1.

nLoc = STRLENG(Str1) Location of last nonblank character

StrOut = UPCASE(Str1) Upper case of Str1

StrOut = LWCASE(Str1) Lower case of Str1

The following functions manipulate file names.

Path String = JOIN ('directory','filename','extension') Produces a contiguous pathstring. e.g. directory/filename.ext

Path String = JOIN ('directory','filename') Produces a contiguous pathstring. e.g. directory/filename

SPLIT('PathString', 'DIR') Produces a separate output of the directory from the pathstring.

SPLIT('PathString', 'FILE') Produces a separate output of the complete filename (with extension) from the pathstring.

SPLIT('PathString', 'NAME') Produces a separate output of the filename from the pathstring.

SPLIT('PathString', 'EXT') Produces a separate output of the file extension from the pathstring.


免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删
相关文章
QR Code
微信扫一扫,欢迎咨询~

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 155-2731-8020
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

手机不正确

公司不为空