!=============================================================================== ! ANSYS CLASSIC !=============================================================================== ! PROJEKT: MMSM 1 (B. Wieland, U. Simon, www.uni-ulm.de/uzwr) ! UEBUNG 06 "Hauptspannungs- und Dehnungs-Richtungen" ! PROGRAM: blatt6.inp ! DATE: 02.12.2011 ! AUTHORS: B. Wieland, U. Simon ! TASK: 2D model of an L-shape, fixed on top side, loaded ! with a single force on right/bottom corner or as an ! alternative with a constant displacement UY on rigth side. ! Calculate ... ! a) L-shpae ! b) L-shpae with hole ! C) L-shpae where the hole is filled with stiffer material ! ! COMPUTER: zeus.rz.uni-ulm.de ! ANSYS Version: License: Academic Teaching Advanced, Version: 13.0 ! ! CALL: /input,blatt6-V.inp !=============================================================================== !=============================================================================== ! BEGINNING !=============================================================================== FINISH ! Stops all modules (preprocessor, solution, postprocessor) /CLEAR ! Clears an existing database to start a new analysis /PLOPTS,INFO,AUTO ! Good old contour labeling style !=============================================================================== ! PARAMETER AND CONSTANTS ! lengths in mm ! forces in N ! stiffnesses in N/mm = MPa ! stresses in N/mm = MPa !=============================================================================== length = 600.0 ! length (x) of the L-shape height = 500.0 ! height (y) of the L-shape thickn = 20.0 ! thickness (z) of the L-shape radius = 81.0 ! radius of the hole x_hole = length/4+0.7*radius ! vertical position of the center (from left) y_hole = height/4+0.78*radius ! horizontal position of the center (from bottom) force = -5000.0 ! load (force) displ = -0.8 ! load (displacement) (alternative to force) e_modul = 210000.0 ! Young's modulus of the material (steel) p_ratio = 0.3 ! Poisson's ratio of the material (steel) !=============================================================================== !===== A. Preprocessor (Setting up the model) ================================== !=============================================================================== /PREP7 ! Switch to the preprocessor module !=============================================================================== ! A.1 BUILD THE GEOMETRY !=============================================================================== !===== A.1.1 CRETAE KEYPOINTS ================================================== K,1, 0.0 , 0.0 , 0.0 K,2, length , 0.0 , 0.0 K,3, length , height/4 , 0.0 K,4, x_hole+50 , y_hole-radius-3.5, 0.0 K,5, x_hole , y_hole-radius , 0.0 K,6, x_hole , y_hole , 0.0 K,7, x_hole-radius , y_hole , 0.0 K,8, x_hole-radius-3.5, y_hole+50 , 0.0 K,9, length/4 , height , 0.0 K,10, 0.0 , height , 0.0 !===== A.1.2 CREATE AREA VIA CONNECTING KEYPOINTS ============================== /PREP7 ! A,1,2,3,4,5,6,7,8,9,10 ! Create area by keypoints 1, 2, 3, 4, 5, 6 !===== A.1.3 CREATE CIRCULAR AREA ============================================== LSEL,NONE K, 101, x_hole, y_hole, 0.0 ! Create keypoint at circle center CIRCLE, 101, radius ! Create circle lines AL,ALL ALLSEL !===== A.1.4 CUT HOLE (BOOLEAN OPERATION) ====================================== ASBA,1,2,,DELETE,DELETE ! i) cut out hole (area 2) from plate (area 1) ! and get plate with hole (are 3) !===== A.1.5 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 /PBC,U,,1 ! Plot displacement BC symbol /PBC,F,,2 ! Plot force symbol with value 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 PLANE42 element KEYOPT, 1, 3, 3 ! Sets for element type 1 the key option 3 to 3 ! (plane stress with thickness) !===== A.2.2 GENERATE SUBSET OF ELEMENTS OF MATERIAL NO. 1 ===================== TYPE,1 ! FE type of subseq. generated elements MAT,1 ! Material number of subseq. generated elements REAL,1 ! Real set number of subseq. generated elements !===== A.2.3 MESHING MATERIAL NO. 1 ============================================ SMRTSIZE, 3 ! Globale Netzfeinheit 1(fein)..10(grob) AMESH, 3 ! Mesh area 3 -> elements of material no. 1 !===== A.2.6 VISUALIZATION OF THE CREATED ELEMENTS ============================= /PNUM,MAT,1 ! Switch numbering/color of material type on EPLOT ! Plot elements !=============================================================================== ! A.3 MATERIAL PROPERTIES !=============================================================================== !===== A.3.1 DEFINE REAL CONSTANTS ============================================= R, 1, thickn ! thicknessess of the beam in "real set" no. 1 !===== A.3.3 DEFINE MATERIAL PROPERTIES OF MATERIAL NO. 1 ====================== MP, EX, 1, e_modul ! Define Young's modulus for material no. 1 MP, PRXY, 1, p_ratio ! Define Poisson's Ratio for material no. 1 !=============================================================================== ! A.4 APPLY LOAD AND BOUNDARY CONDITIONS !=============================================================================== !===== A.4.1 DISPLACEMENT BOUNDARY CONDITION =================================== NSEL, S, LOC, Y, height ! Select all nodes at top 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 !===== A.4.2 APPLYING THE LOADS ================================================ !===== Applying the load as a single force nodenum = NODE(length,0.0,0.0) ! Get node number at bottom right corner F, nodenum, FY, force ! Apply load at node with number nodenumber !=============================================================================== !===== 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 PLOT CONTROLS ===================================================== /PBC,U,,1 ! Plot displacement BC symbol /PBC,F,,2 ! Plot force symbol with value /DSCALE, 1, 1.0 ! Switch off auto scaling of deformed shape !===== C.0.2 VECTOR PLOT PRINCIPAL STRESS ====================================== /NUMBER,0 ! Swich back to normal coloring /TITLE, Hauptspannungs-Richtungen /VSCALE, ALL, 1.0, 0 PLVECT, S,,,,RAST,ELEM,OFF,1 !===== C.0.3 CONTOUR PLOT EQUIVALENT STRESS ==================================== PLESOL,S,EQV