42
Optimizing the Design, II Chapter Five

Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

Embed Size (px)

DESCRIPTION

Training Manual January 30, 2001 Inventory # Optimizing the Design, II A. Design Optimization Methods ANSYS provides two methods, or algorithms, to optimize the design: –Subproblem approximation method –First order method A third method, user optimization, allows you incorporate your own optimization algorithm. Refer to your ANSYS Guide to User Programmable Features for details.

Citation preview

Page 1: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

Optimizing the Design, II

Chapter Five

Page 2: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-2

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Module 5Optimizing the Design, II

• In this section, we will learn more about optimizing the design. Topics covered:

A. The two methods of design optimization and how they work

B. Guidelines on choosing design variables, state variables, and the objective function

C. Work on one or two workshop exercises

Page 3: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-3

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, IIA. Design Optimization Methods

• ANSYS provides two methods, or algorithms, to optimize the design:– Subproblem approximation method– First order method

• A third method, user optimization, allows you incorporate your own optimization algorithm. Refer to your ANSYS Guide to User Programmable Features for details.

Page 4: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-4

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II...Design Optimization Methods

Sub-problem Approximation Method

• A zero-order method that requires only the values of the response variables (SVs and OBJ), not their derivatives.

• Forms an approximation of the response variables.– The objective function approximation is used to locate the

minimum. – State variable approximations are used to constrain the design.– After the approximations are used to locate the OBJ minimum in

design space, the actual OBJ and SV values are evaluated at that location. The approximations are used only to determine the next set of design variables to be tried.

Page 5: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-5

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...Subproblem Approximation Method

– A least squares fit of all available design sets is used to form the approximations:

H = approximation of objective function or state variableXn = design variable na, b, c = coefficientsN = total number of design variables

nm

N

m

N

mnmn

N

nnn

N

nnn XXcXbXaaH

1

1 11

2

10

Page 6: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-6

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...Subproblem Approximation Method

– You can control the form of the approximation using OPEQN (or Design Opt > Method/Tool > Sub-problem):• Quadratic + cross terms (default for OBJs)• Quadratic only (default for SVs)• Linear fit

nm

N

m

N

mnmn

N

nnn

N

nnn XXcXbXaaH

1

1 11

2

10

~

Linear

Quadratic

Quadratic + cross terms

Page 7: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-7

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...Subproblem Approximation Method

• Initially, N+2 design sets are needed to form the approximations (N=number of DV’s).– ANSYS will either generate random designs or use existing

designs in the optimization database.– You can improve the quality of the approximations by supplying

known “good” designs.Tip: Start with the Random or Single Loop tool (or any other tool) to generate several designs, then keep only the feasible ones or a certain number of best designs.

Page 8: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-8

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...Subproblem Approximation Method

• Subproblem approximation method is recommended for most applications because:– it uses a generalized approach.– it can usually arrive at an optimum quickly.

Page 9: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-9

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...Subproblem Approximation Method

N+2 Design Sets?

Generate a random DV set

Run the analysis file

Form new objective function and SV approximations

Apply penalty functions to enforce DV and SV limits

Locate the minimum of the penalized objective function

Compute a new set of DV’s

Run the analysis file

No YesConverged? Or terminate?

Stop

Yes

No

Run...

Page 10: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-10

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - MethodsFirst Order Method

First Order Method

• Uses derivatives of the response variables - OBJ and SV’s - to determine search direction and arrive at an optimum.

• No approximations are used, so the method is more accurate.

• Each iteration may involve several analyses (loops through the analysis file) to determine the proper search direction.

Page 11: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-11

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...First Order Method

• To choose the first order method,– Design Opt > Method/Tool...

– Or use OPTYPE and OPFRST:optype,firstopfrst,nitr,size,delta

– Default values for SIZE and DELTA are normally sufficient.

Page 12: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-12

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...First Order Method

• Convergence is said to be achieved when both these conditions are met:– Change in objective function between the current design and the

best feasible design is less than the tolerance.|OBJcurrent - OBJbest| < TOLERobj

AND– Change in objective function between the current and previous

designs is less than the tolerance.|OBJcurrent - OBJcurrent-1| < TOLERobj

Page 13: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-13

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...First Order Method

• Another requirement for convergence is that the final iteration must use a steepest descent search. Otherwise, additional iterations are performed.

Page 14: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-14

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...First Order Method

• When should you use the first order method?– When accuracy is important.– When the subproblem method is imprecise.

• First order method is not recommended when speed is essential.

Page 15: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-15

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...First Order Method

At least one design set?

Apply penalty functions to enforce DV and SV limits

Find the minimum of the penalized objective function

using the gradient of the

Compute a new set of DV’s

Run the analysis file

No Yes Stop

Yes

No

Run...

Stop

Converged? Or terminate?

Page 16: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-16

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - MethodsPenalty Functions

• Both methods use penalty functions to enforce DV and SV limits while using an unconstrained objective function.

Min Max

DV constraint

Objective Function

Penalized Objective Function (unconstrained)

Obj

DV

Page 17: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-17

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - MethodsExample

• Determine the optimum spring constants, K1 and K2, to minimize displacement under a unit sinusoidal loading. Combined stiffness of springs must be less than 1 lb/in.

1.0sin(t)

1 inch square aluminum bar20 inches long

K1 K2

Page 18: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-18

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...Example! Parametric modelk1=2 k2=2ustatic=.25/k1+.25/k2/title, Two Spring Bar Suspension/prep7et,1,3 ! 2-D beam elementr,1,1,1/12,1 ! 1-in square c.s.mp,ex,1,1e7mp,dens,1,.00025n,1n,5,20 ! 20 inches longfille,1,2*repeat,4,1,1n,11 ! Coincident nodes at

endsn,12,20et,2,14,,2 ! Spring elementr,2,k1,.01 ! k1 and light dampingr,3,k2,.01 ! k2 and light dampingtype,2real,2e,11,1 ! k1 elementreal,3e,12,5 ! k2 element

d,11,uy d,12,uyd,1,uxfinish

! Modal analysis /soluantype,modalmodopt,lanb,2solve*get,f1,mode,1,freq*get,f2,mode,2,freqfinish

! Harmonic analysis/soluantype,harmharfrq,f1-(f2-f1),f2f,2,fy,1nsubst,2solvefinish

Page 19: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-19

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...Example! Postprocessing - find peak disp./post26nsol,2,2,u,yprvar,2*get,f1r,vari,2,rset,1*get,f1i,vari,2,iset,1*get,f2r,vari,2,rset,2*get,f2i,vari,2,iset,2f1a=sqrt(f1r**2+f1i**2)f2a=sqrt(f2r**2+f2i**2)uy2max = f1a > f2a! Max is greater of two peak

amplitudesfinish

/optopvar,k1,dv,.1,4 ! DV'sopvar,k2,dv,.1,4opvar,ustatic,sv,1 ! SVopvar,uy2max,obj ! Objoptype,subp ! Subproblem methodopexe ! solveoplist,allopsel,1 ! select best

Subproblem setoptype,first ! First order

methodopexeoplist,allfinish

Page 20: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-20

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...Example

Results of subproblem method: SET 1 SET 2 SET 3 SET 4 (INFEASIBLE) (INFEASIBLE) (INFEASIBLE) (INFEASIBLE) USTATIC (SV) > 0.25000 > 0.20621 > 0.24425 > 0.21342 K1 (DV) 2.0000 3.4040 1.6132 2.1965 K2 (DV) 2.0000 1.8830 2.8002 2.5099 UY2MAX (OBJ) 0.89532 0.46320 1.1014 0.89807

SET 5 SET 6 SET 7 SET 8 (INFEASIBLE) (INFEASIBLE) (INFEASIBLE) (FEASIBLE) USTATIC (SV) > 0.89997 > 0.96523 > 0.95272 1.5368 K1 (DV) 0.64673 0.34043 0.37779 0.47718 K2 (DV) 0.48694 1.0829 0.85917 0.24682 UY2MAX (OBJ) 1.4191 2.2596 2.2291 1.4253

SET 9 SET 10 SET 11 SET 12 (INFEASIBLE) (INFEASIBLE) (FEASIBLE) (FEASIBLE) USTATIC (SV) > 0.20052 > 0.30594 1.4645 1.9934 K1 (DV) 2.0423 3.0866 1.1512 2.6945 K2 (DV) 3.2006 1.1114 0.20044 0.13154 UY2MAX (OBJ) 0.97918 0.46994 0.94436 0.66228

SET 13 SET 14 *SET 15* (INFEASIBLE) (INFEASIBLE) (FEASIBLE) USTATIC (SV) > 0.62966 > 0.71978 1.4649 K1 (DV) 2.6506 2.5772 2.6540 K2 (DV) 0.46699 0.40143 0.18239 UY2MAX (OBJ) 0.60412 0.62359 0.65771

Page 21: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-21

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Methods...Example

Results of first order method (starting from initial design): SET 1 SET 2 SET 3 SET 4 (INFEASIBLE) (FEASIBLE) (FEASIBLE) (FEASIBLE) USTATIC (SV) > 0.25000 1.0891 1.4212 1.1240 K1 (DV) 2.0000 0.45910 0.68103 0.80597 K2 (DV) 2.0000 0.45910 0.23716 0.30719 UY2MAX (OBJ) 0.89532 1.9285 1.1071 0.97347

SET 5 SET 6 SET 7 SET 8 *SET 9* (FEASIBLE) (FEASIBLE) (FEASIBLE) (FEASIBLE) (FEASIBLE) USTATIC (SV) 1.0950 2.6875 1.1057 1.0835 1.0457 K1 (DV) 0.80531 1.3333 1.4453 1.4565 1.4643 K2 (DV) 0.31866 0.10000 0.26804 0.27416 0.28574 UY2MAX (OBJ) 0.96162 0.93965 0.82697 0.82166 0.81466

Results of first order method (starting from best subproblem set): SET 15 SET 16 SET 17 *SET 18* (FEASIBLE) (FEASIBLE) (FEASIBLE) (FEASIBLE) USTATIC (SV) 1.4649 1.1869 1.1087 1.0759 K1 (DV) 2.6540 2.6826 2.6933 2.6997 K2 (DV) 0.18239 0.22858 0.24610 0.25424 UY2MAX (OBJ) 0.65771 0.64596 0.64159 0.63942

Page 22: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-22

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, IIB. Guidelines

We will present:

• General guidelines

• Guidelines for DVs

• Guidelines for SVs

• Guidelines for OBJ

Page 23: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-23

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - GuidelinesGeneral Guidelines

• Wherever possible, take advantage of symmetry. Remember that the optimizer performs multiple analyses, so the smaller the model size, the better.

• Avoid specifying density if it is not needed for the analysis. You will save the time needed to calculate the mass matrix.

Page 24: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-24

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...General Guidelines

• Make sure that the parametric model is valid for all possible values of the DVs. A sweep run with two sweeps per DV (minimum and maximum) may be a good idea.

• Save the optimization database to a “safe” file name at the end of each run. Keeping these databases will give you a wide array of potential designs that might come in handy some day.

Page 25: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-25

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...General Guidelines

• Sometimes an optimization problem may converge to a local minimum. You can check for this and possibly arrive at a global minimum by first using the Sweep tool (or some other tool) and choosing the proper starting design(s).

• See the sine wave example in your Workshop Supplement.

OBJ

DVLocal minimum Global minimum

Page 26: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-26

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - GuidelinesGuidelines for DVs

Guidelines for Design Variables

• Keep the number of design variables to a minimum: more than 20 is not recommended; fewer than 10 is preferred.

• One way is to eliminate some DVs by expressing them in terms of others. For example, eliminate R3 below by expressing it in terms of R1 and T1. Similarly R4.

R1R2

R4R3

T1T2

Page 27: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-27

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...Guidelines for DVs

• Choose DVs that permit several design configurations, but be aware of unrealistic or undesirable designs. Consider, for example, the weight optimization of a cantilever beam.

One DV, x1, will work, but it doesn’t permit a tapered or curved design.

x1

Page 28: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-28

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...Guidelines for DVs

Choosing 4 DVs x1-x4 gives more flexibility…

… but also allows local minima (unless otherwise constrained).

x1x2

x3

x4

x1

x2x3

x4

Page 29: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-29

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...Guidelines for DVs

A better idea might be to choose height increments as DVs:

x1

dx2

dx3

dx4

Page 30: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-30

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines

...Guidelines for DVs • To specify discrete DVs, such as number of ribs or holes, use

the NINT (nearest integer) function when building the model.

For example, if NRIBS represents the number of ribs, use NINT(NRIBS) to make copies of one rib, then declare NRIBS as a DV with the appropriate limits.

Page 31: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-31

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...Guidelines for DVs

• OR, you may need to use an if-then-else construct.

• For example, if shell thickness thk is a DV and only three possible thicknesses were allowed …

et,1,63 ! Shell element type*if,thk,lt,2.5/16,then thk=1/8 ! Use 1/8 if thk < 2.5/16

*elseif,thk,gt,3.5/16,then thk=1/4 ! Use 1/4 if thk > 3.5/16

*else thk=3/16 ! Otherwise use 3/16*endifr,1,thk ! Define shell thickness

Page 32: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-32

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - GuidelinesGuidelines for SVs

Guidelines for State Variables

• Be sure to use the correct data. For example:– If a minimum first natural frequency is a state variable, be sure

to retrieve the first non-zero frequency. The first frequency may be a rigid body mode.

– If the structure deflects in the -Y direction, and maximum Y deflection is a state variable, retrieve the maximum of absolute values or the minimum of real values.

Page 33: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-33

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...Guidelines for SVs

• Typical state variables such as maximum stress (or deflection or temperature or ...) may occur at a different location in each loop.– In such cases, do not choose just one maximum (or minimum)

for the entire structure. Doing so may result in poor quality approximations.

– On the other hand, choosing a maximum in every element may result in a local minimum.

– A compromise is to select a few key regions in which maximum stresses will be used as state variables.

Page 34: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-34

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

H2H1

A1

A2

A3

SMX1 SMX2 SMX3 SMX4

Optimizing the Design, II - Guidelines...Guidelines for SVs

• For example, the maximum stress in each “bay” of the truss bridge below will give better results than just one maximum stress for the entire structure.

Page 35: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-35

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...Guidelines for SVs

• If singularities exist, such as a point load or a re-entrant corner, the maximum stress will always be at that location.

Consider unselecting such regions before retrieving the maximum stress.

Page 36: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-36

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...Guidelines for SVs

• Avoid tight bounds on two-sided state variables, especially when using the Subproblem method. For example, a state variable limit of 500 to 1000 is better than 990 to 1000.

• To apply an equality constraint, such as first natural frequency = 256 Hz, use the bracketing technique:– Define freqA as an SV with upper limit of 257 Hz– Define freqB as an SV with lower limit of 255 Hz

Both freqA and freqB represent the first natural frequency, but their limits bracket the desired value.

You may need to increase the number of successive infeasible designs in this case since a frequency value <255 or >257 will make the design infeasible.

Page 37: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-37

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...Guidelines for SVs• Example: A cantilever beam to be tuned to 100 Hz natural

frequency.

! Tune Cantilever Beam Frequency to 100 Hz.a=1c=a**2-4*a+10 ! Arbitrary/prep7et,1,3r,1,1,a ! Moment of Inertia is the DVmp,dens,1,.00025 ! Aluminummp,ex,1,1e7n,1n,11,200fille,1,2d,1,allfinish/soluantyp,modalmodop,lanb,1mxpand,1solve

*get,b,mode,1,freqfinish/optopvar,a,dv,.01,10opvar,b,sv,99.9,100.0 ! Equality constraintopvar,c,obj,optype,Subp opexeoplist,allfinish

Page 38: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-38

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

SET 1 SET 2 SET 3 SET 4 (INFEASIBLE) (INFEASIBLE) (INFEASIBLE) (INFEASIBLE) B (SV) > 279.45 > 779.49 > 585.55 > 28.111 A (DV) 1.0000 8.4733 4.5773 0.10000E-01 C (OBJ) 7.0000 47.903 12.642 9.9601

SET 5 SET 6 SET 7 SET 8 (INFEASIBLE) (INFEASIBLE) (INFEASIBLE) (INFEASIBLE) B (SV) > 61.899 > 121.16 > 121.16 > 114.79 A (DV) 0.48509E-01 0.18615 0.18615 0.16707 C (OBJ) 9.8083 9.2900 9.2900 9.3596

SET 9 SET 10 (INFEASIBLE) (INFEASIBLE) B (SV) > 111.56 > 104.69 A (DV) 0.15776 0.13891 C (OBJ) 9.3938 9.4637

Optimizing the Design, II - Guidelines...Guidelines for SVs• Results: The subproblem method slowly converges to a feasible

solution...

Page 39: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-39

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...Guidelines for SVs• … whereas the first-order method finds feasible space almost

immediately.

SET 1 SET 2 SET 3 (INFEASIBLE) (FEASIBLE) (FEASIBLE) B (SV) > 279.45 99.967 99.991 A (DV) 1.0000 0.12664 0.12670 C (OBJ) 7.0000 9.5095 9.5092

Page 40: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-40

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - Guidelines...Guidelines for SVs

• If too many infeasible designs are occurring, it is probably because a state variable approximation does not adequately represent the actual SV function.

Adding cross terms to the SV approximation (OPEQN) may overcome this problem.

Or you may need to use the first order method.

Page 41: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-41

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, II - GuidelinesGuidelines for OBJ

Guidelines for the Objective Function

• Remember that ANSYS always minimizes the objective function.

To maximize an item, such as heat flow rate Q, specify 1/Q or CC-Q as the objective function (where CC is a constant larger than the highest expected value of Q).

• The OBJ should remain positive. Add a positive constant if needed to ensure this.

Page 42: Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory #001449 5-2 Module 5 Optimizing the Design, II In this section, we

January 30, 2001

Inventory #001449

5-42

DESIG

N O

PTIMIZA

TION

5.7D

ESIGN

OPTIM

IZATIO

N 5.7

Training Manual

Optimizing the Design, IIC. Workshop

• This workshop consists of the following problem:– You are given an analysis file for the weight optimization of a

ribbed tray. Specify the opt variables and review results.

• See your Design Optimization Workshop Supplement for details.