ANSYS软件APDL命令流建模的体会ANSYS软件APDL命令流建模的体会首先申明,本人学习ANSYS基本上是靠自己一点一点琢磨出来的,由于本人喜欢用APDL命令流,故总结出来的几点经验也就比较适合用APDL命令的朋友。
1、多看help,ANSYS的help为我们提供了很强大的功能,我最喜欢的是其中对各个命令有关参数的说明和解释部分,不管是建模、加载、后处理等,都可以通过apdl命令来实现。
只要你知道命令,如“aatt ”,在help搜索栏输入“aatt”,回车,弹出aatt的有关页码,一般其中有一个只有“aatt”的一项,确认,即可看到你要查询的aatt命令的有关参数意义,本人常用的命令有: et---定义单元类型mp---定义材料属性k----建关键点,l----建线条a---由关键点建立面al---由线建立面v----由关键点建立体vl---由线建立体va--由面建立体lsel---在很多很多线中选择你需要的目标线,数量可以无限多……asel---在很多很多面中选择你需要的目标面,数量也可以无限多……vsel---在很多很多体中选择你需要的目标体,数量也可以无限多……latt----给选中的线按材料编号赋属性(前提是首先已定义好材料)aatt---给选中的面按材料编号赋属性vatt-----给选中的体按材料编号赋属性acel---按坐标轴赋体积力,lmesh,amesh,vmesh---对线、面、体进行剖分d---在节点上加约束边界dl---在线上加载约束边界da----在面上加载约束边界2、以上只是列出了常见的几个命令,但是ansys提供的命令是很多的,我们不可能都记得,计算记得,也不知道其有关参数是如何定义的,那不要紧,我们可以与界面操作结合起来学习。
我们先利用界面操作实现,然后在保存路径里面找到文件“file.log”,在该文件里有该操作等价的apdl命令,那以后我们就可以使用了。
3、复合命令,很多命令是复合命令,通过几个命令的组合以实现一定的目标,如FITEM、FLST等。
这里不予以详述,大家可在学习中慢慢体会。
4、ansys提供的apdl语言可像fortain、c语言一样,可以编程,有条件语句、逻辑语句、文件读写等,但是这些语句语法有个特点,就是在相应的语句前要加“*”,以示其与以上apdl命令的区别。
以上只是一点小小的总结,希望对大家有帮助。
K, NPT, X, Y, ZDefines a keypoint.Npt: Reference number for keypoint. If zero, the lowest available number is assigned X,y,z: Keypoint location in the active coordinate system (may be R, θ, Z or R, θ, Φ). If X = P, gra phical picking is enabled and all other fields (including NPT) are ignored (valid only in the GUI).A, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18Defines an area by connecting keypoints.P1, P2, P3, . . . , P18 List of keypoints defining the area (18 maximum if using keyboard entry). Atleast 3 keypoints must be entered. If P1 = P, graphical picking is enabled and all remaining argumentsare ignored (valid only in the GUI).L, P1, P2, NDIV, SPACE, XV1, YV1, ZV1, XV2, YV2, ZV2Defines a line between two keypoints.NDIV :Number of element divisions within this line. Normally this field is not used; specifying divisionswith LESIZE, etc. is recommended.SPACE :Spacing ratio. Normally this field is not used, as specifying spacing ratios with the LESIZE commandis recommended. If positive, SPACE is the nominal ratio of the last division size (at P2) to the firstdivision size (at P1). If the ratio is greater than 1, the division sizes increase from P1 to P2, andif less than 1, they decrease. If SPACE is negative, then |SPACE| is the nominal ratio of the center division size to those at the ends.XV1, YV1, ZV1 :Location (in the active coordinate system) of the head of the "slope vector" corresponding to the slope at the P1 end of the line. The tail of the vector is at the origin of the coordinatesystem. XV2, YV2, ZV2 :Location of the head of the "slope vector" corresponding to the slope at the P2 end ofthe line.AL, L1, L2, L3, L4, L5, L6, L7, L8, L9, L10Generates an area bounded by previously defined lines.N, NODE, X, Y, Z, THXY, THYZ, THZXDefines a node.NODE :Node number to be assigned. A previously defined node of the same number will be redefined. Defaultsto the maximum node number used +1.FILL, NODE1, NODE2, NFILL, NSTRT, NINC, ITIME, INC, SPACEGenerates a line of nodes between two existing nodes.ITIME, INC :Do fill-in operation a total of ITIMEs, incrementing NODE1, NODE2 and NSTRT by INC eachtime after the first. ITIME and INC both default to 1.NGEN, IT IME, INC, NODE1, NODE2, NINC, DX, DY, DZ, SPACE (类似:Agen) Generates additional nodes from a pattern of nodes.ITIME, INC :Do this generation operation a total of ITIME times(包含现有的自身), incrementing all nodesin the given pattern by INC each time after the first. ITIME must be > 1 for generation to occur. NODE1, NODE2, NINC :Generate nodes from the pattern of nodes beginning with NODE1 to NODE2 (defaults to NODE1) in steps of NINC (defaults to 1). If NODE1 = ALL, NODE2and NINC are ignored and the patternis all selected nodes [NSEL]. If NODE1 = P, graphical picking is enabled and all remaining command fieldsare ignored (valid only in the GUI). A component name may also be substituted for NODE1 (NODE2 and NINCare ignored).DX, DY, DZ :Node location increments in the active coordinate system (DR, Dθ, DZ for cylindrical, DR,Dθ, DΦ for spherical or toroidal).E, I, J, K, L, M, N, O, PDefines an element by node connectivity.I :Number of node assigned to first nodal position (node I). If I = P, graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI). J, K, L, M, N, O, P :Number assigned to second (node J) through eighth (node P) nodal position, if any.EGEN, ITIME, NINC, IEL1, IEL2, IEINC, MINC, TINC, RINC, CINC, SINC, DX, DY, DZGenerates elements from an existing pattern.ITIME, NINC :Do this generation operation a total of ITIMEs, incrementing all nodes in the given pattern by NINC each time after the first. ITIME must be >1 if generation is to occur. NINC may be positive, zero,or negative. If DX, DY, and/or DZ is specified, NINC should be setso any existing nodes (as on NGEN)are not overwritten.IEL1, IEL2, IEINC :Generate elements from selected pattern beginning with IEL1 to IEL2 (defaults to IEL1)in steps of IEINC (defaults to 1). If IEL1 is negative, IEL2 and IEINC are ignored and the last |IEL1|elements (in sequence backward from the maximum element number) are used as the pattern to be repeated.If IEL1 = ALL, IEL2 and IEINC are ignored and use all selected elements [ESEL] as pattern to be repeated.If P1 = P, graphical picking is enabled and all remaining command fields are ignored (valid only in theGUI). A component name may also be substituted for IEL1 (IEL2 and INC are ignored).MINC :Increment material number of all elements in the given pattern by MINC each time after the first.TINC :Increment type number by TINC.RINC :Increment real constant table number by RINC.CINC :Increment element coordinate system number by CINC.SINC :Increment section ID number by SINC.DX, DY, DZ :Define nodes that do not already exist but are needed by generated elements (as though the NGEN,ITIME,INC,NODE1,,,DX,DY,DZ were issued before EGEN). Zero is a valid value. If blank, DX, DY, and DZ are ignored.Note: A pattern may consist of any number of previously defined elements. The MAT, TYPE, REAL, ESYS, andSECNUM numbers of the new elements are based upon the elements inthe pattern and not upon the currentspecification settings.EDELE, IEL1, IEL2, INCDeletes selected elements from the model.IEL1, IEL2, INC :Delete elements from IEL1 to IEL2 (defaults to IEL1) in steps of INC (defaults to 1).If IEL1 = ALL, IEL2 and INC are ignored and all selected elements [ESEL] are deleted. If IEL1 = P, graphicalpicking is enabled and all remaining command fields are ignored(valid only in the GUI). A componentname may also be substituted for IEL1 (IEL2 and INC are ignored)./ESHAPE, SCALE, KEY ( 显示由实常数或截面定义所确定的线或面 (壳体) 单元)Displays elements with shapes determined from the real constants or section definition. SCALE Scaling factor:0 — Use simple display of line and area elements. This value is the default.1 — Use real constants or sec tion definition to form a solid shape display of the applicableelements.FAC — Multiply certain real constants, such as thickness, by FAC (where FAC > 0.01) and use themto form a solid shape display of elements.Current shell thickness key: KEY0 — Use current thickness in the displaced solid shape display of shell elements (valid forSHELL181, SHELL208, SHELL209, and SHELL281). This value is the default.1 — Use initial thickness in the displaced solid shape display of shell elements.ET, ITYPE, Ename, KOP1, KOP2, KOP3, KOP4, KOP5, KOP6, INOPRDefines a local element type from the element library.ITYPE :Arbitrary local element type number. Defaults to 1 + current maximum. Ename:Element name (or number) as given in the element library in Chapter 4 of the Element Reference.The name consists of a category prefix and a unique number, such as BEAM3. The category prefix of the name (BEAM for the example) may be omitted but is displayed upon output for clarity. If Ename = 0, the element is defined as a null element.KOP1,. . . , KOP6 :KEYOPT values (1 through 6) for this element, as described in the Element Reference.INOPR :If 1, suppress all element solution printout for this element type.R, NSET, R1, R2, R3, R4, R5, R6Defines the element real constants.NSET :Set identification number (arbitrary). If same as a previous set number, set is redefined. Set numberrelates to that defined with the element [REAL]. Note that the GUI automatically sets this value. R1, R2, R3, . . . , R6: Real constant values (interpreted as area, moment of inertia, thickness, etc., as required for the particular element type using this set), or table names for tabular input of boundaryconditions. Use RMORE command if more than six real constants per set are to be input.MP, Lab, MAT, C0, C1, C2, C3, C4Defines a linear material property as a constant or a function of temperature. Lab :Valid material property label. Applicable labels are listed under "Material Properties" in the inputtable for each element type in the Element Reference. See Linear Material Properties of the Element Referencefor more complete property label definitions:EX — Elastic moduli (also EY, EZ).ALPX — Secant coefficients of thermal expansion (also ALPY, ALPZ).CTEX — Instantaneous coefficien ts of thermal expansion (also CTEY, CTEZ).THSX — Thermal strain (also THSY, THSZ).REFT — Reference temperature. Must be defined as a constant; C1 through C4 are ignored.PRXY — Major Poisson's ratios (also PRYZ, PRXZ).NUXY — Mino r Poisson's ratios (also NUYZ, NUXZ).GXY — Shear moduli (also GYZ, GXZ).DAMP — K matrix multiplier for damping.Note: If used in an explicit dynamic analysis, the value corresponds to the percentageof damping in the high frequency domain. For example, 0.1 roughly corresponds to10% damping in the high frequency domain.DMPR — Constant material damping coefficient.MU — Coefficient of friction.DENS — Mass density.C — Specific heat.ENTH — Enthalpy.KXX — Thermal conductivities (also KYY, KZZ).HF — Convection or film coefficient.EMIS — Emissivity.QRATE — Heat generation rate.VISC — Viscosity.SONC — Sonic velocity.RSVX — Electrical resistivities (also RSVY, RSVZ ).PERX — Electric relative permittivities (also PERY, PERZ).Note: If you enter permittivity values less than 1 for SOLID5, PLANE13, or SOLID98, theprogram interprets the values as absolute permittivity. Values input for PLANE223,SOLID226, or SOLID227 are always interpreted as relativepermittivity.MURX — Magnetic relative permeabilities (also MURY, MURZ).MGXX — Magnetic coercive forces (also MGYY, MGZZ).LSSM — Magnetic loss tangent.LSST — Electric loss tangent.SBKX — Seebeck coefficients (also SBKY, SBKZ).MAT :Material reference number to be associated with the elements (defaults to the current MAT setting [MAT]).C0 :Material property value, or if a property-versus-temperature polynomial is being defined, the constant term in the polynomial. C0 can also be a table name (%tabname%); if C0 is a table name, C1 through C4 areignored.C1, C2, C3, C4 :Coefficients of the linear, quadratic, cubic, and quartic terms, respectively, in the property-versus-temperature polynomial. Leave blank (or set to zero) for a constant material property. Notes :MP defines a linear material property as a constant or in terms of a fourth order polynomial as a function of temperature. (See the TB command for nonlinear material property input.) Linear materialproperties typically require a single substep for solution, whereas nonlinear material properties require multiple substeps; see Linear Material Properties in the Element Reference for details.If the constants C1 - C4 are input, the polynomial234Property = C0 + C1(T) + C2(T) + C3(T) + C4(T)is evaluated at discrete temperature points with linearinterpolation between points (that is, a piecewise linear representation) and a constant-valued extrapolation beyond the extreme points. First-order properties use two discrete points (?9999?). The MPTEMP or MPTGEN commands must be used for second and higher orderproperties to define appropriate temperature steps. To ensure thatthe number of temperatures defined via the MPTEMP and MPTGEN commands is minimally sufficient for a reasonable representation of the curve, ANSYS generates an error message if the number is less than N, and a warning message if the number is less than 2N. The value N represents thehighest coefficient used; for example, if C3 is nonzero and C4 is zero,a cubic curve is being used which is defined using 4 coefficients sothat N = 4.A polynomial input is not valid in an explicit dynamic analysis orfor Lab = DAMP. C1, C2, C3, and C4 areignored.The use of tabular material properties ( = %%) is available only for FLUID116. Fluid properties C0tabnamecan be evaluated as a function of pressure, temperature, velocity, time, and location (independent variables). Use the *DIM command to create the table of property values as a function of the independent variables. Then refer to this table via the MP command for the property. If using temperature or pressure independent variables, you need to activate the appropriate pressure or temperature degrees of freedom on the element. Tabular material properties are calculated before the first iteration (that is, using initial values [IC]).For more information about using table-type array parameters, seethe discussion on applying tabular boundaryconditions in the . Basic Analysis GuideWhen defining a reference temperature (MP,REFT), you can convert temperature-dependent secant coefficientsof thermal expansion (SCTE) data from the definition temperature to the reference temperature. To do so,issue the MPAMOD command.This command is also valid in SOLUTION.Product RestrictionsCommand Option Lab Available ProductsALPX MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS ALPY MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS ALPZ MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS C MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS CTEX MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS CTEY MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS CTEZ MP ME ST PR PRN DS DSS <><> <> DY PP <> EME MFS DAMP MP ME ST <> <> <> <> <> <> <> DY PP <> EME MFS DENS MP ME ST PR PRN DS DSS <> <> EH DY PP <> EME MFS DMPR MP ME ST PR PRN <> <> <> <> <> DY PP <> EME MFS EMIS MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS ENTH MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS EX MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS EY MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS EZ MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS GXY MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS GXZ MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS GYZ MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS HF MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS KXX MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS KYY MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS KZZ MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS LSSM MP <> <> <> <> <> <> <> EM EH <> PP <> EME <> LSST MP ME <> <> <> <> <> <> EM EH <> PP <> EME MFS MGXX MP ME <> <> <> <> <> <> EM <> DY PP <> EME MFS MGYY MP ME <> <> <> <> <> <> EM <> DY PP <> EME MFSMGZZ MP ME <> <> <> <> <> <> EM <> DY PP <> EME MFS MU MP ME ST <> PRN <> <> <> <> <> DY PP <> EME MFS MURX MP ME ST PR PRN DS DSS FL EM EH DY PP <> EME MFS MURY MP ME ST PR PRN DS DSS FL EM EH DY PP <> EME MFS MURZ MP ME ST PR PRN DS DSS FL EM EH DY PP <> EME MFS NUXY MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS NUXZ MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS NUYZ MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS PERX MP ME <> <> <> <> <> FL EM EH DY PP <> EME MFS PERY MP ME <> <> <> <> <> FL EM EH DY PP <> EME MFS PERZ MP ME <> <> <> <> <> FL EM EH DY PP <> EME MFS PRXY MP ME ST PR PRN DS DSS FL <> <> DY PP <> EME MFS PRXZMP ME ST PR PRN DS DSS FL <> <> DY PP <> EME MFS PRYZ MP ME ST PR PRN DS DSS FL <> <> DY PP <> EME MFS QRAT MP ME ST PR PRN DS DSS <> EM <> DY PP <> EME MFS REFT MP ME ST PR PRN DS DSS <> <> <> DY PP <> EME MFS RSVX MP ME ST PR PRN DS DSS FL EM EH DY PP <> EME MFS RSVY MP ME ST PR PRN DS DSS FL EM EH DY PP <> EME MFS RSVZ MP ME ST PR PRN DS DSS FL EM EH DY PP <> EME MFS SBKX MP ME <> <> <> <> <> <> EM <> <> PP <> EME MFS SBKY MP ME <> <> <> <> <> <> EM <> <> PP <> EME MFS SBKZ MP ME <> <> <> <> <> <> EM <> <> PP <> EME MFS SONC MP ME <> <> <> <> <> FL <> <> DY PP <> EME MFS THSX MP ME ST <> <> <> <> FL <> <> DY PP <> EME MFS THSY MP ME ST <> <> <> <> FL <> <> DY PP <> EME MFS THSZ MP ME ST <> <> <> <> FL <> <> DY PP <> EME MFS VISC MP ME ST <> <> <> <> FL <> <> DY PP <> EME MFS ET, ITYPE, Ename, KOP1, KOP2, KOP3, KOP4, KOP5, KOP6, INOPR MP,Lab,MAT,C0,C1,C2,C3,C4(定义线性材料特性)lab: 待定义的特性项目(ex,alpx,reft,prxy,nuxy,gxy,mu,dens)ex: 弹性模量nuxy: 小泊松比alpx: 热膨胀系数reft: 参考温度reft: 参考温度prxy: 主泊松比gxy: 剪切模量mu: 摩擦系数dens: 质量密度mat: 材料编号(缺省为当前材料号), 对应ET所定义的号码(ITYPE),表示该组属性属于ITYPE。