ANSYS Short Tutorial
ANSYS Short Tutorial
Xiaoming He Department of Mechanical Engineering University of Minnesota, Twin Cities xmhe@me.umn.edu Class material for short course for ANSYS (7.0) in Mechanical Engineering Department October 2003
Contents
1 General Introduction......................................................................................................................1 2 Starting ANSYS ............................................................................................................................1 3 The ANSYS Windows and File System........................................................................................1 3.1 ANSYS windows system ........................................................................................................1 3.2 ANSYS File System................................................................................................................2 4 Basic ANSYS Analysis .................................................................................................................3 4.1 Build the model .......................................................................................................................3 4.1.1 Modeling ...........................................................................................................................4 4.1.2 Meshing ............................................................................................................................5 4.2 Apply loads and obtain solution..............................................................................................7 4.2.1 Structural Analysis............................................................................................................7 4.2.2 Thermal Analysis ..............................................................................................................7 4.3 Review results .........................................................................................................................9 4.3.1 General Postprocessor.......................................................................................................9 4.3.2 Time-History Postprocessor............................................................................................11 5 ANSYS Batch Mode ...................................................................................................................12 5.1 ANSYS APDL language.......................................................................................................12 5.2 Batch files for the structural problem....................................................................................12 5.3 Batch files of the thermal problem........................................................................................13 5.4 Optimization..........................................................................................................................15 6 More on FEM Analysis using ANSYS .......................................................................................15 6.1 Mapped mesh ........................................................................................................................15 6.2 3D modeling and meshing ....................................................................................................17 6.3 Other random comments .......................................................................................................18 6.3.1 Run ANSYS in background............................................................................................18 6.3.2 Disk space and network traffic .......................................................................................19 6.3.3 Print and export image ....................................................................................................19 6.3.4 Import IGES files............................................................................................................19 7 Closures .......................................................................................................................................19 8 References ...................................................................................................................................19
ANSYS HE
1. General Introduction
ANSYS is a commercially available software package for both computer aided design (CAD) and finite element analysis (FEA) made by ANSYS Inc., Canonsburg, PA. ANSYS runs under a variety of operation system including UNIX and Windows. ANSYS is available on all MEnet Sun, SGI and Window machine. It is available on the Linux machines by remote-login only. Currently, MEnet has the Research/Faculty version of both ANSYS 6.1 and ANSYS 7.0. ANSYS can be used to analyze transient and nonlinear problems for a variety of physics including: Heat transfer Structural and solid mechanics Fluid Dynamics (laminar and turbulent) Electromagnetics (high and low frequency) Multiphysics (thermal stress, For this short class, we will focus our attention on the application of ANSYS in both thermal and structural analysis. This document is meant to be at the entry level. The material covered here is by no means comprehensive. In fact, we will only scratch the surface of ANSYSs capabilities. However, with this entry level knowledge, you will be able to improve yourself to advanced level by making use of the comprehensive ANSYS help system and of course the ANSYS website (www.ansys.com).
ANSYS HE
7. Status and Prompt Area - located at the bottom of the GUI, shows prompts and the status of your analysis. Typically, you will see prompts for functions that involve graphical picking. Be sure to read the prompt so you can pick the proper entities in the proper order. This area also contains status information (PREP7, SOLU, etc.). 8. Output Window - Receives text output from the program. It is usually positioned behind the GUI, but you can bring it to the front when necessary.
1 2 3 4
5 8
ANSYS HE
Table 1. ANSYS file types and formats File Name Jobname.LOG Jobname.ERR Jobname.OUT Jobname.DB Jobname.RST Jobname.RTH Jobname.RMG Jobname.RFL Jobname.Sn Jobname.GRPH Jobname.EMAT
File Type Log file Error file Output file Database file Results file: structural or coupled thermal magnetic FLOTRAN Load step file Graphics file Element matrices
File Format ASCII ASCII ASCII Binary Binary ASCII ASCII (special format) Binary
0.004m
0.02m
0.02m
1000N A
Fig. 2 A, Structural Example Problem: Steady state 2D plane stress problem with homogeneous force on the bottom and fixed on the top. All the other boundaries are free of constraint; B, Thermal Example Problem: transient 2D thermal problem with convective boundary on the bottom, adiabatic on the top and constant temperature on the right and left sides. The boundary at the inner circular surface is constant heat flow.
ANSYS HE
This would be a good point to save your work. Use the Toolbar menu, SAVE DB. This will save all of the pertinent information in an ANSYS database file called solid.db. Since we will use this solid model for both thermal and structural analysis we should save two copies (one for thermal and one for structural analysis) so that we can resume further analysis from this point. From the Utility Menu: File > Save As > input the filename in the popup window. Do this twice to save the files as 2dstr.db and 2dthm.db. Now, we save additional two copies of the established solid model. The entire solid modeling work is done at this point.
4.1.2 Meshing
Since meshing requires given element types and ANSYS using different element types for thermal and structural analysis, we need to do meshing for thermal and structural analysis separately. 4.1.2.1 Meshing for structural analysis To use previously constructed solid model, we need to resume from there using the Utility menu:
File> Resume From
Choose 2dstr.db from the file list and click OK. Change jobname to 2dstr as follows:
File> Change Jobname > [/FILENAME] Enter new jobname: 2dstr.
Then click OK. Now, we begin to mesh the model. Click on Preprocessor in the main menu to open the submenu tree. 1. Select element type from the preprocessor:
Element Type > Add/Edit/Delete ... > Add ... > Structural Mass > Solid > Quad 8node 82
The Element Types windows should now show PLANE82 as element type 1. This element can be used for plane stress, plane strain, and axisymmetric problems. From the Element Types Menu:
Options ... > Element behavior K3: Plane Stress
3. Define element size There are a number of ways to define the element size. Here, we use two of them: a. for the inner circle:
Meshing > Size Cntrls > ManualSize > Lines > Picked Lines >
Pick all the lines forming the inner circle, click OK, input the 10 to NDIV No. of element divisions in the Element Size on Picked Lines window. This specifies the number of element divisions for each line that forms the model.
ANSYS HE
b. for the outer frame line of the rectangle:
Meshing > Size Cntrls > ManualSize > Lines > Picked Lines >
Pick all the four outer frame line of the rectangle, click OK, input the 0.001 to SIZE Element edge length and -2 to the SPACE spacing ratio text windows in the Element Size on Picked Lines window. This specifies the element edge length and -2 is the nominal ratio of center division(s) size to end divisions size since we expect stress concentration on the edge. 4. Mesh the model using free mesh
Meshing > Mesh > Areas > Free
Select the plate area and click OK. ANSYS will mesh the model and plot the elements in the Graphics window. Your mesh ought to look something like Fig. 3. 5. Now save the meshed model using SAVE_DB in the ANSYS Toolbar for future resuming from this point. 4.1.2.2 Meshing for thermal analysis To use previously constructed solid model, we need to resume from there using the Utility menu:
File> Resume From
Choose 2dthm.db from the file list and click OK. Change jobname to 2dthm as follows:
File> Change Jobname > [/FILENAME] Enter new jobname: 2dthm.
Then click OK. Now, we begin to mesh the model. Click on Preprocessor in the main menu to open the submenu tree. 1. Select element type from the preprocessor:
Element Type > Add/Edit/Delete ... > Add ... > Thermal Mass > Solid > Quad 8node 77
The Element Types windows should now show PLANE77 as element type 1. Use the default options and click on OK. 2. Assign material properties
Material Props > Material Models > Thermal > Conductivity > Isotropic > KXX 0.5 >Specific Heat 2100 >Density 1000
For transient analysis, you also need to specify specific heat and density. For transient phase change problem, you need to specify temperature dependent enthalpy or equivalent specific heat.
Fig. 4 FE mesh for transient thermal analysis 3. Define element size There are a number of ways to define the element size. For now we will use a simple approach:
Meshing > Size Cntrls > SmartSize > Basic > LVL Size Level > 2
ANSYS HE
Be caution to use this tool. Since ANSYS does not know what you are solving for or what the boundary conditions will be, it cannot know what the best mesh is. 4. Mesh the model using free mesh
Meshing > Mesh > Areas > Free
Select the plate area and click OK. ANSYS will mesh the model and plot the elements in the Graphics window. 5. If we expect high temperature gradient surrounding the inner circle, we can refine the scheme there as follows:
Meshing > Modify Mesh > Refine at > Lines
Pick all the lines forming the inner circle, click OK, and select LEVEL Level of refinement as 2 in the Refine Mesh at Line window. Your mesh ought to look like the following Fig. 4. 5. Now save the meshed model using SAVE_DB in the ANSYS Toolbar for future resuming from this point.
Choose 2dstr.db from the file list and click OK. Change jobname to 2dstr as follows:
File>Change Jobname > [/FILENAME] Enter new jobname: 2dstr.
Then click OK. Now enter SOLUTION under main menu to apply loads and obtain solution. 1. Apply the load on the top edge:
Solution > Define Loads > Apply > Structural > Displacement > On Nodes
Select Box in the selection window and draw a box around the line defining the top of the plate. This should select all of the nodes along that line. The Apply U, ROT on Nodes menu will pop up.
Lab2 DOFs to be constrained All DOF
Again, select Box and select all of the nodes on the bottom line of the plate. The number of nodes you selected ought to be listed in the Apply F/M on Nodes menu under Count. Click OK, spawning another menu
[F] Apply Force/Moment on Nodes Lab Direction of force/mom FY VALUE Force/moment value -1000/41
Click OK. This will apply a total load of 1000N to the bottom edge of the plate (or 1000/41 per node for 41 nodes). Use default option for all other setting. The model is now complete. 3. Solve the problem
Solution > Solve > Current LS
This will spawn two new windows. Click OK in the Solve Current Load Step window and simply close the other window. This will begin the solution process. ANSYS will alert the user when the solution is done. 4 Save the analysis by click on the save symbol on the standard toolbar for resuming from this point to review results in the future
Choose 2dthm.db from the file list and click OK. Change jobname to 2dthm as follows:
File> Change Jobname > [/FILENAME] Enter new jobname: 2dthm.
ANSYS HE
Then click OK. Now enter SOLUTION under main menu to apply loads and obtain solution. 1. Specify initial conditions:
Solution > Define Loads > Apply > Initial Conditn > Define
Click on the Pick All Button, select TEMP and input 37 in the spawned window 2. Apply convective boundary condition on the bottom edge:
Solution > Define Loads > Apply > Thermal > Convection > On Lines
Pick the bottom line, click OK, and then input the values of Film coefficient (100) and bulk temperature (25) in the Apply CONV on lines window. 3. Apply the constant heat flux load on left side of the rectangle
Solution > Define Loads > Apply > Thermal > Heat Flux > On Lines
Pick the left side, click OK, and then input the values of heat flux (100) in the Apply HFLUX on lines window. 4. Apply the constant temperature loads
Solution > Define Loads > Apply > Thermal > Temperature > On Lines
Pick all the lines forming the inner circle, click OK, and then input the values of temperature (-196) in the Apply TEMP on lines window. Repeat the procedure for the boundary on the right line (note: temperature is 50) 5. Transfer the applied load from solid model to meshed model Lines and areas are solid model entities. You must transfer boundary conditions imposed on these entities to the nodes along those entities. First we select everything using the Utility menu:
Select > Everything
Use default option for all other setting. The model is now complete. 6. Solve the problem a. Set the analysis type to transient full analysis:
Solution > Analysis Type > New Analysis > Transient, click OK> Full
You can change other options like the equation solver and nonlinear option from the other tabs. Here we will use the default value. c. Set the output control
Solution > Load Step Opts > Output Ctrls > DB/Results File
In the Controls for Database and Results File Writing Window, Click on At Time Points, then Click OK. It will spawn another window, click on New array. Another window pops up: Name the array: ResTime, number of element: 11. Another window pops up: Input the following value: 1: 1, 2: 60, to 11: 600 with increase of 60s per array element. Thus, we specified ANSYS to write results at 1s and 60s, 120s, 180s, , 600s, so that we can review results at this time points. d. Set the integration control
Solution > Load Step Opts > Time/Frequenc > Time Integration > Amplitude Decay
In the popup window, set THETA Transient Integ Param 1. We use fully implicit integration method. e. Solve the problem
Solution > Solve > Current LS
ANSYS HE
This will spawn two new windows. Click OK in the Solve Current Load Step window and simply close the other window. This will begin the solution process. ANSYS will alert the user when the solution is done. 7. Save the analysis by click on the save symbol on the standard toolbar for resuming from this point to review results in the future
Choose 2dstr.db from the file list and click OK. Change jobname to 2dstr as follows:
File> Change Jobname > [/FILENAME] Enter new jobname: 2dstr.
Fig. 5 Contour plot of the von Mises equivalent stress Lets generate the contour plots of the von Mises equivalent stress:
General Postproc > Plot Results > Contour Plot > Nodal Solu > Stress > von Mises SEQV
Click OK, the following contour plot should show up as Fig. 5. You can change the output style using the Utility menus as follows:
PlotCtrls > Windows Controls Windows Options
You can generate element tables of the von Mises equivalent stress:
General Postproc > Element Table > Define Table > Add > Stress > von Mises SEQV
Then you list and plot the element table of von Mises equivalent stress:
General Postproc > Element Table > Plot Elem Table List Elem Table
You can also do some mathematical calculation using the element table and plot it using ANSYS under submenus under the Element Table menu. Sometimes, reviewing results along a certain path in the computational domain is very important. Let show how the plot von Mises stress along a path. First, we need to define the path:
General Postprocessor > Path Operations > Define Path > By Nodes
ANSYS HE
Pick two nodes: one at the right most point of the circle and one at the middle of right side of the rectangle, click OK, label it as path1, click OK. Now, we need to map the von Mises stress on the this path:
Path Operations > Map onto Path > Stress > von Mises SEQV
Fig. 7 Contour plot of temperature distribution at 300 seconds 2. Review results of 2D transient thermal analysis Similarly, for the thermal problem, we need to resume from the point we stopped:
File> Resume From
Choose 2dthm.db from the file list and click OK. Change jobname to 2dthm as follows:
10
ANSYS HE
File> Change Jobname > [/FILENAME] Enter new jobname: 2dthm.
Then click OK. Lets generate the contour plots of the temperature distribution. Since the thermal analysis is transient, we nee to specify at what time point we want the contour plot:
General Postproc > Read Results > By Time/Freq
In the new window, fill 300 in the text window corresponding to TIME Value of time or freq, click OK. Now, we can plot the contour at 300s:
General Postproc > Plot Results > Contour Plot > Nodal Solu > DOF solution >Temperature TEMP
Click OK, a contour plot like Fig. 7 should show up. Similarly, you can change the output style using the Utility menus as follows:
PlotCtrls > Windows Controls > Windows Options
Then you list and plot the element table of temperature. You can also do some mathematical calculation using the element table and plot it using ANSYS using submenus under the Element Table menu. You can also create a path and map temperature onto that path and plot the temperature along the path in x-y plot. Please do this by yourself for practice. One of the cool things ANSYS can do for you is to make a movie of your transients analysis: Stay in general postprocessor and using the following Utility menus:
PlotCtrls > Animate > Over Time > Number of animation frames 10 (click on) Time Range Range Minimum: 10, Maximum: 600
Leave all other options default, Click OK. You will see in the graphics windows the movie of the thermal contour vs. time. Thermal contour Movie
11
ANSYS HE
shown in the table. Here, I pick the node at the middle point of the bottom frame line. Repeat above procedure and pick the node at the middle point of the left frame line. It is shown in the table as TEMP_3. Now, we will plot the thermal histories of the selected two nodes. Select both variables by holding the Ctrl or Shift keyboard and clicking the two variables in the table using your mouse. Then click the both with a curve on a black background. The two thermal histories will be shown on the Graphical windows as shown in Fig. 8.
5.2 Batch files for the static structural problem This file shows how to a static analysis in batch mode.
!Jobname to use for all subsequent files /FILNAME, b2dstr /TITLE, Static structural analysis /UNITS, SI ! The SI system of units is used /PREP7 !Enter Preprocessor ! Define parameters for future use EPS=1.e-6 EXX=2.0E11 ! Young's modulus PR=0.3 ! Poisson's ratio WIDTH=0.02 ! Width of the plate HEIGHT=0.02 ! Height of the plate HALFW=WIDTH/2. ! Half width of the plate HALFH=HEIGHT/2. ! Half height of the plate RADIUS=0.002 ! Radius of the inner hole
12
ANSYS HE
ET,1,PLANE82 ! Eight-node quadrilateral element MP,EX,1,EXX ! Young's modulus for material 1 MP,PRXY,1,PR ! Poisson's ratio for material 1 ! Build the model (Bottom up) !Create keypoints for the rectangular plate K,1,-1*HALFW,-1*HALFH K,2,HALFW,-1*HALFH K,3,HALFW,HALFH K,4,-1*HALFW,HALFH !Create key points for the central hole K,5,0,0 K,6,0,-1*RADIUS K,7,RADIUS,0 K,8,0,RADIUS K,9,-1*RADIUS,0 !Create lines as sides of the rectangle L,1,2 !Line #1 L,2,3 !Line #2 L,3,4 !Line #3 L,4,1 !Line #4 !Create the inner circular arc LARC,6,7,5,RADIUS !Line #5 LARC,7,8,5,RADIUS !Line #6 LARC,8,9,5,RADIUS !Line #7 LARC,9,6,5,RADIUS !Line #8 !Create area from lines AL,1,2,3,4 AL,5,6,7,8 !Area1 !Area2 LESIZE,ALL,0.001,,,-2 LSEL,S,LINE,,5,8,1 LESIZE,ALL,,,10 TYPE,1 ! Mesh using PLANE82 elements MSHAPE,,2D ! Use mixed quad and tri elements MSHKEY,0 !Use free mesh SAVE ! Save database before meshing ASEL,ALL AMESH,ALL /TITLE,Meshed plate w/ hole EPLOT FINISH !Exit from preprocessor ! Enter solution: apply loads and obtain the solution /SOLU ANTYPE, STATIC ! Static analysis (default) /TITLE, Plane stress ! Fix all nodes on the top side ALLSEL LSEL,ALL LSEL,S,LOC,Y,HALFH-EPS,HALFH+EPS NSLL,,1 ! Nodes on this line D,ALL,ALL ! Displacement constraints ! Apply force on nodes on the bottom side LSEL,S,LOC,Y,-1*HALFH-EPS,-1*HALFH+EPS NSLL,,1 ! Nodes on this line F,ALL,FY,-1000./41. ! Force boundary SAVE ALLSEL SOLVE FINISH /EOF /EXIT, ALL ! Save database before solution ! Solve the problem
!Subtract circular area from the rectangular area ASBA,1,2,,DELETE,DELETE ! Mesh the solid model ALLSEL LSEL,S,LINE,,1,4,1
Note: All lines beginning with ! are comment lines; everything after the ! is ignored for that line. The /eof command signals the end of input. If you would like to test just a portion of your batch file, you can do so by placing an /eof anywhere in your batch file. To test a batch file from the GUI, simply type /input,file in the Input window. Note that ANSYS is very picky about the filenames you choose: filenames must be less than 9 letters. One quick way to learn ANSYS batch commands is to check the *.log files. Whenever you start a session, ANSYS logs all of the commands issued through the GUI or the Input window to that file. Consequently, if you know how to do something through the GUI, after performing the operation you can check the *.log file to find the command name and learn more about it in the Commands Manual. But beware of cutting and pasting directly from the *.log file into your batch file! The ANSYS commands generated by the GUI generally have special arguments to denote graphical picking with the mouse, arguments that are not available during batch processing.
5.3 Batch files for the transient thermal problem This file how to do a transient analysis in batch mode.
!Jobname to use for all subsequent files /FILNAME, b2dthm /TITLE,transient 2D thermal analysis /UNITS,SI ! the SI system of units is used
13
ANSYS HE
EPS=1.e-6 KMAT=0.5 ! Thermal conductivity CpMAT=2100. ! Specific Heat RouMAT=1000. ! Density WIDTH=0.02 ! Width of the plate HEIGHT=0.02 ! Height of the plate HALFW=WIDTH/2. ! Half width of the plate HALFH=HEIGHT/2. ! Half height of the plate RADIUS=.002 ! Radius of the inner hole ! Defines a array parameter *DIM,ResTime,ARRAY,11 ResTime(1)=1. *DO,i,2,11 ResTime(i)=60.*(i-1) *ENDDO ! Use do loop /PREP7 ! Enter Preprocessor ET,1,Plane77 ! Eight-node quadrilateral element MP,KXX,1,KMAT ! Thermal conductivity MP,C,1,CpMAT ! Specific Heat MP,DENS,1,RouMAT ! Density ! Build the model (Bottom up) !Create keypoints for the rectangular plate K,1,-1*HALFW,-1*HALFH K,2,HALFW,-1*HALFH K,3,HALFW,HALFH K,4,-1*HALFW,HALFH !Create keypoints for the central hole K,5,0,0 K,6,0,-1*RADIUS K,7,RADIUS,0 K,8,0,RADIUS K,9,-1*RADIUS,0 !Create lines as sides of the rectangle L,1,2 !Line #1 L,2,3 !Line #2 L,3,4 !Line #3 L,4,1 !Line #4 !Create the inner circular line LARC,6,7,5,RADIUS !Line #5 LARC,7,8,5,RADIUS !Line #6 LARC,8,9,5,RADIUS !Line #7 LARC,9,6,5,RADIUS !Line #8 !Create area from lines AL,1,2,3,4 AL,5,6,7,8 !Area1 !Area2 ASEL,ALL AMESH,ALL ALLSEL LSEL,ALL CSYS,1 LSEL,S,LOC,X,RADIUS-EPS,RADIUS+EPS CSYS,0 !Refine the mesh around the inner circle LREFINE,ALL,,,2 /TITLE,Meshed plate w/ hole EPLOT FINISH !Exit from preprocessor ! Enter solution: Apply loads and obtain the solution /SOLU ! Set solution and output control ANTYPE,TRANS,NEW TRNOPT,FULL DELTIM,0.5,0.1,10 AUTOTS,ON TIME,600 KBC,1 OUTRES,ERASE OUTRES,NSOL,%ResTime% TINTP,,,,1.0 ALLSEL NSEL,ALL IC,ALL,TEMP,37.
!Specify IC
!Adiabatic BC on the top side !Convective BC on the bottom side ALLSEL NSEL,ALL NSEL,S,LOC,Y,-1*HALFH-EPS,-1*HALFH+EPS SF,ALL,CONV,100.,25. !Constant heat flux on the left side NSEL,S,LOC,X,-1*HALFW-EPS,-1*HALFW+EPS SF,ALL,HFLUX,100. !Constant temperature on the right side NSEL,S,LOC,X,HALFW-EPS,HALFW+EPS D,ALL,TEMP,50. !Constant temperature on the circular side CSYS,1 NSEL,S,LOC,X,RADIUS-EPS,RADIUS+EPS CSYS,0 D,ALL,TEMP,-196. SAVE ! Save database before solution ALLSEL SOLVE FINISH /EOF /EXIT,ALL ! Solve the problem
!Subtract circular area from the rectangular area ASBA,1,2,,DELETE,DELETE ALLSEL !Mesh control SMRTSIZE,2 TYPE,1 ! Mesh using PLANE82 elements MSHAPE,0,2D ! Use mixed quad and tri option MSHKEY,0 ! Free mesh SAVE ! Save database before meshing
14
In the output file, you can find the value of each of the optimization variables and the objective function at the end of each iteration. Users can track the change of design variable, state variable and objective function with respect to the iteration using appropriate commands or menu system (see ANSYS help for more information). Finally, ANSYS will return the optimal values of the design variables which you can see under the Parameters menu in the Utility menu. For the plate example, RADIUS (DV) 0.13943E-02 EQVMAX (OBJ) 0.13799E+06 As with any optimization, the results are not guaranteed to be the global optimum. Furthermore, the optimum found by the search may be different depending on the starting point (initial values of the optimization variables) that you choose. Optimization is not an easy job.
15
ANSYS HE
2D The area must be bounded by either three or four lines (with or without concatenation). The area must have equal numbers of element divisions specified on opposite sides, or have divisions matching one of the transition mesh patterns (see ANSYS Help for more information). If the area is bounded by three lines, the number of element divisions must be even and equal on all sides. 3D The volume must take the shape of a brick (bounded by six areas), wedge or prism (five areas), or tetrahedron (four areas). The volume must have equal numbers of element divisions specified on opposite sides, or have divisions matching one of the transition mesh patterns for hexahedral meshes (see ANSYS help for examples of element divisions that will produce a mapped mesh for different volume shapes). The number of element divisions on triangular areas must be even if the volume is a prism or tetrahedron. Therefore, for a complex solid model, users need to split areas or volumes in their solid model in certain ways to make the mapped mesh applicable. Below is a batch file that draws the same plate with a hole. The plate is split into two areas to make mapped meshing applicable for this model. Fig. 9 shows the generated mapped mesh. You can see the mesh is well patterned for in entire domain.
16
ANSYS HE
! For the lhs box ALLSEL LSEL,ALL LSEL,S,,,2,4,1 LCCAT,ALL ! For the rhs hole ALLSEL LSEL,ALL LSEL,S,,,7,8 LCCAT,ALL ! For the lhs hole ALLSEL LSEL,ALL LSEL,S,,,9,10 LCCAT,ALL ALLSEL ESIZE,0.001 !Define element size TYPE,1 !Using PLANE82 elements MSHAPE,0,2D ! Use quad option MSHKEY,1 !Use mapped mesh SAVE ! Save database before meshing ASEL,ALL AMESH,ALL /EOF
Choose 2dstr.db from the file list and click OK. Change jobname to 2dstr as follows:
File>Change Jobname > [/FILENAME] Enter new jobname: 3dstr. Then click OK.
Enter the preprocessor by clicking the Preprocessor menu in the main menu. Now, generate 3D volume without mesh using area extrusion as follows:
Preprocessor>Modeling>Operate>Extrude>Areas>Along Normal
Pick the area, click OK, Fill 0.01 in the text window for DIST Length of extrusion, and click OK. Now, hold on Ctrl keyboard, click and hold your right mouse button and move you mouse, you will see the created 3D block with central cylindrical hole looks like Fig. 10A depending on the view angle. Furthermore, you can generate a 3D mesh of the extruded volume by doing following:
Element Type > Add/Edit/Delete ... > Add ... > Structural Mass > Solid > Brick 20node 186 Modeling>Operate>Extrude>Elem Ext Opts > [TYPE] Element type number 2 Solid 186 VAL1 No. Elem divs 10
Modeling>Operate>Extrude>Areas>Along Normal Pick the area, click OK, Fill 0.01 in the text window for DIST Length of extrusion, and click OK. Now, you will see the meshed 3D block with central hole looks like Fig. 10B depending on the view angle.
Fig. 10 Generating 3D volume with (A) or without finite element mesh from 2D area
17
ANSYS HE
Now, lets generate a 3D shaft structure using ANSYS APDL language. Before we create the shaft, we need to do the following from the Utility menu: File> Clear & Start New, click OK in the popup window Input from the Input window the following commands:
/FILNAME,shaft /Prep7 ET,1,Plane82 ET,2,Solid186 MP,EX,1,2.e11 MP,PRXY,1,0.3 K,1,-0.015,0.008 K,2,-0.015,0 K,3,0.015,0 K,4,0.015,0.005 K,5,-0.005,0.005 K,6,-0.006,0.006 K,7,-0.005,0.006 L,1,2 L,2,3 L,3,4 L,4,5 L,6,1 LARC,5,6,7,0.001 AL,1,2,3,4,5,6 ALLSEL LSEL,ALL LESIZE,ALL,0.0005 TYPE,1 MSHAPE,0,2D MSHKEY,0 ASEL,ALL AMESH,ALL TYPE,2 EXTOPT,ON EXTOPT,ESIZE,10 VROTAT,1,,,,,,2,3,270 EPLOT FINISH
This batch files tells ANSYS to generate a 2D first, mesh the 2D area, then generate the 3D shaft with mesh by rotating the 2D meshed area along one of its sides. The created shaft with mesh should looks like Fig. 11 depending on the view angle you choose. Please see ANSYS help system for more useful tools for solid modeling and meshing.
where: nice +6: UNIX command that nices the job by adding to its priority. This means that your background job will defer CPU cycles to the person logged in to the console. All background jobs must be niced according MENET policies. nohup: UNIX no hang-up command. <: Pipes the batch input file to ANSYS.
18
ANSYS HE
>: Pipes ANSYS output to ASCII output file &: Tells UNIX to execute this process in background Submitting your ANSYS job with these UNIX commands, the ANSYS job will continue to run even if you log out from the machine.
Then, running ANSYS. Otherwise, ANSYS may run very slow and your disk space quota may be overflowed since ANSYS need to run over MENET network and you only have 50MB space on MENET server. Do not forget to compress your database and results file when you decide to keep them under you home directory or other disks.
When you select To Printer option, a window with all available printers will show up. You can save it as many different image files and PostScript file if you choose the To File option.
7. Closures
Be sure trying to reduce your model using symmetry and other conditions and ignore unnecessary details in your model. It will make ANSYS solve your problems much easier and faster. You will save your time and efforts to do other fun things rather than just enjoying doing ANSYS analysis.
8. References
1. ANSYS 7.0 online help, 2003 2. Langlais T. Material for ANSYS (V5.4) short course, 1999
19