```

```

MENG 421 Assignment 4

Ansys Axisymmetric Cylinder

```

```

MENG 421 -- Class assignments -- 1 2 3 4 5 6 8 9 10 11 12

Lecture notes -- Milestones 1 2 NGEN, Plane42, Plane82,
Axial node numbering, Ansys code | Radial node numbering, Ansys code
Element 1, Elements 1-6, Element 1-12, Cylind1.a,

In Lesson 2 you found the deflection and stress in a cylindrical body by using the Ansys Pipe16 element. For today's lesson you will find the deflection and stress in a cylindrical body by another method. You will use the Ansys Plane42 element in axisymmetric mode. With this method you define a planar shape that is revolved about the y axis. You can make many shapes in this way. For example, a rectangle generates a cylinder when rotated about the left edge, and a pipe if the axis is offset to the left. A trapezoidal shape can produce a conical nozzle. Learn more from the Ansys help files by searching for plane42 and also axisymmetric.

You will also learn more about the Ansys N, E, and FILL commands and the NGEN and EGEN commands for creating a set of elements and you will create a two-dimensional section that Ansys rotates about the Y-axis to generate the cylinder. You will use the 2D, 4-node Ansys element PLANE42 with the axisymmetric option. Since you only define a two-dimensional array of elements, the Ansys plot only shows the 2D cross-section of half the cylinder. The cylinder is deformed by loading the top surface is the while the bottom surface is constrained.

Today's lesson is in two parts. First you will use a short file Cylind1a.a to create just the 2D array in stages by adding keyboard commands. Then you will change to the complete file Cylind1.a to solve the problem. For both files, you will make changes with editor before running Ansys. For the complete second file, copy the output data to the end of the Ansys file, and print out both the Ansys file and graphic shown above.

1. Getting started
Before going any further, do the four things you learned in Assignment 2: check the screen resolution, check the size of your stored files, clear the Recycle Bin, and clear the Temp folder.

2. Copying the two Ansys files.
Copy the two files: cylind1.a and cylind1a.a from class files page as you have done before.

3. Editing the first Ansys file cylind1a.a.
• Open an editor with the shorter file cylind1a.a
• Put your name and date on the /TITLE line as usual.
• Go to the variable elax (number of axial elements) and change the value to 6
• Go to the variable elra (number of radial elements) and change the value to 2
• Notice that the next to last line is
`    E,1,11,12,2`
which defines the first quadrilateral element in the preprocessor section.
• Don't close the editor, we'll use it in the next step.

4. Editing the second Ansys file cylind1.a.
• Open a second editor for the longer file cylind1.a
• Go back to the first editor and drag through the entire TITLE line with your name, to highlight it
• Type Ctrl-C to copy the line
• Click to remove the highlight
• Move to the second editor and drag through the entire TITLE line to highlight it
• Type Ctrl-V to paste the new TITLE line.
• Click to remove the highlight
• Make two more changes to the file as you did for the other one:
• Go to the variable elax (number of axial elements) and change the value to 6
• Go to the variable elra (number of radial elements) and change the value to 2
• Don't close the editor for cylind1.a, the complete problem, since you will put the Ansys results at the end.

5. Running cylind1a.a with Ansys
In this section you will run the short file with Ansys in batch mode to create the first element. Then you will type two Ansys EGEN commands to create the remaining elements.
• Start Ansys.
• Click the Ansys File menu at the upper left and pick Read Input from.
• The Read File dialog box should show C:\WINDOWS\Temp since that is where you set the workspace previously.
(If another location is shown instead, Ansys is not set correctly. Then reset Ansys to C:\WINDOWS\Temp as you learned in Assignment 2.)
But, of course, your Ansys files are not stored in C:\WINDOWS\Temp.
• Steer Ansys to the location to your files at U:\win\Ansys.
• Drop down the Drive list and pick U
• Double-click the win folder
• Double-click the Ansys folder
• Highlight your Cylind1a.a file by left clicking.
• Click OK to start running the short program
• Your figure should look like this showing the first element (1, 11, 12, 2).
• Check for the correct node numbers.
• Check that your name, the date, and the title appear on the figure.
• Shift the figure to the left and reduce the size with the Pan-Zoom-Rotate tool you used in Lesson 3.
• Create a column of elements by typing the element generation command shown below
• Find the Ansys command line at the upper-left side with the heading
`   Pick a menu item or enter ANSYS Command below`
• Click in the box just below this line and type the following
`   EGEN,elax,1,-1`
As you know, this command creates elax (6) total elements using the previous element (-1) as a pattern and increments the node numbers by 1.
• Press Enter to complete the command.
• The figure may be so large that you can only see part of it. Use the Pan-Zoom-Rotate tool to make all the elements visible by repeatedly clicking the small dot and the down arrow.
• Your figure should look like this showing six vertical elements.
• Create the remaining elements by typing a second EGEN command
• Click the command line box again and type the following
`   EGEN,elra,10,-elax`
This command copies the previous elax (6) elements to create elra (2) columns of elements and increments the node numbers by 10.
• Press Enter to complete the command.
• Your figure should look like this showing the 12 elements.
• Close the Pan-Zoom tool.
• You are now finished with this file
• Click the File menu and pick Clear & Start New so you can run the next batch file

6. Running cylind1.a with Ansys
In this section you will run your edited Cylind1 file with Ansys. This will create the complete figure and calculate the deflections of the nodes.
• Be sure you have cleared Ansys in the previous section.
• Highlight your Cylind1.a file by left clicking.
• Click OK to start running your program. The cylinder should appear in the Graphics window.
• The background is black because of the /COLOR,PBAK,off command.
• Click Close when the calculations are done.
• Check that your name, date, and title appear on the figure.
If not, go back to the editor, put your name and date on the /TITLE line of the Ansys source program, and save the file. Run Ansys again by first clicking File and then Clear & Start New.

7. Reduce the figure size and slide it over the title
• In the Utility Menu click PlotCtrls and pick Pan, Zoom, Rotate. Click for full tool.
• Notice that both the original and deformed shapes are shown.
• Move to the middle part of the menu, shown on the right, and pick the smaller dot to zoom out so all of the figure shows.
• Pick the left arrow to move the figure over your title.
• Don't change the orientation with the Iso or Obliq buttons.
• Your figure should look like the one on the right. this

8. Capture your figure with IrfanView as you did in Assignment 3. Make the usual changes with the photo editor (reverse, gray scale, transparent), then print it.

9. Animate the figure with the following steps.
• Click Animate, then pick Deformed Shape
• Pick Def + undeformed and click OK
• The animation appears in the control window.
• Stop the animation.
• Close the animation controller.

10. To see a 560KB animation of the deformation:
• Microsoft Internet Explorer opens Media Player with full controls.

11. Make a 3/4 oblique view of the complete cylinder and animate it.
• Move to Style
• Move right to Symmetry Expansion and click 2D AxiSymmetric
• Pick 3/4 expansion
• Pick OK.
• Open the Pan-Zoom-Rotate tool
• Pick the Obliq button
• Your figure should look like this
• Click Animate, then pick Deformed Shape
• Pick Def + undeformed and click OK
• The animation appears as before the animation controller.
• Stop the animation.
• Close the animation controller.

12. To see a 560KB animation of the oblique view:

13. Pasting the deflection data to your Ansys File
In this section you will copy the calculated deflections to your Ansys file and then print it.
• In the left pane of Explorer left-click U:\Ansys\ to see the Ansys output file Displ.txt in the right pane.
• The first part of the output appears on the Ansys Output Window. We aren't interested in this part unless there are error messages.
• The displacements and forces are in the file Displ.txt because the line:
`    /output,Displ,txt,U:\win\Ansys\   !  displacements`
appears in the Ansys source code (Cylind1.a)
• Make sure that editor is open with your Cylind1.a file.
• Double-click the file Displ.txt so another copy of Notepad can edit it.
• Look through the file to find the displacement with the heading
`       NODE    UX    UY`
• Drag through the displacement data and press Ctrl-C to copy to the clipboard.
• Switch to the editor that has your Ansys file and scroll to the bottom.
• Drag through the original output to highlight it and press the Del key.
• Press Ctrl-V to paste the new displacement data.
• Check that the results are close to the exact value.
• Make changes if necessary and rerun Ansys.