!=============================================================================== ! ANSYS CLASSIC EXERCISE "Introduction to APDL" !=============================================================================== ! PROGRAM: blatt8 ! AUTHOR: Wieland, Simon ! LAST CHANGES: 2011-06-30 ! ! COMPUTER: zeus.rz.uni-ulm.de ! ANSYS Version: License: Academic Teaching Advanced, Version: 13.0 ! ! CALL: /input,blatt8.inp ! !=============================================================================== FINISH ! Stops all modules (preprocessor, solution, postprocessor) /CLEAR ! Clears an existing database to start a new analysis !=============================================================================== ! Parameters (lenght in m, forces in N) !=============================================================================== Length = 82.00e-3 ! length of the full beam Height = 2.10e-3 ! height of the full beam Width = 20.00e-3 ! width of the full beam YoungsModulus = 2.10e+11 ! Youngs Modulus of the beam\u2019s material (steel) PoissonsRatio = 0.3 ! Poisson Ratio of the beam\u2019s material (steel) Density = 7850 ! Density of the beam\u2019s material (steel) !! Aufgabe 6.f: To create Hole ! LambdaL = 0.2 ! LambdaH = 0.4 !! Better mesh size controll NofElHori = 30 NofElVert = 5 !=============================================================================== ! A. Preprocessor (Setting up the model) !=============================================================================== /PREP7 ! Switch to the preprocessor module ! ------------------------------------------------------------------------------ ! A.1 Build the geometry: bottom-up method ! ------------------------------------------------------------------------------ ! --- A.1.1 Create keypoints K, 1, 0 , 0 , 0 ! Define keypoint 1 via its coordinates x, y, z K, 2, 0 , Height, 0 ! Define keypoint 2 via its coordinates x, y, z K, 3, Length, Height, 0 ! Define keypoint 3 via its coordinates x, y, z K, 4, Length, 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 ! --- Aufgabe 6.f: Create Hole in the Area ! --- Create rectangular area ! LSEL,none ! Unselect all previously defined lines ! K, 5, LambdaL*Length/2 , LambdaH*Height , 0 ! K, 6, LambdaL*Length/2 , (1-LambdaH)*Height, 0 ! K, 7, (1-LambdaL)*Length/2, (1-LambdaH)*Height, 0 ! K, 8, (1-LambdaL)*Length/2, LambdaH*Height , 0 ! LSTR, 5, 6 ! LSTR, 6, 7 ! LSTR, 7, 8 ! LSTR, 8, 5 ! AL, 5, 6, 7, 8 ! allsel !--- Cut hole (Boolean Operation) ! ASBA,1,2,,delete,delete ! --- 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 KEYOPT, 1, 3, 3 ! Sets key option 3 (of elem type 1) to 3 ! (plane stress with thickness) ! --- A.2.2 Mesh Size Control SMRTSIZE,4 ! Simple mesh size controll "Smart sizing" !! Better mesh size controll ! MSHKEY, 1 ! Mapped meshing (1) (not free meshing (0)) ! LESIZE, 1,,, NofElVert ! Horizontal. Element devisions on line ! LESIZE, 4,,, NofElHori ! Vertical. Element devisions on line ! --- A.2.3 Meshing 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, YoungsModulus ! Define youngsMod's modulus for material no. 1 MP, prxy, 1, PoissonsRatio ! Define poissonsRatio's ratio for material no. 1 MP, dens, 1, Density ! Define density for material no. 1 ! ------------------------------------------------------------------------------ ! A.4 Apply Load and Boundary Conditions ! ------------------------------------------------------------------------------ ! --- A.4.1 Displacement boundary conditions !! Left Boundary 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 all selected nodes D, all, uy, 0.0 ! Set displacement uy to zero for all selected nodes !! Right Boundary NSEL, s, loc, x, Length ! Select all nodes at x = 0 (right side) D, all, ux, 0.0 ! Set displacement ux to zero for all selected nodes D, all, uy, 0.0 ! Set displacement uy to zero for all selected nodes ! --- Aufgabe 6.e: New Boundary Conditions ! DK, 1, ux, 0.0 ! DK, 1, uy, 0.0 ! DK, 4, ux, 0.0 ! DK, 4, uy, 0.0 allsel ! Re-select all entities FINISH ! Stops all modules (preprocessor, solution, postprocessor) !=============================================================================== !B. Solution !=============================================================================== /solu ! Switch to the solution module ! ------------------------------------------------------------------------------ ! B.1 Basic settings ! ------------------------------------------------------------------------------ antype, 2 ! Select the static analysis type 2: Modal Analysis ! --- B.1.1 Modal Analysis Settings MODOPT,SUBSP,12 ! Mode Extraction Method: Subspace, 12 modes EQSLV,FRONT ! Frontal solver MXPAND,12 ! Expand 12 modes ! ------------------------------------------------------------------------------ ! B.2 start the calculation ! ------------------------------------------------------------------------------ solve ! Solve current load step FINISH ! Stops all modules (preprocessor, solution, postprocessor) !=============================================================================== !C. Postprocessor !=============================================================================== /post1 ! Switch to the postprocessor module ! --- C.0.1 Print Frequencies SET,list ! List solutions ! --- C.0.2 Display and Animate Mode Shapes SET, first ! First mode PLDISP ! Display first mode shape ANMODE,20,0.05,,0 ! Animate first mode, 20 frames, 0.05sec time delay !SET, next ! Second mode !PLDISP ! Display second mode shape !ANMODE,20,0.05,,0 ! Animate second mode ! ...