!=============================================================================== ! 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,blatt7_3d.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 delta = 4e-3 e_modul = 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) !=============================================================================== ! A. Preprocessor (Setting up the model) !=============================================================================== /PREP7 ! Switch to the preprocessor module ! ------------------------------------------------------------------------------ ! A.1 Build the geometry: bottom-up method ! ------------------------------------------------------------------------------ RECTNG, 0.0, length, 0.0, height ! AUFGABENTEIL 3)h) !RECTNG, length/2-delta,length/2+delta,0.0, height/10 !ASBA,1,2,,DELETE,DELETE ALLSEL /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 TYPE,1 ! FE type of subseq. generated elements MAT,1 ! Material number of subseq. generated elements KEYOPT, 1, 3, 3 ! Sets key option 3 (of elem type 1) to 3 ! (plane stress with thickness) ! --- A.2.2 Easy Mesh Size Control MSHKEY,0 SMRTSIZE,4 ! mesh size conrol: 1=fine, 10=coarse ! --- A.2.3 Improved Mesh Size Control ! MSHKEY, 1 ! Mapped meshing (1) (not free meshing (0)) ! LESIZE, 1,,, 50 ! Horizontal. Element devisions on line ! LESIZE, 4,,, 5 ! Vertical. Element devisions on line ! --- A.2.4 Meshing AMESH, ALL ! 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 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 ! ------------------------------------------------------------------------------ ! Left Boundary NSEL, S, LOC, X, 0.0 ! Select all nodes at x = 0 (left side) NSEL, R, LOC, Y, 0.0 ! Select all nodes at x = 0 (left side) D, ALL, ALL, 0.0 ! Set displacement ux to zero for all selected nodes ! Right Boundary NSEL, S, LOC, X, length ! Select all nodes at x = 0 (right side) NSEL, R, LOC, Y, 0.0 ! Select all nodes at x = 0 (left side) D, ALL, UY, 0.0 ! Set displacement uy to zero for all selected nodes 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 MODOPT,SUBSP,12 ! Mode Extraction Method: Subspace, 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 ! ...