将结构进行到底!
没有正式公开的命令
上一篇 / 下一篇 2008-05-26 14:32:13 / 个人分类:Ansys使用技巧
Introduction to Inquiry Functions [John Crawford]:
Here is just about everything I know about inquiry functions.
They are similar to *GET functions in usage, and have two
input arguments. Here's an example.
a=ndinqr(33,1)
In this case, "a" will be assigned a value of -1 if node 33
is
unselected, 0 if it is undefined, and 1 if it is selected.
This is an example of using an inquiry function to obtain
information about a specific entity, in this case node 33.
An alternative use of an inquiry function is to find more
generic data about a certain kind of entities. The following
example illustrates this.
a=ndinqr(0,14)
This will assign to parameter "a" the highest node number
defined in the model. Notice that the first argument is zero,
and the second argument is 14.
Here are the inquiry functions I am aware of.
ndinqr(node,key) node number or zero, and key number
elmiqr(elem,key)
kpinqr(keypoint,key)
lsinqr(line,key)
arinqr(area,key)
vlinqr(volume,key)
rlinqr(real,key)
gapiqr(gap element,key)
masiqr(master DOF,key)
ceinqr(constraint equation,key)
cpinqr(coupled set,key)
csyiqr(coord system,key)
etyiqr(element type,key)
foriqr(nodal force,key)
All of these work pretty much the same, with the first
argument used as either an entity ID number (for data about a
specific node, element, etc.) or a zero if the information is
about a class of element (number of selected nodes, etc.)
The key numbers are defined as follows.
key=1 return select status (for a specific entity)
key=12 return number of defined entities (KP's, nodes, etc.)
key=13 return number of selected entities
key=14 return the highest ID number in use
There a few other inquiry functions which have a slightly
different format.
mpinqr(mat,prop,key) material property table number, property
number, key additional key=3 for number of temps used in a
specific property
dget(node,idof,kcmplx) node number, displacement pointer,
complex key displacement pointers are...
1=ux, 2=uy, 3=uz, 4=rotx, 5=roty, 6=rotz, 7=ax, 8=ay 9=az,
10=vx, 11=vy, 12=vz, 19=pres, 20=temp, 21=volt, 22=mag,
23=enke, 24=ends, 25=emf, 26=curr
complex key=0 for real, 1 for imaginary
fget(node,idof,kcomplx) same definition as dget, but for
forces this time
Useful Inquiry Functions [John Crawford]:
Nodes - ndinqr(node,key)
node - node number, should be 0 for key = 12, 13, 14
key - information needed
= 1, return select status:
= 12, return number of defined nodes
= 13, return number of selected nodes
= 14, return highest node number defined
= -2, superelement flag
= -3, master degrees of freedom bit pattern
= -4, active degrees of freedom bit pattern
= -5, solid model attachment
= -6, pack nodal line parametric value
output arguments:
for key = 1
= 0, node is undefined.
= -1, node is unselected.
= 1, node is selected.
Element-elmiqr(ielem,key)
ielem - element number, should be zero for key = 12,
13, or 14
key - information flag
= 1, return select status
= 12, return number of defined elements
= 13, return number of selected elements
= 14, return maximum element number used
= -1, material number
= -2, type.
= -3, real.
= 4, element section ID number
= 5, coordinate system number
= 7, solid model reference
output arguments:
for key = 1
= 0, element is undefined
= -1, element is unselected
= 1, element is selected
Keypointskpinqr(kpid,key)
kpid - keypoint may be 0 for key = 12, 13, 14
key - information flag.
= 1, select
= 12, number of defined
= 13, number of selected
= 14, highest number defined
= -1, material number
= -2, type
= -3, real number
= -4, node number, if meshed
= -7, element number, if meshed
output arguments:
for key = 1
= -1, unselected
= 0, undefined
= 1, selected
Lineslsinqr(lsid,key)
lsid - line segment for inquire may be 0 for key = 12,
13, 14
key - item to be returned
= 1, select status
= 2, length (in model units)
= 12 number of defined
= 13, number of selected
= 14, highest number defined
= -1, material number
= -2, type
= -3, real number
= -4, number of nodes
= -5, esys number
= -6, number of elements
= -8, number of element divs in existing mesh
= -9, keypoint 1
= -10, keypoint 2
= -15, section id
= -16, number of element divs for next mesh
= -17, 0 = hard / 1 = soft NDIV
= -18, 0 = hard / 1 = soft SPACE
Areaarinqr(areaid,key)
areaid - area for inquiry, may be 0 for key = 12, 13,
14
key - key to information needed about the areaid
= 1, return select status
= 12, return number of defined
= 13, return number of selected
= 14, return highest number defined
= -1, return material
= -2, return type
= -3, return real
= -4, return number of nodes
= -6, return number of elements
= -7, return pointer to area in foreign db
= -8, return element shape
= -9, return mid-node element key
= -10, return element coordinate system
= -11, return area constraint information
output arguments:
for key = 1
= 0, areaid is undefined
= -1, areaid is unselected
= 1, areaid is selected
for key = - 11
= 0, no constraint on this area
= 1, symmetry constraint
= 2, anti-symmetry
= 3, both symmetry and anti-symmetry
Volumesvlinqr(vnmi,key)
vnmi - volume for inquiry, may be 0 for key = 12, 13,
14
key - information flag
= 1, return select status
= 12, return number of defined
= 13, return number of selected
= 14, return highest number defined
= -1, material
= -2, type
= -3, real
= -4, number of nodes
= -6, number of elements
= -8, element shape
= -9, mid-node element key
= -10, element coordinate system
output arguments:
for key = 1
= 0, node is undefined
= -1, node is unselected
= 1, node is selected
= 0, real constant table is undefined.
= -1, real constant table is unselected.
= 1, real constant table is selected
Element Typeetyiqr(itype,key)
itype - element type number, should be 0 for key = 12
and 14
key - item to be returned
= 1, return select status:
= 12, return number of defined element types
= 14, return highest element type number defined
output arguments:
for key = 1
= 0, element type is undefined
= -1, element type is unselected
= 1, element type is selected
Real Constantsrlinqr(nreal,key)
nreal - real constant table number, should be 0 for
key
= 12, 13, 14
key - information flag
= 1, select status
= 12, number of defined real constant tables
= 13, number of selected real constant tables
= 14, highest real constant table defined
output arguments:
for key = 1
= 0, real constant table is undefined.
= -1, real constant table is unselected.
= 1, real constant table is selected
Section Tablesectinqr(nsect,key)
nsect - section id table number, should be 0 for key =
12, 13, 14
key - information flag
= 1, select status
= 12, return number of defined section id tables
= 13, return number of selected section id tables
= 14, return highest section id table defined
output arguments:
for key = 1
= 0, section id table is undefined.
= -1, section id table is unselected.
= 1, section id table is selected
Materialsmpinqr(mat,iprop,key)
mat - material number, should be 0 for key = 12 and 14
iprop - property reference number
iprop = 0, test for existence of any material property
with this material number (with key = 1)
key - key as to the information needed about material
property
= 1, return select status:
= 12, number of defined material properties
= 14, highest material property number defined
output arguments:
for key = 1, iprop = 0 (test for existence of any
material property with this material number)
EX = 1, EY = 2, EZ = 3, NUXY = 4, NUYZ = 5, NUXZ = 6,
GXY = 7, GYZ = 8, GXZ = 9, ALPX = 10, ALPY = 11, ALPZ =
12, DENS = 13, MU =14, DAMP = 15, KXX = 16, KYY = 17,
KZZ = 18, RSVX = 19, RSVY = 20, RSVZ = 21, C = 22, HF
=23, VISC = 24, EMIS = 25, ENTH = 26, LSST = 27, PRXY =
28, PRYZ = 29, PRXZ = 30, MURX = 31, MURY = 32, MURZ =
33, PERX = 34, PERY = 35, PERZ = 36, MGXX = 37, MGYY =
38, MGZZ = 39, EGXX = 40, EGYY = 41, EGZZ = 42, TGXX =
43, TGYY = 44, TGZZ = 45, SONC = 46, SLIM = 47, ELIM =
48, RTH = 54, CABL = 55, RIGI = 56, HGLS = 57, BM =
58,
QRAT = 59, REFT = 60, PLAS = 61, CREE = 62, FAIL = 63,
BH = 64, PIEZ = 65, SWEL = 66, WATE = 67, CONC = 68,
PFLO = 69, ANEL = 70, ACOU = 71, EVIS = 72, USER = 73,
NL = 74, HYPE = 75, NNEW = 76, MOON = 77, GDE = 78,
SUTH = 79, WIND = 80
for key = 1 (otherwise)
= 0, material prop is undefined
= 1, material prop is selected
Constraint Equationsceinqr(ceid,key)
ceid - constraint equation number
key - inquiry key, should be zero for key = 12, 13, 14
= 1, return select status
= 1, equation is selected
= 0, equation is undefined
= -1, equation is unselected
= 12, return number of defined constraint equations
= 13, return number of selected constraint equations
= 14, return number of highest numbered constraint
equation defined
= -1, return master degrees of freedom for this
equation
Couplescpinqr(cpid,key)
cpid - coupled set number
key - inquiry key, should be zero for key = 12, 13, 14
= 1, return select status
= 12, return number of defined coupled sets
= 13, return number of selected coupled sets
= 14, return the number of the highest numbered
coupled
set
output arguments:
for key = 1
= 1, coupled set is selected
= 0, coupled set in undefined
= -1, coupled set in unseleted
Coordinate Systemcsyiqr(csysid,key)
csysid - coordinate system reference number, should be
zero for key = 12 or 14
key - information flag.
= 1, return status:
= 12, number of defined coordinate systems
= 14, maximum coordinate system reference number used.
output arguments:
for key = 1
= 0, coordinate system is not defined
= -1, coordinate system is not selected
= 1, coordinate system is selected
Warning and Error Messageserinqr(key)
key - item to be returned
= 3, total number of notes displayed
= 4, total number of warnings displayed
= 5, total number of errors displayed
= 6, total number of fatals displayed
Inquiry Functions for Sections [Grama Bhashyam]:
I have looked at the code and can confirm Tyllinen Juha's
observation. It will work in 5.5, 5.6, and not likely to
change.
"Quick testing seems to indicate that Section number would be
available with sn = elmiqr(n,-4), where n is the element
number. At least that is the way it worked in 5.5.1 with
Beam188 and Beam189."
Other possibilites for element characteristics
-1, material number
-2, element type
-3, real constant number
-4, Element Section ID number
-5, coordinate system number
Additional Inquiry Function [Juha Tyllinen]:
Some time ago I dug out one additional Key:
NUMS value for the entity:
ndinqr(0,25)
elmiqr(0,25)
kpinqr(0,25)
lsinqr(0,25)
arinqr(0,25)
vlinqr(0,25)
It is sometimes handy for use in macros.
不用搞得这么复杂,这个命令已经公布了吧,欧好像用过,就是ANSYS 查询函数(Inquiry Function)贴出来给大家看。
在ANSYS操作过程或条件语句中,常常需要知道有关模型的许多参数值,如选择集中的单元数、节点数,最大节点号等。此时,一般可通过*GET命令来获得这些参数。现在,对于此类问题,我们有了一个更为方便的选择,那就是查询函数 — Inquiry Function。
Inquiry Function类似于ANSYS的 *GET 命令,它访问ANSYS数据库并返回要查询的数值,方便后续使用。ANSYS每执行一次查询函数,便查询一次数据库,并用查询值替代该查询函数。
NODE—ndinqr(node,key)
node—节点号,对于key=12,13,14为0
key—标识关于node的返回信息
=1, 选择状态
=12,定义的数目
=13,选择的数目
=14,定义的最大数
=-2,超单元标记
=-3,主自由度
=-4,激活的自由度
=-5,附着的实体模型
ndinqr(node,key)的返回值
对于key=1
=-1,未选择
=0,未定义
=1, 选择
ndinqr(node,key)
是一个函数,
比如ndinqr(0,13) 等于你当前所选择的节点的数目TAG:
标题搜索
日历
|
|||||||||
| 日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
| 1 | 2 | 3 | 4 | ||||||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 | |||
| 12 | 13 | 14 | 15 | 16 | 17 | 18 | |||
| 19 | 20 | 21 | 22 | 23 | 24 | 25 | |||
| 26 | 27 | 28 | 29 | 30 | 31 | ||||
数据统计
- 访问量: 660
- 日志数: 12
- 建立时间: 2008-05-02
- 更新时间: 2008-06-23
