Thursday, 30 December 2010

Can the ignorant stranger qualify the crown?  Now that you've added your blog, we need to make sure that you own this blog.



Introduction

This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to create and use 'paths' to provide extra detail during post processing. For example, one may want to determine the effects of stress concentrators along a certain path. Rather than plotting the entire contour plot, a plot of the stress along that path can be made.
In this tutorial, a steel plate measuring 100 mm X 200 mm X 10 mm will be used. Three holes are drilled through the vertical centerline of the plate. The plate is constrained in the y-direction at the bottom and a uniform, distributed load is pulling on the top of the plate.

 Preprocessing: Defining the Problem


  1. Give the example a Title
    • Utility Menu > File > Change Title ...
      /title, Use of Paths for Post Processing
  2. Open preprocessor menu
    • ANSYS Main Menu > Preprocessor
      /PREP7
  3. Define Rectangular Ares
    • Preprocessor > Modeling > Create > Areas > Rectangle > By 2 Corners
      BLC4,0,0,200,100
    • Create a rectangle where the bottom left corner has the coordinates 0,0 and the width and height are 200 and 100 respectively.
  4. Create Circles
    • Preprocessor > Modeling > Create > Areas > Circle > Solid Circle
      cyl4,WP X,WP Y,Radius
    • Create three circles with parameters shown below.
      CircleParameters
      WP XWP YRadius
      1505010
      21005010
      31505010
  5. Subtract the Circles
    • Preprocessor > Modeling > Operate > Booleans > Subtract > Areas
    • First, select the area to remain (ie. the rectangle) and click OK. Then, select the areas to be subtracted (ie. the circles) and click OK.
    • The remaining area should look as shown below.
  6. Define the Type of Element
    • Preprocessor > Element Type > Add/Edit/Delete...
    • For this problem we will use the PLANE2 (Solid Triangle 6node) element. This element has 2 degrees of freedom (translation along the X and Y axes).
    • In the 'Element Types' window, click 'Options...' and set 'Element behavior' to Plane strs w/thk

  7. Define Real Constants
    • Preprocessor > Real Constants... > Add...
    • In the 'Real Constants for PLANE2' window, enter a thickness of 10.

  8. Define Element Material Properties
    • Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
    • In the window that appears, enter the following geometric properties for steel:
      1. Young's modulus EX: 200000
      2. Poisson's Ratio PRXY: 0.3
  9. Define Mesh Size
    • Preprocessor > Meshing > Size Cntrls > ManualSize > Areas > All Areas...
    • For this example we will use an element edge length of 5mm.
  10. Mesh the Area
    • Preprocessor > Meshing > Mesh > Areas > Free > click 'Pick All'

Solution Phase: Assigning Loads and Solving


  1. Define Analysis Type
    • Solution > Analysis Type > New Analysis > Static
      ANTYPE,0

  2. Apply Constraints
    • Solution > Define Loads > Apply > Structural > Displacement > On Lines
    • Constrain the bottom of the area in the UY direction.

  3. Apply Loads
    • Solution > Define Loads > Apply > Structural > Pressure > On Lines
    • Apply a constant, uniform pressure of -200 on the top of the area.
    The model should now look like the figure below.


  4. Solve the System
    • Solution > Solve > Current LS
      SOLVE

Postprocessing: Viewing the Results

To see the stress distribution on the plate, you could create a normal contour plot, which would have the distribution over the entire plate. However, if the stress near the holes are of interest, you could create a path through the center of the plate and plot the stress on that path. Both cases will be plotted below on a split screen.

  1. Contour Plot

    • Utility Menu > PlotCtrls > Window Controls > Window Layout
    • Fill in the 'Window Layout' as seen below
    • General Postproc > Plot Results > Contour Plot > Nodal Solu > Stress > von MisesThe display should now look like this.

      To ensure the top plot is not erased when the second plot is created, you must make a couple of changes.
    • Utility Menu > PlotCtrls > Window Controls > Window On or Off. Turn window 1 'off'.
    • To keep window 1 visible during replots, select Utility Menu > PlotCtrls > Erase Option > Erase Between Plots and ensure there is no check-mark, meaning this function off.
    • To have the next graph plot in the bottom half of the screen, select Utility Menu > PlotCtrls > Window Controls > Window Layout and select 'Window 2 > Bottom Half > Do not replot'.

  2. Create Path

    • General PostProc > Path Operations > Define Path > By Location
    • In the window, shown below, name the path Cutline and set the 'Number of divisions' to 1000
    • Fill the next two window in with the following parameters
      Parameters
      Path Point NumberX LocY LocZ Loc
      10500
      2200500

      When the third window pops up, click 'Cancle' because we only enabled two points on the path in the previous step.

  3. Map the Stress onto the Path
    • Now the path is defined, you must choose what to map to the path, or in other words, what results should be available to the path. For this example, equivalent stress is desired.

    • General Postproc > Path Operations > Map onto Path
    • Fill the next window in as shown below [Stress > von Mises] and click OK.
    • The warning shown below will probably pop up. This is just saying that some of the 1000 points you defined earlier are not on interpolation points (special points on the elements) therefore there is no data to map. This is of little concern though, since there are plenty of points that do lie on interpolation points to produce the necessary plot, so disregard the warning.

  4. Plot the Path Data

    • General Postproc > Path Operations > Plot Path Item > On Geometry
    • Fill the window in as shown below
    The display should look like the following. Note, there will be dots on the plot showing node locations. Due to resolution restrictions, these dots are not shown here.

    This plot makes it easy to see how the stress is concentrated around the holes.

ANSYS Command Listing

finish
/clear

/title, Defining Paths
/PREP7

! create geometry

BLC4,0,0,200,100
cyl4,50,50,10
cyl4,100,50,10
cyl4,150,50,10
asba,1,all

et,1,plane2,,,3 ! Plane element
R,1,10 ! thickness of plane
mp,ex,1,200000 ! Young's Modulus
mp,prxy,1,0.3 ! Poisson's ratio

esize,5 ! mesh size
amesh,all ! area mesh

finish
/solu

! apply constraints
lsel,s,loc,y,0 ! select line for contraint application
dl,all,,UY ! constrain all DOF's on this face
allsel

! apply loads
allsel ! restore entire selection
lsel,s,loc,y,100
SFL,all,PRES,-2000/10 ! apply a pressure load on a line
allsel

solve ! solve resulting system of equations
finish

! plot results
/window,1,top ! define a window (top half of screen)
/POST1
PLNSOL,S,eqv,2,1 ! plot stress in xx direction (deformed and undeformed edge)
/window,1,off
/noerase

/window,2,bot ! define a window (bottom half of screen)
nsel,all ! define nodes to define path
nsel,s,loc,y,50 ! choose nodes half way through structure
path,cutline,2,,1000 ! define a path labeled cutline
ppath,1,,0,50 ! define endpoint nodes on path
ppath,2,,200,50
PDEF,,S,eqv,AVG ! calculate equivalent stress on path
nsel,all
PLPAGM,SEQV,200,NODE ! show graph on plot with nodes

Thursday, 9 December 2010


Download IES (Indian Engineering Services)- MECHANICAL ENGINEERING Previous Question papers from 1985 to 2008.
IES OBJECTIVE QUESTION PAPERS.
IES CONVENTIONAL QUESTION PAPERS.
click on the below links to download IES Question Papers. Download starts automatically. All files are in pdf format.

Wednesday, 8 December 2010


Friday, 3 December 2010


Introduction

This tutorial was created using ANSYS 7.0 This tutorial covers some of the methods that can be employed to change how the output to the screen looks. For instance, changing the background colour, numbering the nodes, etc.
Since the purpose of this tutorial is not to build or analysis a model, please copy the following code and paste it into the input line below the utility menu.
finish
/clear
/title, Changing Graphical Properties
/prep7

K,1,0,0
K,2,100,0
L,1,2

et,1,beam3
r,1,100,833.333,10
mp,ex,1,200000
mp,prxy,1,0.3

esize,5
lmesh,all

finish
/solu

antype,0
dk,1,all,all
fk,2,fy,-100

solve
finish
You should obtain the following screen:

Graphical Options


  1. Number the NodesUtility Menu > PlotCtrls > Numbering...The following window will appear:

    From this window you can select which items you wish to number. When you click OK, the window will disappear and your model should be numbered appropriately. However, sometimes the numbers won't show up. This could be because you had previously selected a plot of a different item. To remedy this problem, select the same item you just numbered from the Utility > Plot menu and the numbering will show up.
    For instance, select the node numbering and plot the nodes. You should get the following:

    As shown, the nodes have been numbered. You can also see some other information that ANSYS is providing. The arrows on the left and the right are the force that was applied and the resulting external reactive forces and moments. The triangles on the left are the constraints and the coordinate triad is also visible. These extra symbols may not be necessary, so the next section will show how to turn these symbols off.
  2. Symbol TogglesUtility Menu > PlotCtrls > Symbols
    This window allows the user to toggle many symbols on or off. In our case, there are no Surface or Body Loads, or Initial Conditions, so those sections won't be used. Under the Boundary conditions section, click on None to turn off all the force and reaction symbols.
    The result should be as follows:
  3. Triad ToggleUtility Menu > PlotCtrls > Window Controls > Window Options
    This window also allows the user to toggle many things on and off. In this case, it is things associated with the window background. As shown in the window, the legend or title can be turned off, etc. To turn off the triad, select Not Shown from the Location of triad drop down menu. The following output should be the result. Notice how it is much easier to see the node numbers near the origin now.
  4. Element ShapeUtility Menu > PlotCtrls > Style > Size and Shape...
    When using line elements, such as BEAM3, it is sometime difficult to visualize what the elements really look like. To aid in this process, ANSYS can display the elements shapes based on the real constant description. Click on the toggle box beside [/ESHAPE] to turn on element shapes and click OK to close the window.
    If there is no change in output, don't be alarmed. Recall we selected a plot of just the nodes, thus elements are not going to show up. Select Utility Menu > Plot > Elements. The following should appear.

    As shown, the elements are no longer just a line, but they have volume according to the real constants. To get a better 3-D view of the model, you can change the view orientation.
  5. View OrientationUtility Menu > PlotCtrls > Pan Zoom Rotate...
    This window allows the user to rotate the view, translate the view and zoom. You can also select predefined views, such as isometric or oblique. Basic rotating, translating and zooming can also be done using the mouse. This is very handy when you just want to quickly change the orientation of the model. By holding the Control button on the keyboard and holding the Left mouse button the model will translate. By holding the Control button on the keyboard and holding the Middle mouse button the model will zoom or rotate on the plane of the screen. By holding the Control button on the keyboard and holding the Right mouse button the model will rotate about all axis. Using these options, it's easy to see the elements in 3-D.
  6. Changing ContoursFirst, plot the deformation contour for the beam.General Postproc > Plot Results > Contour Plot > Nodal Solution > DOF Solution > USUM
    If the contour divisions are not appropriate, they can be changed.
    Utility Meny > PlotCtrls > Style > Contours
    Either Uniform or Non-uniform Contours can be selected. Under uniform contours, be sure to click on User specified if you are inputing your own contour divisions. Under non-uniform contours, you can create a logarithmic contour division or some similiar contour where uniform divisions don't capture the information you desire.
    If you don't like the colours of the contour, those can also be changed.
    Utility Menu > PlotCtrls > Style > Colours > Contour Colours...
    The colours for each division can be selected from the drop down menus.
  7. Changing Background ColourPerhaps you desire to use a plot for a presentation, but don't want a black background.Utility Menu > PlotCtrls > Style > Colours > Window Colours...
    Select the background colour you desire for the window you desire. Here we are only using Window 1, and we'll set the background colour to white.

    The resulting display is shown below. Notice how all the text disappeared. This is because the text colour is also white. If there is information that needs to be added, such as contour values, this can be done in other graphic editors. To save the display, select Utility Menu > PlotCtrls > Capture Image. Under the File heading, select Save As...
There are lots of other option that can be used to change the presentation of data in ANSYS, these are just a few. If you are looking for a specific option, the PlotCtrls menu is a good place to start, as is the help file.

Introduction

This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to plot Vertical Deflection vs. Length of the following beam using tables, a special type of array. By plotting this data on a curve, rather than using a contour plot, finer resolution can be achieved.
This tutorial will use a steel beam 400 mm long, with a 40 mm X 60 mm cross section as shown above. It will be rigidly constrained at one end and a -2500 N load will be applied to the other.

Preprocessing: Defining the Problem


  1. Give the example a TitleUtility Menu > File > Change Title ...
    /title, Use of Tables for Data Plots
  2. Open preprocessor menuANSYS Main Menu > Preprocessor
    /PREP7
  3. Define KeypointsPreprocessor > Modeling > Create > Keypoints > In Active CS...
    K,#,x,y,zWe are going to define 2 keypoints for this beam as given in the following table:

    KeypointCoordinates (x,y,z)
    1(0,0)
    2(400,0)
  4. Create LinesPreprocessor > Modeling > Create > Lines > Lines > In Active Coord
    L,1,2Create a line joining Keypoints 1 and 2
  5. Define the Type of Element
  6. Preprocessor > Element Type > Add/Edit/Delete...For this problem we will use the BEAM3 (Beam 2D elastic) element. This element has 3 degrees of freedom (translation along the X and Y axes, and rotation about the Z axis).
  7. Define Real Constants
  8. Preprocessor > Real Constants... > Add...In the 'Real Constants for BEAM3' window, enter the following geometric properties:
    1. Cross-sectional area AREA: 2400
    2. Area moment of inertia IZZ: 320e3
    3. Total beam height: 40
    This defines a beam with a height of 40 mm and a width of 60 mm.

  9. Define Element Material PropertiesPreprocessor > Material Props > Material Models > Structural > Linear > Elastic > IsotropicIn the window that appears, enter the following geometric properties for steel:
    1. Young's modulus EX: 200000
    2. Poisson's Ratio PRXY: 0.3
  10. Define Mesh SizePreprocessor > Meshing > Size Cntrls > ManualSize > Lines > All Lines...For this example we will use an element edge length of 20mm.
  11. Mesh the framePreprocessor > Meshing > Mesh > Lines > click 'Pick All'

Solution Phase: Assigning Loads and Solving


  1. Define Analysis Type
  2. Solution > Analysis Type > New Analysis > Static
    ANTYPE,0

  3. Apply Constraints
  4. Solution > Define Loads > Apply > Structural > Displacement > On KeypointsFix keypoint 1 (ie all DOF constrained)
  5. Apply Loads
  6. Solution > Define Loads > Apply > Structural > Force/Moment > On Keypoints
    Apply a load of -2500N on keypoint 2.
    The model should now look like the figure below.


  7. Solve the System
  8. Solution > Solve > Current LS
    SOLVE

Postprocessing: Viewing the Results

It is at this point the tables come into play. Tables, a special type of array, are basically matrices that can be used to store and process data from the analysis that was just run. This example is a simplified use of tables, but they can be used for much more. For more information type help in the command line and search for 'Array Parameters'.

  1. Number of Nodes
  2. Since we wish to plot the verticle deflection vs length of the beam, the location and verticle deflection of each node must be recorded in the table. Therefore, it is necessary to determine how many nodes exist in the model. Utility Menu > List > Nodes... > OK. For this example there are 21 nodes. Thus the table must have at least 21 rows.

  3. Create the Table

    • Utility Menu > Parameters > Array Parameters > Define/Edit > Add
    • The window seen above will pop up. Fill it out as shown [Graph > Table > 22,2,1]. Note there are 22 rows, one more than the number of nodes. The reason for this will be explained below. Click OK and then close the 'Define/Edit' window.

  4. Enter Data into Table
  5. First, the horizontal location of the nodes will be recorded

    • Utility Menu > Parameters > Get Array Data ...
    • In the window shown below, select Model Data > Nodes
    • Fill the next window in as shown below and click OK [Graph(1,1) > All > Location > X]. Naming the array parameter 'Graph(1,1)' fills in the table starting in row 1, column 1, and continues down the column.
      Next, the vertical displacement will be recorded.
    • Utility Menu > Parameters > Get Array Data ... > Results data > Nodal results
    • Fill the next window in as shown below and click OK [Graph(1,2) > All > DOF solution > UY]. Naming the array parameter 'Graph(1,2)' fills in the table starting in row 1, column 2, and continues down the column.

  6. Arrange the Data for Ploting
  7. Users familiar with the way ANSYS numbers nodes will realize that node 1 will be on the far left, as it is keypoint 1, node 2 will be on the far right (keypoint 2), and the rest of the nodes are numbered sequentially from left to right. Thus, the second row in the table contains the data for the last node. This causes problems during plotting, thus the information for the last node must be moved to the final row of the table. This is why a table with 22 rows was created, to provide room to move this data.

    • Utility Menu > Parameters > Array Parameters > Define/Edit > Edit
    • The data for the end of the beam (X-location = 400, UY = -0.833) is in row two. Cut one of the cells to be moved (right click > Copy or Ctrl+X), press the down arrow to get to the bottom of the table, and paste it into the appropriate column (right click > Paste or Ctrl+V). When both values have been moved check to ensure the two entries in row 2 are zero. Select File > Apply/Quit

  8. Plot the Data

    • Utility Menu > Plot > Array Parameters
    • The following window will pop up. Fill it in as shown, with the X-location data on the X-axis and the vertical deflection on the Y-axis.
    • To change the axis labels select Utility Menu > Plot Ctrls > Style > Graphs > Modify Axes ...
    • To see the changes to the labels, select Utility Menu > Replot
    • The plot should look like the one seen below.


      ANSYS Command Listing

      finish
      /clear

      /title, Use of Tables for Data Plots
      /prep7

      elementsize = 20
      length = 400

      et,1,beam3 ! Beam3 element
      r,1,2400,320e3,40 ! Area,I,Height
      mp,ex,1,200000 ! Youngs Modulus
      mp,prxy,1,0.3 ! Poisson's Ratio

      k,1,0,0 ! Geometry
      k,2,length,0

      l,1,2

      esize,elementsize ! Mesh size
      lmesh,all ! Mesh

      finish
      /solu

      antype,static ! Static analysis

      dk,1,all ! Constrain one end fully

      fk,2,fy,-2500 ! Apply load to other end

      solve

      finish
      /post1

      ! Note, there are 21 nodes in the mesh. For the procedure below
      ! the table must have (#nodes + 1) rows

      rows = ((length/elementsize + 1) + 1)

      *DIM,graph,TABLE,rows,2,1 ! Creat a table called "graph"
      ! 22 rows x 2 columns x 1 plane

      *vget,graph(1,1),node,all,loc,x ! Put node locations in the x direction
      ! in the first column for all nodes

      *vget,graph(1,2),node,all,u,y ! Put node deflections in the y direction
      ! in the second column

      *set,graph(2,1),0 ! Delete data in (2,1) which is for x = 400
      ! otherwise graph is not plotted properly

      *set,graph(2,2),0 ! Delete data in (2,2) which is for UY @ x = 400
      ! otherwise graph is not plotted properly

      *vget,graph(rows,1),node,2,loc,x ! Re-enter the data for x = 400, but at the end
      *vget,graph(rows,2),node,2,u,y ! of the table

      *vplot,graph(1,1),graph(1,2) ! Plot the data in the table

      /axlab,x,Length ! Change the axis labels
      /axlab,y,Vertical Deflection
      /replot

Introduction

This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to view cross sectional results (Deformation, Stress, etc.) of the following example.

Preprocessing: Defining the Problem


  1. Give example a TitleUtility Menu > File > Change Title ...
    /title, Cross-Sectional Results of a Simple Cantilever Beam
  2. Open preprocessor menuANSYS Main Menu > Preprocessor
    /PREP7
  3. Create BlockPreprocessor > Modeling > Create > Volumes > Block > By 2 Corners & Z
    BLC4,0,0,Width,Height,Length
    Where:Width:40mm
    Height:60mm
    Length:400mm
  4. Define the Type of Element
  5. Preprocessor > Element Type > Add/Edit/Delete...For this problem we will use the SOLID45 (3D Structural Solid) element. This element has 8 nodes each with 3 degrees of freedom (translation along the X, Y and Z directions).
  6. Define Element Material PropertiesPreprocessor > Material Props > Material Models > Structural > Linear > Elastic > IsotropicIn the window that appears, enter the following geometric properties for steel:
    1. Young's modulus EX: 200000
    2. Poisson's Ratio PRXY: 0.3
  7. Define Mesh SizePreprocessor > Meshing > Size Cntrls > ManualSize > Global > Size
    esize,20For this example we will use an element size of 20mm.
  8. Mesh the volumePreprocessor > Meshing > Mesh > Volumes > Free > click 'Pick All'
    vmesh,all

Solution: Assigning Loads and Solving


  1. Define Analysis Type
  2. Solution > Analysis Type > New Analysis > Static
    ANTYPE,0

  3. Apply Constraints
  4. Solution > Define Loads > Apply > Structural > Displacement > On Areas
    Fix the left hand side (should be labeled Area 1).

  5. Apply Loads
  6. Solution > Define Loads > Apply > Structural > Force/Moment > On Keypoints
    Apply a load of 2500N downward on the back right hand keypoint (Keypoint #7).

  7. Solve the System
  8. Solution > (-Solve-) Current LS
    SOLVE

Postprocessing: Viewing the Results

Now since the purpose of this tutorial is to observe results within different cross-sections of the colume, we will first outline the steps required to view a slice.

  • Offset the working plane for a cross section view (WPOFFS)
  • Select the TYPE of display for the section(/TYPE). For this example we are trying to display a section, therefore, options 1, 5, or 8 are relevant and are summarized in the table below.
    TypeDescriptionVisual Representation
    SECT or (1)Section display. Only the selected section is shown without any remaining faces or edges shown
    CAP or (5)Capped hidden diplay. This is as though you have cut off a portion of the model and the remaining model can be seen
    ZQSL or (8)QSLICE Z-buffered display. This is the same as SECT but the outline of the entire model is shown.

  • Align the cutting plane with the working plane(/CPLANE)

  1. DeflectionBefore we begin selecting cross sections, let's view deflection of the entire model.

    • Select: General Postproc > Plot Results > Contour Plot > Nodal Solu
      From this one may wish to view several cross sections through the YZ plane.
    To illustrate how to take a cross section, let's take one halfway through the beam in the YZ plane

    • First, offset the working plane to the desired position, halfway through the beam
      Select: Utility Menu > WorkPlane > Offset WP by Increments
      In the window that appears, increase Global X to 30 (Width/2) and rotate Y by +90 degrees
    • Select the type of plot and align the cutting plane with the working plane (Note that in GUI, these two steps are combined)
      Select: Utility Menu > PlotCtrls > Style > Hidden-Line OptionsFill in the window that appears as shown below to select /TYPE=ZQSL and /CPLANE=Working Plane

      As desired, you should now have the following:

      This can be repeated for any slice, however, note that the command lines required to do the same are as follows:

      WPOFFS,Width/2,0,0 ! Offset the working plane for cross-section view
      WPROTA,0,0,90 ! Rotate the working plane
      /CPLANE,1 ! Cutting plane defined to use the WP
      /TYPE,1,8
      PLNSOL,U,SUM,0,1
      Also note that to realign the working plane with the active coordinate system, simply use: WPCSYS,-1,0
  2. Equivalent StressAgain, let's view stresses within the entire model.
      First we need to realign the working plane with the active coordinate system. Select: Utility Menu > WorkPlane > Align WP with > Active Coord Sys (NOTE: To check the position of the WP, select Utility Menu > WorkPlane > Show WP Status)
      Next we need to change /TYPE to the default setting(no hidden or section operations). Select: Utility Menu > PlotCtrls > Style > Hidden Line Options... And change the 'Type of Plot' to 'Non-hidden'

    • Select: General Postproc > Plot Results > Contour Plot > Nodal Solu > Stress > von Mises
      Let's say that we want to take a closer look at the base of the beam through the XY plane. Because it is much easier, we are going to use command line:

      WPOFFS,0,0,1/16*Length ! Offset the working plane
      /CPLANE,1 ! Cutting plane defined to use the WP
      /TYPE,1,5 ! Use the capped hidden display
      PLNSOL,S,EQV,0,1
      Note that we did not need to rotate the WP because we want to look at the XY plane which is the default). Also note that we are using the capped hidden display this time.
      You should now see the following:
  3. AnimationNow, for something a little more impressive, let's show an animation of the Von Mises stress through the beam. Unfortunately, the ANSYS commands are not as user friendly as they could be... but please bear with me.

    • Select: Utility Menu > PlotCtrls > Animate > Q-Slice Contours
    • In the window that appears, just change the Item to be contoured to 'Stress' 'von Mises'
    • You will then be asked to select 3 nodes; the origin, the sweep direction, and the Y axis. In the graphics window, select the node at the origin of the coordinate system as the origin of the sweep (the sweep will start there). Next, the sweep direction is in the Z direction, so select any node in the z direction (parallel to the first node). Finally, select the node in the back, bottom left hand side corner as the Y axis.You should now see an animated version of the contour slices through the beam. For more information on how to modify the animation, type help ancut into the command line.



      ANSYS Command Listing

      FINISH  
      /CLEAR

      /Title, Cross-Sectional Results of a Simple Cantilever Beam
      /PREP7

      ! All dims in mm
      Width = 60
      Height = 40
      Length = 400

      BLC4,0,0,Width,Height,Length ! Creates a rectangle

      /ANGLE, 1 ,60.000000,YS,1 ! Rotates the display
      /REPLOT,FAST ! Fast redisplay

      ET,1,SOLID45 ! Element type

      MP,EX,1,200000 ! Young's Modulus
      MP,PRXY,1,0.3 ! Poisson's ratio

      esize,20 ! Element size
      vmesh,all ! Mesh the volume

      FINISH
      /SOLU ! Enter solution mode

      ANTYPE,0 ! Static analysis
      ASEL,S,LOC,Z,0 ! Area select at z=0
      DA,All,ALL,0 ! Constrain the area
      ASEL,ALL ! Reselect all areas

      KSEL,S,LOC,Z,Length ! Select certain keypoint
      KSEL,R,LOC,Y,Height
      KSEL,R,LOC,X,Width
      FK,All,FY,-2500 ! Force on keypoint
      KSEL,ALL ! Reselect all keypoints

      SOLVE ! Solve
      FINISH

      /POST1 ! Enter post processor

      PLNSOL,U,SUM,0,1 ! Plot deflection
      WPOFFS,Width/2,0,0 ! Offset the working plane for cross-section view
      WPROTA,0,0,90 ! Rotate working plane
      /CPLANE,1 ! Cutting plane defined to use the WP
      /TYPE,1,8 ! QSLICE display

      WPCSYS,-1,0 ! Deflines working plane location

      WPOFFS,0,0,1/16*Length ! Offset the working plane
      /CPLANE,1 ! Cutting plane defined to use the WP
      /TYPE,1,5 ! Use the capped hidden display
      PLNSOL,S,EQV,0,1 ! Plot equivalent stress

      !Animation
      ANCUT,43,0.1,5,0.05,0,0.1,7,14,2 ! Animate the slices

Introduction

This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to describe how to utilize contact elements to simulate how two beams react when they come into contact with each other.
The beams, as shown below, are 100mm long, 10mm x 10mm in cross-section, have a Young's modulus of 200 GPa, and are rigidly constrained at the outer ends. A 10KN load is applied to the center of the upper, causing it to bend and contact the lower.

Preprocessing: Defining the Problem


  1. Give example a TitleUtility Menu > File > Change Title ...
    /title, Contact Elements
  2. Open preprocessor menuANSYS Main Menu > Preprocessor
    /PREP7
  3. Define AreasPreprocessor > Modeling > Create > Area > Rectangle > By 2 Corners
    BLC4,WP X, WP Y, Width, HeightWe are going to define 2 rectangles as described in the following table:

    RectangleVariables (WP X,WP Y,Width,Height)
    1(0, 15, 100, 10)
    2(50, 0, 100, 10)
  4. Define the Type of Element
    • Preprocessor > Element Type > Add/Edit/Delete...For this problem we will use the PLANE42 (Solid, Quad 4node 42) element. This element has 2 degrees of freedom at each node (translation along the X and Y).

    • While the Element Types window is still open, click Options.... Change Element behavior K3 to Plane strs w/thk as shown below. This allows a thickness to be input for the elements.


  5. Define Real Constants
  6. Preprocessor > Real Constants... > Add...In the 'Real Constants for PLANE42' window, enter the following geometric properties:
    1. Thickness THK: 10
    This defines a beam with a thickness of 10 mm.

  7. Define Element Material PropertiesPreprocessor > Material Props > Material Models > Structural > Linear > Elastic > IsotropicIn the window that appears, enter the following geometric properties for steel:
    1. Young's modulus EX: 200000
    2. Poisson's Ratio PRXY: 0.3
  8. Define Mesh SizePreprocessor > Meshing > Size Cntrls > ManualSize > Areas > All Lines...For this example we will use an element edge length of 2mm.
  9. Mesh the framePreprocessor > Meshing > Mesh > Areas > Free > click 'Pick All'
  10. Define the Type of Contact Element
    • Preprocessor > Element Type > Add/Edit/Delete...For this problem we will use the CONTAC48 (Contact, pt-to-surf 48) element. CONTAC48 may be used to represent contact and sliding between two surfaces (or between a node and a surface) in 2-D. The element has two degrees of freedom at each node: translations in the nodal x and y directions. Contact occurs when the contact node penetrates the target line.

    • While the Element Types window is still open, click Options.... Change Contact time/load prediction K7 to Reasonabl T/L inc. This is an important step. It initiates a process during the solution calculations where the time step or load step, depending on what the user has specified in the solution controls, incremements slowly when contact is immenent. This way, one surface won't penetrate too far into the other and cause the solution to fail.

    It is important to note, CONTAC48 elements are created in the space between two surfaces prescribed by the user. This will be covered below. As the surfaces approach each other, the contact element is slowly "crushed" until it's upper node(s) lie along the same line as the lower node(s). Thus, ANSYS can calculate when the two prescribed surfaces have made contact. Other contact elements, such as CONTA175, require a target element, such as TARGE169, to function. When using contact elements in your own analyses, be sure to understand how the elements work. The ANSYS help file has plenty of useful information regarding contact elements and is worth reading.

  11. Define Real Constants for the Contact Elements
  12. Preprocessor > Real Constants... > Add...In the 'Real Constants for CONTAC48' window, enter the following properties:
    1. Normal contact stiffness KN: 200000
      CONTAC48 elements basically use a penalty approach to model contact. When one surface comes into "contact" with the other, ANSYS numerically puts a spring of stiffness KN between the two. ANSYS recommends a value between 0.01 and 100 times Young's modulus for the material. Since this "spring" is so stiff, the behaviour of the model is like the two surfaces have made contact. This KN value can greatly affect your solution, so be sure to read the help file on contact so you can recognize when your solution is not converging and why. A good rule of thumb is to start with a low value of KN and see how the solution converges (start watching the ANSYS Output Window). If there is too much penetration, you should increase KN. If it takes a lot of iterations to converge for a single substep, you should decrease KN.

    2. Target length tolerance TOLS: 10
      Real constant TOLS is used to add a small tolerance that will internally increase the length of the target. This is useful for problems when node to node contact is likely to occur, rather than node to element edge. In this situation, the contact node may repeatedly "slip" off one of the target nodes, resulting in convergence difficulties. A small value of TOLS, given in %, is usually enough to prevent such difficulties.
    The other real constants can be used to model sliding friction, tolerances, etc. Information about these other constants can be found in the help file.

  13. Define Nodes for Creating Contact ElementsUnlike the normal meshing sequence used for most elements, contact elements must be defined in a slightly different manner. Sets of nodes that are likely to come into contact must be defined and used to generate the necessary elements. ANSYS has many recommendations about which nodes to select and whether they should act as target nodes or source nodes. In this simple case, source nodes are those that will move into contact with the other surface, where as target nodes are those that are contacted. These terms are important when using the automatic contact element mesher to ensure the elements will correctly model contact between the surfaces. A strong understanding of how the elements work is important when using contact elements for your own analysis.First, the source nodes will be selected.
    • Utility Menu > Select > Entities...
      Select Areas and By Num/Pick from the pull down menus, select From Full from the radio buttons and click OK. Select the top beam and click OK. This will ensure any nodes that are selected in the next few steps will be from the upper beam. In this case, it is not too hard to ensure you select the correct nodes. However, when the geometry is complex, you may inadvertantly select a node from the wrong surface and it could cause problems during element generation.

    • Utility Menu > Select > Entities...
      Select Nodes and By Location from the pull down menus, Y coordinates and Reselect from the radio buttons and enter a value of 15 and click OK. This will select all nodes along the bottom of the upper beam.

    • Utility Menu > Select > Entities...
      Select Nodes and By Location from the pull down menus, X coordinates and Reselect from the radio buttons and enter values of 50,100. This will select the nodes above the lower beam.

    • Now if you list the selected nodes, Utility Menu > List > Nodes... you should only have the following nodes remaining.
      It is important to try and limit the number of nodes you use to create contact elements. If you have a lot of contact elements, it takes a great deal of computational time to reach a solution. In this case, the only nodes that could make contact with the lower beam are those directly above it, thus those are the only nodes we will use to create the contact elements.

    • Utility Menu > Select > Comp/Assembly > Create Component
      Enter the component name Source as shown below, and click OK. Now we can use this component, Source, as a list of nodes to be used in other functions. This can be very useful in other applications as well.
    Now select the target nodes.
    Using the same procedure as above, select the nodes on the lower beam directly under the upper beam. Be sure to reselect all nodes before starting to select others. This is done by opening the entity select menu, Utility Menu > Select > Entities..., clicking the Also Select radio button, and click the Sele All button.
    These values will be the ones you'll use.
    • Click the lower area for the area select.
    • The Y coordinate is 10
    • The X coordinates vary from 50 to 100.
    When creating the component this time, enter the name Target.
    IMPORTANT: Be sure to reselect all the nodes before continuing. This is done by opening the entity select menu, Utility Menu > Select > Entities..., clicking the Also Select radio button, and click the Sele All button.
  14. Generate Contact Elements
  15. Main Menu > Preprocessor > Modeling > Create > Elements > Elem AttributesFill the window in as shown below. This ensures ANSYS knows that you are dealing with the contact elements and the associated real constants.
    Main Menu > Preprocessor > Modeling> Create > Elements > Surf / Contact > Node to Surf
    The following window will pop up. Select the node set SOURCE from the first drop down menu (Ccomp) and TARGET from the second drop down menu (Tcomp). The rest of the selections remain unchanged.
    At this point, your model should look like the following.

    Unfortunately, the contact elements don't get plotted on the screen so it is sometimes difficult to tell they are there. If you wish, you can plot the elements (Utility Menu > Plot > Elements) and turn on element numbering (Utility Menu > PlotCtrls > Numbering > Elem/Attrib numbering > Element Type Numbers). If you zoom in on the contact areas, you can see little purple stars (Contact Nodes) and thin purple lines (Target Elements) numbered "2" which correspond to the contact elements, shown below.

    The preprocessor stage is now complete.

Solution Phase: Assigning Loads and Solving


  1. Define Analysis Type
  2. Solution > Analysis Type > New Analysis > Static
    ANTYPE,0

  3. Set Solution Controls

    • Select Solution > Analysis Type > Sol'n Control...The following image will appear:

      Ensure the following selections are made under the 'Basic' tab (as shown above)

      1. Ensure Automatic time stepping is on. Automatic time stepping allows ANSYS to determine appropriate sizes to break the load steps into. Decreasing the step size usually ensures better accuracy, however, this takes time. The Automatic Time Step feature will determine an appropriate balance. This feature also activates the ANSYS bisection feature which will allow recovery if convergence fails.
      2. Enter 100 as the number of substeps. This will set the initial substep to 1/100 th of the total load.
      3. Enter a maximum number of substeps of 1000. This stops the program if the solution does not converge after 1000 steps.
      4. Enter a minimum number of substeps of 20.
      5. Ensure all solution items are writen to a results file.
      Ensure the following selection is made under the 'Nonlinear' tab (as shown below)

      1. Ensure Maximum Number of Iterations is set to 100

      NOTE
      There are several options which have not been changed from their default values. For more information about these commands, type help followed by the command into the command line.
    These solution control values are extremely important in determining if your analysis will succeed or fail. If you have too few substeps, the contact nodes may be driven through the target elements before ANSYS "realizes" it has happened. In this case the solution will resemble that of an analysis that didn't have contact elements defined at all. Therefore it is important to choose a relatively large number of substeps initially to ensure the model is defined properly. Once everything is working, you can reduce the number of substeps to optimize the computational time. Also, if the maximum number of substeps or iterations is left too low, ANSYS may stop the analysis before it has a chance to converge to a solution. Again, leave these relatively high at first.
  4. Apply Constraints
  5. Solution > Define Loads > Apply > Structural > Displacement > On LinesFix the left end of the upper beam and the right end of the lower beam (ie all DOF constrained)
  6. Apply Loads
  7. Solution > Define Loads > Apply > Structural > Force/Moment > On NodesApply a load of -10000 in the FY direction to the center of the top surface of the upper beam. Note, this is a point load on a 2D surface. This type of loading should be avoided since it will cause a singularity. However, the displacement or stress near the load is not of interest in this analyis, thus we will use a point load for simplicity.The applied loads and constraints should now appear as shown in the figure below.


  8. Solve the System
  9. Solution > Solve > Current LS
    SOLVE

Postprocessing: Viewing the Results


  1. Open postprocessor menuANSYS Main Menu > General Postproc
    /POST1
  2. Adjust Graphical Scaling
  3. Utility Menu > PlotCtrls > Style > Displacement ScalingClick the 1.0 (true scale) radio button, then click ok. This is of huge importance! I lost many hours trying to figure out why the contact elements weren't working, when in fact it was just due to the displacement scaling to which ANSYS defaulted. If you leave the scaling as default, many times it will look like your contact nodes have gone through the target elements.
  4. Show the Stress Distribution in the BeamsGeneral Postproc > Plot Results > Contour Plot > Nodal Solu > Stress > von Mises
  5. Adjust Contour ScaleUtility Menu > PlotCtrls > Style > Contours > Non-Uniform ContoursFill in the window as follows:

    This should produce the following stress distribution plot:

    As seen in the figure, the load on the upper beam caused it to deflect and come in contact with the lower beam, producing a stress distribution in both.



    ANSYS Command Listing

    finish
    /clear

    /title,Contact Elements
    /prep7

    ! Top Beam
    X1=0
    Y1=15
    L1=100
    H1=10

    ! Bottom Beam
    X2=50
    Y2=0
    L2=100
    H2=10

    ! Create Geometry
    blc4,X1,Y1,L1,H1
    blc4,X2,Y2,L2,H2

    ! define element type

    ET,1,plane42 ! element type 1
    keyopt,1,3,3 ! plane stress w/thick
    type,1 ! activate element type 1
    R, 1, 10 ! thickness 0.01

    ! define material properties

    MP,EX, 1, 200e3 ! Young's modulus
    MP,NUXY,1, 0.3 ! Poisson's ratio

    ! meshing

    esize,2 ! set meshing size
    amesh,all ! mesh area 1

    ET,2,contac48 ! defines second element type - 2D contact elements
    keyo,2,7,1 ! contact time/load prediction
    r,2,200000,,,,10
    TYPE,2 ! activates or sets this element type
    real,2 ! activates or sets the real constants

    ! define contact nodes and elements

    ! first the contact nodes
    asel,s,area,,1 ! select top area
    nsla,s,1 ! select the nodes within this area
    nsel,r,loc,y,Y1 ! select bottom layer of nodes in this area
    nsel,r,loc,x,X2,(X2+L2/2)! select the nodes above the other beam
    cm,source,node ! call this group of nodes 'source'

    ! then the target nodes
    allsel ! relect everything
    asel,s,area,,2 ! select bottom area
    nsla,s,1 ! select nodes in this area
    nsel,r,loc,y,H2 ! select bottom layer of nodes in this area
    nsel,r,loc,x,X2,(X2+L2/2)! select the nodes above the other beam
    cm,target,node ! call this selection 'target'

    gcgen,source,target,3 ! generate contact elements between defined nodes

    finish
    /solut
    antype,0

    time,1 ! Sets time at end of run to 1 sec
    autots,on ! Auto time-stepping on
    nsubst,100,1000,20 ! Number of sub-steps
    outres,all,all ! Write all output
    neqit,100 ! Max number of iterations

    nsel,s,loc,x,X1 ! Constrain top beam
    nsel,r,loc,y,Y1,(Y1+H1)
    d,all,all
    nsel,all

    nsel,s,loc,x,(X2+L2) ! Constrain bottom beam
    nsel,r,loc,y,Y2,(Y2+H2)
    d,all,all
    nsel,all

    nsel,s,loc,x,(L1/2+X1) ! Apply load
    nsel,r,loc,y,(Y1+H1)
    f,all,fy,-10000
    nsel,all

    solve
    finish

    /post1
    /dscale,1,1
    /CVAL,1,20,40,80,160,320,640,1280,2560
    PLNSOL,S,EQV,0,1