| Verification Example | | Preprocessing | | Solution | | Postprocessing | | Command Line |
| Bicycle Example | | Preprocessing | | Solution | | Postprocessing | | Command Line |

This tutorial was created using ANSYS 7.0 to solve a simple 3D space frame problem.

The problem to be solved in this example is the analysis of a bicycle frame. The problem to be modeled in this example is a simple bicycle frame shown in the following figure. The frame is to be built of hollow aluminum tubing having an outside diameter of 25mm and a wall thickness of 2mm.

Bike Geometry

The first step is to simplify the problem. Whenever you are trying out a new analysis type, you need something (ie analytical solution or experimental data) to compare the results to. This way you can be sure that you've gotten the correct analysis type, units, scale factors, etc.

The simplified version that will be used for this problem is that of a cantilever beam shown in the following figure:

simple pipe

  1. Give the Simplified Version a Title (such as 'Verification Model').

    Utility Menu > File > Change Title

  2. Enter Keypoints

    For this simple example, these keypoints are the ends of the beam.

    • We are going to define 2 keypoints for the simplified structure as given in the following table
      keypointcoordinate
      x y z
      1 0 0 0
      2 500 0 0

    • From the 'ANSYS Main Menu' select:
      Preprocessor > Modeling > Create > Keypoints > In Active CS

  3. Form Lines
  4. The two keypoints must now be connected to form a bar using a straight line.

  5. Define the Type of Element
  6. It is now necessary to create elements on this line.

  7. Define Geometric Properties
  8. We now need to specify geometric properties for our elements:

  9. Element Material Properties
  10. You then need to specify material properties:

  11. Mesh Size
  12. NOTE
    It is not necessary to mesh beam elements to obtain the correct solution. However, meshing is done in this case so that we can obtain results (ie stress, displacement) at intermediate positions on the beam.

  13. Mesh
  14. Now the frame can be meshed.

  15. Saving Your Work

  16. Utility Menu > File > Save as.... Select the name and location where you want to save your file.

  1. Define Analysis Type
  2. Apply Constraints
  3. Apply Loads
  4. As shown in the diagram, there is a vertically downward load of 100N at the end of the bar

    The applied loads and constraints should now appear as shown below.

    [Loads & Constraints]

  5. Solving the System
  6. We now tell ANSYS to find the solution:

  1. Hand Calculations
  2. Now, since the purpose of this exercise was to verify the results - we need to calculate what we should find.

    Deflection:

    The maximum deflection occurs at the end of the rod and was found to be 6.2mm as shown above.

    Stress:

    The maximum stress occurs at the base of the rod and was found to be 64.9MPa as shown above (pure bending stress).

  3. Results Using ANSYS
  4. Deformation

    Deflection

    Stresses

    For line elements (ie beams, spars, and pipes) you will need to use the Element Table to gain access to derived data (ie stresses, strains).

    Bending Moment Diagrams

    To further verify the simplified model, a bending moment diagram can be created. First, let's look at how ANSYS defines each element. Pipe 16 has 2 nodes; I and J, as shown in the following image.

    To obtain the bending moment for this element, the Element Table must be used. The Element Table contains most of the data for the element including the bending moment data for each element at Node I and Node J. First, we need to obtain obtain the bending moment data.

The above example was solved using the Graphical User Interface (or GUI) of ANSYS. This problem can also been solved using the ANSYS command language interface. To see the benefits of the command line clear your current file:

Copy the following code into the command line, then hit enter. Note that the text following the "!" are comments.

/PREP7			! Preprocessor
K,1,0,0,0,  		! Keypoint, 1, x, y, z
K,2,500,0,0,		! Keypoint, 2, x, y, z
L,1,2  			! Line from keypoint 1 to 2
!*
ET,1,PIPE16 		! Element Type = pipe 16
KEYOPT,1,6,1		! This is the changed option to give the extra force and moment output
!*  
R,1,25,2,		! Real Constant, Material 1, Outside Diameter, Wall thickness
!*  
MP,EX,1,70000		! Material Properties, Young's Modulus, Material 1, 70000 MPa
MP,PRXY,1,0.33   	! Material Properties, Major Poisson's Ratio, Material 1, 0.33
!*  
LESIZE,ALL,20           ! Element sizes, all of the lines, 20 mm   
LMESH,1  		! Mesh the lines
FINISH                  ! Exit preprocessor
/SOLU		        ! Solution
ANTYPE,0                ! The type of analysis (static)
!*
DK,1, ,0, ,0,ALL 	! Apply a Displacement to Keypoint 1 to all DOF
FK,2,FY,-100 		! Apply a Force to Keypoint 2 of -100 N in the y direction 
/STATUS,SOLU					
SOLVE   		! Solve the problem
FINISH  

Note that you have now finished Postprocessing and the Solution Phase with just these few lines of code. There are codes to complete the Postprocessing but we will review these later.


Now we will return to the analysis of the bike frame. The steps which you completed in the verification example will not be explained in great detail, therefore use the verification example as a reference as required. We will be combining the use of the Graphic User Interface (GUI) with the use of command lines.

Recall the geometry and dimensions of the bicycle frame:

Bike Geometry


  1. Clear any old ANSYS files and start a new file Utility Menu > File > Clear and Start New

  2. Give the Example a Title
    Utility menu > File > Change Title

  3. Defining Some Variables

    We are going to define the vertices of the frame using variables. These variables represent the various lengths of the bicycle members. Notice that by using variables like this, it is very easy to set up a parametric description of your model. This will enable us to quickly redefine the frame should changes be necessary. The quickest way to enter these variables is via the 'ANSYS Input' window which was used above to input the command line codes for the verification model. Type in each of the following lines followed by Enter.

           x1 = 500
           x2 = 825
           y1 = 325
           y2 = 400
           z1 =  50
        

  4. Enter Keypoints
  5. For this space frame example, these keypoints are the frame vertices.

    In this example, we defined the keypoints by making use of previously defined variables like y1 = 325. This was simply used for convenience. To define keypoint #1, for example, we could have alternatively used the coordinates x = 0, y = 325, z = 0.

  6. Changing Orientation of the Plot
  7. Create Lines
  8. We will be joining the following keypoints together:
    linekeypoint
    1st2nd
    112
    223
    334
    414
    535
    645
    736
    846

    Again, we will use the command line to create the lines. The command format to create a straight line looks like:

      L, P1, P2 
      Line, Keypoint at the beginning of the line, Keypoint at the end of line
    

    For example, to obtain the first line, I would write: ' L,1,2 '

    Note: unlike 'Keypoints', 'Lines' will automatically assign themselves the next available reference number.

  9. Define the Type of Element
    Preprocessor > Element Type > Add/Edit/Delete > Add

    As in the verification model, define the type of element (pipe16). As in the verification model, don't forget to change Option K6 'Include Output' to obtain extra force and moment output.

  10. Define Geometric Properties
    Preprocessor > Real Constants > Add/Edit/Delete

    Now specify geometric properties for the elements

     Outside diameter    OD:   25
     Wall thickness  TKWALL:    2
    

  11. Element Material Properties
  12. To set Young's Modulus and Poisson's ratio, we will again use the command line. (ensure that the preprocessor menu is still open - if not open it by clicking Preprocessor in the Main Menu)

    	MP, LAB, MAT, C0
    	Material Property,Valid material property label, Material Reference Number, value
    

  13. Mesh Size
  14. As in the verification model, set the element length to 20 mm
    Preprocessor > Meshing > Size Cntrls > ManualSize > Lines > All Lines

  15. Mesh
  16. Now the frame can be meshed.

    Saving Your Job
    Utility Menu > File > Save as...


Close the 'Preprocessor' menu and open up the 'Solution' menu (from the same 'ANSYS Main Menu').

  1. Define Analysis Type

  2. Solution > Analysis Type > New Analysis... > Static

  3. Apply Constraints
  4. Once again, we will use the command line. We are going to pin (translational DOFs will be fixed) the first keypoint and constrain the keypoints corresponding to the rear wheel attachment locations in both the y and z directions. The following is the command line format to apply constraints at keypoints.

    	
    	DK, KPOI, Lab, VALUE, VALUE2, KEXPND, Lab2, Lab3, Lab4, Lab5, Lab6
    	Displacement on K, K #, DOF label, value, value2, Expansion key, other DOF labels
    
    Not all of the fields are required for this example, therefore when entering the code certain fields will be empty. For example, to pin the first keypoint enter:
    	DK,1,UX,0,,,UY,UZ
    

    The DOF labels for translation motion are: UX, UY, UZ. Note that the 5th and 6th fields are empty. These correspond to 'value2' and 'the Expansion key' which are not required for this constraint. Also note that all three of the translational DOFs were constrained to 0. The DOFs can only be contrained in 1 command line if the value is the same.

    To apply the contraints to Keypoint 5, the command line code is:

    	DK,5,UY,0,,,UZ
    

    Note that only UY and UZ are contrained to 0. UX is not constrained. Again, note that the 5th and 6th fields are empty because they are not required.

  5. Apply Loads
  6. We will apply vertical downward loads of 600N at the seat post location (keypoint 3) and 200N at the pedal crank location (keypoint 4). We will use the command line to define these loading conditions.

    FK, KPOI, Lab, value, value2
    Force loads at keypoints, K #, Force Label directions (FX, FY, FZ), value1, value2 (if req'd) 
    

    To apply a force of 600N downward at keypoint 3, the code should look like this: ' FK,3,FY,-600 '

    Apply both the forces and list the forces to ensure they were inputted correctly (FKLIST).

    If you need to delete one of the forces, the code looks like this: 'FKDELE, K, Lab' (ie 'FKDELE,3,FY' would delete the force in the 'y' direction for Keypoint 3)

    The applied loads and constraints should now appear as shown below.

    [Bike Loads & Constraints]

  7. Solving the System Solution > Solve > Current LS

To begin Postprocessing, open the 'General Postproc' Menu

  1. Deformation Plot Results > Deformed Shape... 'Def + undef edge'

    [Bike Deflection]

    • You may want to try plotting this from different angles to get a better idea what's going on by using the 'Pan-Zoom-Rotate' menu that was earlier outlined.
    • Try the 'Front' view button (Note that the views of 'Front', 'Left', 'Back', etc depend on how the object was first defined).
    • Your screen should look like the plot below:

    [Bike Deflection - side view]

  2. Deflections
  3. Now let's take a look at some actual deflections in the frame. The deflections have been calculated at the nodes of the model, so the first thing we'll do is plot out the nodes and node numbers, so we know what node(s) we're after.

  4. Element Forces
  5. We could also take a look at the forces in the elements in much the same way:

  6. Stresses

    As shown in the cantilever beam example, use the Element Table to gain access to derived stresses.

    • General Postproc > Element Table > Define Table ...
    • Select 'Add'
    • Select 'Stress' and 'von Mises'
    • Element Table > Plot Elem Table

    • Again, select appropriate intervals for the contour plot

  7. Bending Moment Diagrams
  8. As shown previously, the bending moment diagram can be produced.

    Select Element Table > Define Table... to define the table (remember SMISC,6 and SMISC,12)

    And, Plot Results > Line Elem Res... to plot the data from the Element Table


The above example was solved using a mixture of the Graphical User Interface (or GUI) and the command language interface of ANSYS. This problem has also been solved using the ANSYS command language interface that you may want to browse. Open the .HTML version, copy and paste the code into Notepad or a similar text editor and save it to your computer. Now go to 'File > Read input from...' and select the file. A .PDF version is also available for printing.

To quit ANSYS, select 'QUIT' from the ANSYS Toolbar or select 'Utility Menu'/'File'/'Exit...'. In the dialog box that appears, click on 'Save Everything' (assuming that you want to) and then click on 'OK'.