!=============================================================================== ! 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-III.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 ! ... Aufgabenteil IV und V !radius = 75.0 ! radius of the hole !x_hole = length/4 ! vertical position of the center (from left) !y_hole = 325.0 ! 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) ! ... Aufgabenteil IV j. e_modul2 = 10*e_modul ! Young's modulus of the holes material p_ratio2 = p_ratio ! Poisson's ratio !=============================================================================== !===== 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, length/4, height/4, 0.0 K,5, length/4, height , 0.0 K,6, 0.0 , height , 0.0 !===== A.1.2 CREATE AREA VIA CONNECTING KEYPOINTS ============================== /PREP7 ! A,1,2,3,4,5,6 ! Create area by keypoints 1, 2, 3, 4, 5, 6 !===== A.1.3 CREATE CIRCULAR AREA ============================================== ! ... Aufgabenteil IV und V !LSEL,NONE !K, 7, x_hole, y_hole, 0.0 ! Create keypoint at circle center !CIRCLE, 7, radius ! Create circle lines !AL,ALL !ALLSEL !===== A.1.4 CUT HOLE (BOOLEAN OPERATION) ====================================== ! ... Aufgabenteil IV und V ! ... ! i) cut out hole (area 2) from plate (area 1) ! ! and get plate with hole (are 3) ! ... ! j) intersect hole (area 2) with plate (area 1), ! ! keep plate (area 1) and get half hole (are 3) ! ... ! j) cut out hole (area 3) from plate (area 1) ! ! and keep half hole (are 2) !===== 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, 1 ! Mesh area 3 -> elements of material no. 1 !===== A.2.4 GENERATE SUBSET OF ELEMENTS OF MATERIAL NO. 2 ===================== ! ... Aufgabenteil IV j. !===== A.2.5 MESHING MATERIAL NO. 2 ============================================ ! ... Aufgabenteil IV j. !===== 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.3.3 DEFINE MATERIAL PROPERTIES OF MATERIAL NO. 2 ====================== ! ... Aufgabenteil IV j. !=============================================================================== ! 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 !===== Applying the load as a displacement !NSEL, S, LOC, X, length ! Select all nodes at x = Length (right side) !D, ALL, UX, 0.0 ! Set displacement ux to 0 for selected nodes !D, ALL, UY, displ ! Set displacement uy to displ for selected nodes !ALLSEL ! Select all entities !=============================================================================== !===== 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, 50.0 ! Switch off auto scaling of deformed shape !===== C.0.2 CONTOUR PLOT DISPLACEMENT ========================================= /TITLE,Displacement: u_y in mm (nofElem = %nofElem%) PLNSOL, U, Y, 2 !===== C.0.3 CONTOUR PLOT PRINCIPAL STRESS ===================================== !/TITLE, Hauptspannungen PLESOL,S,1 PLESOL,S,3 !===== C.0.4 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