1. I have trouble applying a displacement constraint in the cylindrical coordinate system.
2. I'm trying to plot stresses in a specific area, but it doesn't seem to work.
3. How do I read points in from a file?
4. How do I automatically number keypoints with an array parameter?
Constraints are applied to the nodes, which are in the nodal coordinate system. The nodal coordinate system is ALWAYS Global Cartesian. What you
will need to do it to 'rotate the nodes into the active coordinate system' using the NROTATE command. If your active coordinate system is cylindrical, NROTATE will rotate them so that y will be the tangential direction for each node. Here is an example:
/prep7
et,1,plane42
blc4,0,0,10,10
CYL4,0,0,5
ASBA,1,2,,,DELETE
esize,0.5
amesh,all
csys,1
nsel,s,loc,x,5 !select nodes on curve
d,all,uy,0
nplo !See that y constraints are all pointing in the global y direction
nrot,all !Rotate nodes into the active coordinate system
nplo !Now see that the constraints are what you wanted
Yes that is the way it is supposed to work. To get closer to what you want, you should select the area, select the nodes attached to that area,
then select the elements attached to those nodes.
This can be done using the Ansys APDL functions. Look in the APDL manual for a complete description. Here is a brief exercpt from section 3.11.5.4 which shows how to read data into an array parameter.
You can fill an array from a data file using the *VREAD command (Utility Menu>Parameters>Array Parameters>Read from File). The command reads information from an ASCII data file and begins writing it into the array, starting with the index location that you specify. You can control the format of the information read from the file through data descriptors. The data descriptors must be enclosed in parenthesis and placed on the line following the *VREAD command. See Vector Operations for more information about data descriptors. The data descriptors control the number of fields to be read from each record, the width of the data fields, and the position of the decimal point in the field.
For example, given the following data file named dataval:
1.5 7.8 12.3
15.6 -45.6 42.5
and an array called EXAMPLE that has been dimensioned as 2 x 3, the following commands (provided as either a part or a macro or input listing)
*DIM,EXAMPLE,,2,3
*VREAD,EXAMPLE(1,1),dataval,,,JIK,3,2
(3F6.1)
result in
EXAMPLE = 1.5 7.8 12.3
15.6 -45.6 42.5
For automatic keypoint numbering you could use:
num=2 ! set this to be the number of rows of data in EXAMPLE
csys,0 ! or whatever coordinate system you want to use
*do,jj,1,num
k,,example(jj,1),example(jj,2),example(jj,3)
*enddo
For user controlled keypoint numbering change "k,," to "k,xx+jj,' and set xx before the do loop as the starting keypoint number. For example, if you issue xx=100, then keypoints will be created as 101,102,103,....