Frequently Asked Questions
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?
1. I am working in the global cylindrical coordinate system (CYS=1). I am able to create the geometry in this coordinate system. I'd like to apply a displacement constraint on an area in the theta direction. I tried setting UY=0 for this area but this seems to take effect in the global cartesian coordinate system (from looking at the symbols that appear in the graphics window). How do I apply a displacement constraint in the theta direction in the cylindrical coordinate system?
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:
nsel,s,loc,x,5 !select nodes on curve
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
2. I'd like to plot the von Mises stress for selected areas in a 3D model. I select the nodes attached to these areas using select logic. However, then I do a contour plot of the nodal solution (PLNSOL), it seems to plot the stress for all the areas, not just the selected surfaces. How do I plot stresses only for the selected areas?
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.
3. I have a list of x,y,z coordinates in a text file. How can I read these into ANSYS to create keypoints?
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 220.127.116.11 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)
EXAMPLE = 1.5 7.8 12.3
15.6 -45.6 42.5
4. If I wanted to create two keypoints at (1.5, 7.8, 12.3) and (15.6, -45.6, 42.5) using the array parameter EXAMPLE in question 3, how would I do it? I am able to create them one-by-one for each element of the array but that becomes tedious when I have a lot of rows in the table.
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
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,....