Chapter 14 設計最佳化 Design Optimization
2/33 Contents 14.1 何謂設計最佳化 ? What is Design Optimization? 14.2ANSYS 設計最佳化 Design Optimization with ANSYS 14.3 實例 : 兩端固定樑的形狀最佳化 Example: Shape Optimization of a Fixed-ends Beam 14.4 實例 : 三角平板之最佳設計 Example: Design of a Triangular Plate 14.5 其它最佳化工具 Other Optimization Tools
3/33 第 14.1 節 何謂設計最佳化 ? What is Design Optimization?
4/ Mathematical Model
5/ Optimization Variables Design variables State variables Objective function
6/ Design Space and Design Sets Design space Design set Feasible design Optimal design Best design
7/33 第 14.2 節 ANSYS 設計最佳化 Design Optimization with ANSYS
8/ A Design Optimization Procedure Using ANSYS Organize ANSYS procedure into two files: Optimization file—describes optimization variables, and trigger the optimization runs. Analysis file—constructs, analyses, and post-processes the model.
9/ Typical Commands in an Optimization File /CLEAR! Clear model database...! Initialize design variables /INPUT,...! Execute analysis file once /OPT! Enter optimization phase OPCLEAR! Clear optimization database OPVAR,...! Declare design variables OPVAR,...! Declare state variables OPVAR,...! Declare objective function OPTYPE,...! Select optimization method OPANL,...! Specify analysis file name OPEXE! Execute optimization run OPLIST,...! Summarize the results...! Further examining results
10/ Typical Commands in an Analysis File /PREP7...! Build the model using the ! parameterized design variables FINISH /SOLUTION...! Apply loads and solve FINISH /POST1! or /POST26 *GET,...! Retrieve values for state variables *GET,...! Retrieve value for objective function... FINISH
11/ ANSYS Optimization Algorithms Two built-in algorithms in ANSYS: First order method Subproblem approximation method (Zero order method)
12/33 第 14.3 節 實例 : 兩端固定樑的形狀最佳化 Example: Shape Optimization of a Fixed-end Beam
13/ Problem Description 6 m F = 100,000 N p =15,000 N/m h b = 100 mm
14/ Modeling Consideration L 1.5 m C H1 H2 H3
15/ ANSYS Procedure Optimization File FINISH /CLEAR /TITLE, Design of Beam (SI) H1 = 0.4 H2 = 0.4 H3 = 0.4 /INPUT, BEAM, TXT /OPT OPCLR OPVAR, H1, DV, 0.1, OPVAR, H2, DV, 0.1, 0.8 OPVAR, H3, DV, 0.1, 0.8 OPVAR, SMAX, SV, -100E6, 100E6 OPVAR, SMIN, SV, -100E6, 100E6 OPVAR, TVOLUME, OBJ,,, OPTYPE, SUBP OPANL, BEAM, TXT OPEXE OPLIST, ALL PLVAROPT, TVOLUME PLVAROPT, SMAX, SMIN PLVAROPT, H1, H2, H3
16/ ANSYS Procedure Analysis File (1/2) /PREP7 ET, 1, PLANE42,,, 3 R, 1, 0.1 MP, EX, 1, 200E9 MP, NUXY, 1, 0.3 MP, DENS, 1, 7800 K, 1, 0, 0 K, 2, 1.5, 0 K, 3, 3.0, 0 K, 4, 0, -H1 K, 5, 1.5, -H2 K, 6, 3.0, -H L, 1, 2 L, 2, 3 L, 1, 4 L, 3, 6 SPLINE, 4, 5, 6,,,,,,, 1, 0, 0 A, 1, 2, 5, 4 A, 2, 3, 6, 5 ESIZE, 0.1 MSHAPE, 0, 2D MSHKEY, 1 AMESH, ALL EPLOT FINISH
17/ ANSYS Procedure Analysis File (2/2) /SOLU NSEL, S, LOC, X, 0 D, ALL, ALL NSEL, S, LOC, X, 3 DSYM, SYMM, X NSEL, S, LOC, Y, 0 SF, ALL, PRES, NSEL, R, LOC, X, 3 F, ALL, FY, NSEL, ALL ACEL,, 9.81 SOLVE FINISH /POST1 ETABLE, VOLUME, VOLU SSUM *GET,TVOLUME,SSUM,,ITEM,VOLUME ETABLE, STRESS, S, X ESORT, ETAB, STRESS *GET, SMAX, SORT,, MAX *GET, SMIN, SORT,, MIN FINISH
18/ ANSYS Procedure The Optimization Design OPLIST, ALL PLVAROPT, TVOLUME PLVAROPT, SMAX, SMIN PLVAROPT, H1, H2, H3 (FEASIBLE) SMAX (SV) E+08 SMIN (SV) E+08 H1 (DV) H2 (DV) H3 (DV) TVOLUME (OBJ) E-01
19/ ANSYS Procedure Optimization History OPLIST, ALL PLVAROPT, TVOLUME PLVAROPT, SMAX, SMIN PLVAROPT, H1, H2, H3
20/33 第 14.4 節 實例 : 三角平板之最佳設計 Example: Design of a Triangular Plate
21/ Problem Description 200 T o R = FIL INRAD 30 o Dimension: mm
22/ Modeling Consideration 1/6 model is used, due to the symmetry of the geometry and loading.
23/ ANSYS Procedure Optimization File (1/2) FINISH /CLEAR /TITLE, Optimal Design of a hexagonal plate ! UNITS: N-mm-s T1 = 30 ! Thickness FIL = 10 ! Fillet radius /INPUT, TRIPLATE, TXT /OPT OPCLR OPANL, TRIPLATE, TXT OPVAR, T1, DV, 20, 40 ! DVs: Thickness OPVAR, FIL, DV, 5, 15 ! Fillet radius OPVAR, SMAX, SV,, 150 ! SV: Max equ. Stress OPVAR, VTOT, OBJ,,, 1 ! OBJ: Total volume
24/ ANSYS Procedure Optimization File (2/2) OPKEEP, ON ! Save best design OPTYPE, SUBP OPEXE OPLIST, ALL PLVAROPT, T1, FIL PLVAROPT, SMAX PLVAROPT, VTOT FINISH ! Plot the best design /POST1 RESUME,, BDB FILE,, BRST SET PLNSOL, S, EQV
25/ ANSYS Procedure Analysis File (1/6) /PREP7 *AFUN, DEG INRAD = 200*COS(30)-20 ! Inner radius CYL4,-200,0,INRAD,-30,INRAD+T1,30 CYL4,200*COS(60),200*SIN(60),INRAD,-90,INRAD+T1,-150 CYL4,200*COS(60),200*SIN(-60),INRAD,90,INRAD+T1,150 APLOT AADD, ALL ADELE, ALL ! Delete area, keep lines LPLOT ! Fillets on inner slot LSEL,, RADIUS,, INRAD+T1 ! Select inner arcs L1 = LSNEXT(0) L2 = LSNEXT(L1) L3 = LSNEXT(L2) LFILLET, L1, L2, FIL LFILLET, L2, L3, FIL LFILLET, L3, L1, FIL LSEL, ALL LPLOT
26/ ANSYS Procedure Analysis File (2/6) ! Keep only symmetric portion WPROT,, 90 LSBW, ALL WPROT,,, 60 LSBW, ALL WPCSYS WPSTYLE CSYS, 1 LSEL, U, LOC, Y, 0, 60 LDELE, ALL,,, 1 LSEL, ALL KSLL KSEL, INVE KDELE, ALL ! Delete unnecessary keypoints KSEL, ALL LPLOT
27/ ANSYS Procedure Analysis File (3/6) ! Create missing lines and combine right edge lines KSEL,, LOC, Y, 0 K1 = KPNEXT(0) K2 = KPNEXT(K1) LSTR, K1, K2 KSEL,, LOC, Y, 60 K1 = KPNEXT(0) K2 = KPNEXT(K1) LSTR, K1, K2 ALLSEL CSYS, 0 LSEL,, LOC, X, 100 LCOMB, ALL ALLSEL LPLOT
28/ ANSYS Procedure Analysis File (4/6) ! Create the area AL, ALL APLOT ! MESHING ET, 1, PLANE82,,, 3 R, 1, 10 ! Thickness MP, EX, 1, 2.07E5 ! Young's modulus, MPa MP, NUXY, 1, 0.3 SMRTSIZE, 3 AMESH, ALL EPLOT FINISH
29/ ANSYS Procedure Analysis File (5/6) /SOLU CSYS, 1 LSEL,, LOC, Y, 0 LSEL, A, LOC, Y, 60 DL, ALL,, SYMM ! Symmetry b.c. CSYS, 0 LSEL,, LOC, X, 100 SFL, ALL, PRES, -50 ! Pressure load (MPa) ALLSEL LPLOT SOLVE FINISH
30/ ANSYS Procedure Analysis File (6/6) /POST1 PLNSOL, S, EQV /DSCALE,, OFF /EXPAND, 6, POLAR, HALF, 0, 60 /REPLOT ! Retrieve maximum equivalent stress and volume NSORT, S, EQV *GET, SMAX, SORT,, MAX ETABLE, EVOL, VOLU SSUM *GET, VTOT, SSUM,, ITEM, EVOL FINISH
31/ ANSYS Procedure The Optimum Design OPKEEP, ON ! Save best design OPTYPE, SUBP OPEXE OPLIST, ALL PLVAROPT, T1, FIL PLVAROPT, SMAX PLVAROPT, VTOT FINISH ! Plot the best design /POST1 RESUME,, BDB FILE,, BRST SET PLNSOL, S, EQV
32/ ANSYS Procedure Optimization History PLVAROPT, T1, FIL PLVAROPT, SMAX PLVAROPT, VTOT
33/ Other Optimization Tools Provided by ANSYS Single Iteration Design Tool Random Design Tool Gradient Tool Sweep Tool Factorial Tool