!=============================================================================== ! ANSYS CLASSIC !=============================================================================== ! PROJEKT: MOSI 2 (B. Wieland, U. Simon, K. Becker-Steinberger ! www.uni-ulm.de/uzwr) ! UEBUNG 02 "3-Punkt Biegung, APDL Skripts in ANSYS Classical" ! PROGRAM: blatt2.inp ! DATE: 2012-04-05 ! AUTHORS: B. Wieland, U. Simon, K. Becker-Steinberger ! ! COMPUTER: zeus.rz.uni-ulm.de ! ANSYS Version: License: Academic Teaching Advanced, Version: 13.0 ! ! CALL: /input,blatt2.inp !=============================================================================== !=============================================================================== ! BEGINNING !=============================================================================== FINISH ! Stops all modules (preprocessor, solution, postprocessor) /CLEAR ! Clears an existing database to start a new analysis !=============================================================================== ! PARAMETER AND CONSTANTS ! lengths in mm ! forces in N ! stiffnesses in N/mm = MPa ! stresses in N/mm = MPa !=============================================================================== length = 1000.0 ! length of the full beam height = 60.0 ! height of the beam width = 20.0 ! thickness of the beam force = 2500.0 ! force acting on full beam e_modul = 210000.0 ! Young's Modulus of the beam's material (steel) poissonzahl = 0.3 ! Poisson's Ratio of the beam's material (steel) !=============================================================================== !===== A. PREPROCESSOR ========================================================= !=============================================================================== /PREP7 ! Switch to the preprocessor module !=============================================================================== ! A.1 BUILD THE GEOMETRY !=============================================================================== !===== A.1.1 CRETAE KEYPOINTS ================================================== ! Define keypoint 1 via its coordinates x, y, z ! Define keypoint 2 via its coordinates x, y, z ! Define keypoint 3 via its coordinates x, y, z ! Define keypoint 4 via its coordinates x, y, z !===== A.1.2 CREATE LINES BY CONNECTING KEYPOINTS ============================== ! Connect keypoints 1 and 2 to create line 1 ! Connect keypoints to create a line ! Connect keypoints to create a line ! Connect keypoints to create a line !===== A.1.3 CREATE AREA VIA CONNECTING THE LINES ============================== ! Create area by lines 1, 2, 3, 4 !===== A.1.4 VISUALIZATION OF THE CREATED ELEMENTS ============================= /PNUM, KP, 1 ! Switch numbering of keypoints on /PNUM, LINE, 1 ! Switch numbering of lines on /PNUM, AREA, 1 ! Switch numbering of areas on KPLOT ! Plot keypoints LPLOT ! Plot lines APLOT ! Plot areas !=============================================================================== ! A.2 MESHING !=============================================================================== !===== A.2.1 ASSIGN THE ELEMENT TYPE =========================================== ET, 1, plane42 ! Define local element type 1 as PLANE42 element ! Sets for element type No1 the key option 3 ... ! ... to plane stress with thickness !===== A.2.2 MESHING =========================================================== ! Smart sizing, 1=fine to 10=coarse AMESH, 1 ! Mesh area number 1 EPLOT ! Plot elements !=============================================================================== ! A.3 MATERIAL PROPERTIES !=============================================================================== !===== A.3.1 DEFINE REAL CONSTANTS ============================================= R, 1, width ! Set thicknessess of beam in "real set" no. 1 !===== A.3.2 DEFINE MATERIAL PROPERTIES ======================================== ! Define Young's modulus for material no. 1 ! Define Poisson's Ratio for material no. 1 !=============================================================================== ! A.4 APPLY LOAD AND BOUNDARY CONDITIONS !=============================================================================== !===== A.4.1 DISPLACEMENT BOUNDARY CONDITION =================================== NSEL, S, LOC, X, 0.0 ! Select all nodes at x = 0 (left side) D, ALL, UX, 0.0 ! Set displacement ux to 0 for selected nodes D, ALL, UY, 0.0 ! Set displacement uy to 0 for selected nodes ALLSEL ! Re-select all entities !===== A.4.2 APPLYING THE LOADS ================================================ !- Get node number of node at location x, y, z (lower right corner) nodenum = NODE(length, 0.0, 0.0) ! Apply load on node "nodenum" !=============================================================================== !===== B. Solution ============================================================= !=============================================================================== /SOLU ! Switch to the solution module ANTYPE, 0 ! Select the static analysis type SOLVE ! Solve current load step !=============================================================================== !===== C. Postprocessor ======================================================== !=============================================================================== /POST1 ! Switch to the postprocessor module !===== C.0.1 CONTOUR PLOT DISPLACEMENT ========================================= /DSCALE, 1, 1.0 ! Switch off auto scaling of deformed shape /TITLE,Displacement: u_y in mm ! Define a caption on the plot PLNSOL, U, Y, 2 ! Contour plot of vertical displacements !===== C.0.2 CONTOUR PL0T NORMAL STRESS IN X-DIRECTION ========================= /TITLE,Normal stress in x-direction: sigma_xx in MPa PLESOL, S, X, 2 ! Plot the deformed shape with normal stress in x