!=============================================================================== ! PROGRAM: MMSM 1 Lab No 7 (Ansys Exercise 5) ! PROJEKT: Ansys Exercise to plot prinzipal stresses and strains and ! directions of principal stresses and strains ! TASK: 2D model of a plate with hole, fixed on left side, loaded ! with a single force on right/top corner or as an ! alternative with a constant displacement uy on rigth side. ! Calculate ... ! a) intact plate ! b) plate with hole ! C) plate where the hole is filled with stiffer material ! AUTHOR: Simon ! LAST CHANGES: 2010.12.11 ! ! COMPUTER: ! OPERATING SYSTEM: ! ANSYS Version: License: Teaching Mechanics: 13.0 ! ! CALL: /input,FE-Exercise5-completed.inp ! !=============================================================================== !=== Beginning finish ! Stops all modules (preprocessor, solution, postprocessor) /clear ! Start a new analysis, delete the old database (file.db) /PLOPTS, INFO, AUTO ! Good old contour labeling style !=============================================================================== ! Parameters (lenght in mm, forces in N => stiffnesses and stresses in N/mm) !=============================================================================== Length = 500.0 ! Length (x) of plate Height = 500.0 ! Height (y) of plate Thickn = 20.0 ! Thickness of plate Diameter = 400.0 ! Diameter of the hole x_hole = 250.0 ! Verticale position of the holes center (from left) y_hole = 250.0 ! Horizontale position of the holes center (from bottom) Force = -100.000 ! Load (Force, ) Versch = -1.0 ! Displacement load (alternative to force) Young = 210000.0 ! Young's modulus of the plates material (steel) Poisson = 0.3 ! Poisson's ratio of the plates material (steel) Young2 = 10*Young ! Young's modulus of the holes material Poisson2 = Poisson ! Poisson's ratio !=============================================================================== ! A. Preprocessor (Setting up the model) !=============================================================================== /prep7 ! Switch to the preprocessor modul !=== A.1 Build the geometry by means of bottom-up method !--- Create plate k,1, 0.0, 0.0, 0.0 k,2, Length, 0.0, 0.0 k,3, Length, Height, 0.0 k,4, 0.0, Height, 0.0 lstr,1,2 ! Connect keypoints 1 and 2 to craete line 1 lstr,2,3 ! Connect keypoints to craete a line lstr,3,4 ! Connect keypoints to craete a line lstr,4,1 ! Connect keypoints to craete a line al,all ! Create area by all selected lines (1, 2, 3, 4) !--- Create circular area lsel,none ! Unselect all previous defined lines k, 5, x_hole, y_hole, 0.0 ! Create keypoint at circle center circle, 5, Diameter/2 ! Create circle lines al,all ! Create area by all selected lines allsel ! Select everything !--- Loch ausschneiden (Boolsche Operation) asba,1,2,,delete,delete ! (for b) cut out hole (2) from plate (1) and get plate with hole (3) !asba,1,2,,delete,keep ! (for c) ... delete orig. plate, keep circular area (2) /pnum,area,1 ! Switch numbering of lines on aplot ! Plot areas !=== A.2 Meshing !--- Assign the element type et,1,plane42 ! Define the local element type 1 as a PLANE42 element keyopt,1,3,3 ! Sets key option 3 (of elem type 1) to 3 (plane stress with thickn) smrtsize, 4 ! Globale Netzfeinheit 1(fein)..10(grob) !--- Generating Subset of Elements belonging to 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 !amesh, 1 ! (for a) Meshing areas with this number amesh, 3 !(for b and c) Meshing areas with this number !--- Generating Subset of Elements belonging to Material No. 2 type,1 ! FE type of subseq. generated elements mat,2 ! Material number of subseq. generated elements real,1 ! Real set number of subseq. generated elements !amesh, 2 ! (for c) Meshing (all sel.) areas (= area number 1) /pnum,mat,1 ! Switch numbering/color of material type on /number,1 ! Numbering by colors only eplot ! Plot elements !=== A.3 Material Properties !--- Define real constants r,1,Thickn ! Define thickness of the beam into real set number 1 !--- Define material properties for mat type 1 mp,ex,1,Young ! Define Young's modulus for material No 1 mp,prxy,1,Poisson ! Define Poisson's ratio for material No 1 !--- Define material properties for mat type 2 mp,ex,2,Young2 ! Define Young's modulus mp,prxy,2,Poisson2 ! Define Poisson's ratio !=== A.4 Apply Load and Boundary Conditions !--- Displacement boundary conditions nsel,s,loc,x,0.0 ! Select all nodes at x = 0 (left side) d,all,ux,0.0 ! Set displacement ux to zero for selected nodes d,all,uy,0.0 ! Set displacement uy to zero for selected nodes allsel ! Select all entities !--- Applying the load as a single force !nn = node(Length,Height,0.0) ! Get node number at location x, y, z (bottom right corner) !f,nn,fy,Force ! Apply load at node with number nn !--- 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 zero for selected nodes d,all,uy,Versch ! Set displacement uy to zero 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 !=== Contour plots /title,Hauptspannungen plesol, s, 1 plesol, s, 3 !=== Vector plots /number,0 ! Swich back to normal coloring /title,Hauptsp.-Richtungen /vscale,,1.0,0 plvect, s, , , , RASTER, ELEM, ON, 1