!=============================================================================== ! 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: 04.05.2012 ! 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) nofel_horizontal = 24 ! Number of Elements in horizontal direction nofel_vertical = 4 ! Number of Elements in horizontal direction !=============================================================================== !===== A. PREPROCESSOR ========================================================= !=============================================================================== /PREP7 ! Switch to the preprocessor module !=============================================================================== ! A.1 BUILD THE GEOMETRY !=============================================================================== !===== A.1.1 CRETAE KEYPOINTS ================================================== K, 1, 0.0, height/2, 0.0 ! Define keypoint 1 via its coordinates x, y, z K, 2, length, height/2, 0.0 ! Define keypoint 2 via its coordinates x, y, z K, 3, length, -height/2, 0.0 ! Define keypoint 3 via its coordinates x, y, z K, 4, 0.0, -height/2, 0.0 ! Define keypoint 4 via its coordinates x, y, z !===== A.1.2 CREATE LINES BY CONNECTING KEYPOINTS ============================== LSTR, 1, 2 ! Connect keypoints 1 and 2 to create line 1 LSTR, 2, 3 ! Connect keypoints to create a line LSTR, 3, 4 ! Connect keypoints to create a line LSTR, 4, 1 ! Connect keypoints to create a line !===== A.1.3 CREATE AREA VIA CONNECTING THE LINES ============================== AL, 1, 2, 3, 4 ! Create area 1 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, plane182 ! Define local element type 1 as PLANE182 element KEYOPT, 1, 3, 3 ! Sets for element type 1 the key option 3 to 3 ! (plane stress with thickness) !===== A.2.2 MESHING =========================================================== !--- Simple mesh size controll ! SMRTSIZE,4 ! Smart sizing, 1=fine to 10=coarse !- Better mesh size controll MSHKEY, 1 ! Mapped meshing (1) or free meshing (0) LESIZE, 1,,,nofel_horizontal ! Horizontal: Element devisions on line 1 LESIZE, 4,,,nofel_vertical ! Vertical: Element devisions on line 4 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 the beam in "real set" no. 1 !===== A.3.2 DEFINE MATERIAL PROPERTIES ======================================== MP, EX, 1, e_modul ! Define Young's modulus for material no. 1 MP, PRXY, 1, poissonzahl ! 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, NODE(0.0, 0.0, 0.0), 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) F, nodenum, FY, force ! 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