**ME 465**

**ME 465**

**Lab 6: Discrete and Dependent Variables**

机械作业代写 Providetwo (2) examples of using discrete variables (not discretized continuous variables) in real engineering applications.

**Goals**

**Goals**The primary goal of this exercise is to learn how to use discrete and dependent variables in an optimization problem.

*Tasks 机械工程代写*

*Tasks 机械工程代写*

Perform an optimization study as described in Exercise 6 of the HEEDS Training Guide (below).

*Turn In 机械工程代写*

*Turn In 机械工程代写*

Your assignment should be typed. Use a 12 pt font and 1 inch margins. On the first page, include the pledge in the form below:

Pledge: I have neither given nor received any unauthorized assistance on this lab assignment.

Based on this lab exercise, answer the following questions in short answer format.

a.Whatdo the results of this optimization study imply about the selection of golf equipment (e.g., club and ball hardness) for this particular hole?

Hint: What club selection and smash factor values are most common for the best designs (shots)? 机械工程代写

b.What is the approximate cost (distance penalty) of choosing the wrongclub?

Hints: Compare the DistanceToHole of designs that don’t use the optimal club choice to those that do. Compare groups of designs (shots) to arrive at your conclusions.

c.Consider a structural optimization problem. If sheet metal is available in only specific thicknesses, how should you represent a thickness variable (bespecific)?

d.What are some advantages of using a discretized representation of acontinuous variable?

e.Providetwo (2) examples of using discrete variables (not discretized continuous variables) in real engineering applications. Describe each one briefly.

f.Provide two (2) examples of using dependent variables in real engineering applications. Describe each one briefly.

**Exercise ****6: ****Dependent ****and ****Discrete ****Variables 机械工程代写**

In this exercise, we will optimize an unconstrained golf problem that contains dependent and discrete variables. The details of this problem are described below.

The initial speed of the golf ball when it leaves the club face depends not only on the speed of the club head, but also on the hardness of the ball relative to the hardness of the club face. In general, the harder the ball relative to the club face hardness, the greater the initial speed of the ball for a given club head speed. This increase in ball speed due to the club and ball properties is referred to here as the *smash** **factor*.

#### The smash factor can be considered an amplification of the club-head velocity to the ball velocity. The relationship is:

Tee Ball Speed = (Club Head Speed) * (Smash Factor)

In the current study, we will treat Club Head Speed and Smash Factor as independent variables to be determined by HEEDS MDO. But SwingSim expects an input value for Tee Ball Speed. So we will define Tee Ball Speed as a dependent variable according to the above formula. The value for Tee Ball Speed will then be calculated by HEEDS prior to each evaluation, according to the new values of Club Head Speed and Smash Factor for that evaluation. 机械工程代写

Golfers carry several different golf clubs in their bag. Since each club has a different club face angle (or angle of attack), one way to control the Tee Launch Angle of a golf shot is by selecting the appropriate club. A list of common clubs and their respective club face angles are given in the table below:

Club: |
Driver | 1-Iron | 2-Iron | 3-Iron | 4-Iron | 5-Iron | 6-Iron | 7-Iron | 8-Iron | 9-Iron |

Angle: |
10.5° | 16.5° | 19° | 22.5° | 26.5° | 30° | 34° | 38° | 42° | 46.5° |

In the current study, we will represent Launch Angle as a discrete variable, with the available angles being those corresponding to a particular club, as in the above table.

With these new definitions, the optimization statement for this problem can be written as:

**Objective:** Minimize final Ball Distance to the Hole (achieve a hole-in-one)

**Constraints:** None

**Variables:**

**Variables:**

80 ≤ Club Head Speed (mph) ≤ 105

1 ≤ Smash Factor ≤ 1.5

-10 ≤ Tee Target Angle (deg) ≤ 10

Tee Launch Angle (deg) discrete: [10.5, 16.5, 19, 22.5, 26.5, 30, 34, 38, 42, 46.5] Tee Ball Speed (mph) dependent: = (Club Head Speed) * (Smash Factor)

**Model:** SwingSim: Hole 1

**Step ****1: ****Creating ****a ****new ****HEEDS ****MDO**** ****project** 机械工程代写

**Step**

**1:**

**Creating**

**a**

**new**

**HEEDS**

**MDO**

**project**Since this study is carried out for Hole 1 and we have already built the process automation steps for Hole 1 in Exercise 2, let’s start with the model from that study.

A new file called: **E6_Dependent_Discrete_Variables_starter **has been created in the working directory for Exercise 6. This file should be the same as your completed model from Exercise 2, except for the name.

- Close your previous
- To open the starting file for Exercise 6, click on the
**File**tab and select**Open**. - Navigate to the Working Directory for Exercise6:

**…\HEEDS_MDO_Introduction_Projects\ E6_Dependent_and_Discrete_Variables\ E6_Working_Directory**

**…\HEEDS_MDO_Introduction_Projects\ E6_Dependent_and_Discrete_Variables\ E6_Working_Directory**

- Open the project
**E6_Dependent_Discrete_Variables_starter**.

Except for the title, this project should be the same as your completed Exercise 2 project.

- Rename the project as:
**E6_Dependent_Discrete_Variables**, still within the same working directory. The file will be saved with a**.heeds**

To create a new study:

- Clickon the
**Study****Single_Evaluation****Copy****Study**. - Enter
**Optimization_Study_DV**as the name of the new study. (DV stands for Discrete Variable and Dependent) - Change the
**Study type**to**Parameter****Optimization**.

**Step 2: Updating the Project Definitions 机械工程代写**

**Step 2: Updating the Project Definitions 机械工程代写**

To match our problem statement above, we will define two new variables and adjust the definition of two others.

**Defining two new variables**

**Defining two new variables**- In the
**Parameters**tab add two new continuous variables:**ClubHeadSpeed**and**SmashFactor**with ranges as defined above. Set the baseline values for these two variables to be 95 and 1.25, respectively.

**Defining a dependent variable**

**Defining a dependent variable**- For
**TeeBallSpeed**, change the**Type**to**Dependent**. - In the properties pane for
**TeeBallSpeed**,enter

**ClubHeadSpeed*SmashFactor **and click **Apply**.

The definition appears in the **Formula **column for the variable.

When creating a formula, you can select the variable names from the dropdown in the calculator instead of typing them. 机械工程代写

**Defining discrete variables and managing sets**

**Defining discrete variables and managing sets**A discrete variable is assigned a value from among a set of allowable values, as follows:

- For
**TeeLaunchAngle**, change the**Type**to**Discrete**. - To define the set of discrete choices, clickon the {a} Manage Sets button in the Tools area of the ribbon.
- In the
**Manage Sets**dialog box, click the

A set named **Set_1 **is created.

4.Click the name of the set and rename it**LoftAngles**.

5.Click the button repeatedly until you create 10 items.

6.Define the items as shown to theright:

Note that the set is **Ordered **because there is a distinct trend among the choices (loft angle is increasing). In cases for which there is no clear trend among the choices, you should select **Unordered**. This knowledge is used by some search algorithms (e.g., SHERPA) to speed the search. 机械工程代写

- Close the
**Manage Sets**dialog box. - To complete the definition of
**TeeLaunchAngle**: In the**Set**field for**TeeLaunchAngle**, select**LoftAngles**from the drop down list.Leave the baseline as the first value in the set. This is also the default choice for a discrete variable.The launch angle is now defined as a discrete variable with a prescribed set of choices, each one corresponding to a given club selection.

##### The variables definitions should now look similar to this:

Note that **ClubHeadSpeed **and **SmashFactor **do not need to be tagged. These variables enter the model through the formula for **TeeBallSpeed**, which is already tagged.

Also, when we changed the variable **Type **for **TeeBallSpeed **and **TeeLaunchAngle**, we did not affect the tags associated with these variables. We only changed the possible values of the variables.

**Defining the optimization study**

**Defining the optimization study**- Click the
**Study** - In the
**Variables**sub-tab, change the resolution of the variables asfollows: 机械工程代写

**TeeTargetAngle:** 2001

**TeeTargetAngle:**

**ClubHeadSpeed:** 51

**SmashFactor:** 51

We could also have defined these resolutions in the **Parameters **tab.

- In the
**Responses**sub-tab, define the objective as minimizing There are no constraints for thisproblem. - Inthe
**Methods****SHERPA****Number****of****evaluations****250**.

SHERPA is able to effectively solve “mixed problems” that contain both continuous and discrete variables.

**Removing the Shared Designs**

**Removing the Shared Designs**The current study was created by making a copy of a previous study, which was a descendant of an original study, called **Single_Evaluation**. This original study was an **Evaluation Only **study, in which only specific designs are evaluated. HEEDS achieves this through a nice feature called **Shared Designs**, which has other useful applications that are discussed in our Advanced Training Course. When we make a copy of a study that has shared designs, the shared designs are copied into the new study. In the current project, we need to either eliminate the shared design or update it according to our new variable definitions. Let’s eliminate it, as follows:

- Click the
tab.**Run** - Click the button in the toolbar.
- Select the
**Design Set**called**Set_1**. - Click the (delete) button at the bottom of the
**Design Set**column and answer**Yes**to the dialogue. The shared designs are now eliminated. - Weare now ready to
**Save****Run**

**Step ****4: ****Post-Processing ****the ****Results ****in ****HEEDS**** ****POST** 机械工程代写

**Step**

**4:**

**Post-Processing**

**the**

**Results**

**in**

**HEEDS**

**POST**Open HEEDS POST and answer the following questions.

- What do the results imply about the selection of golf equipment (e.g., club and ball hardness) for this particularhole?

Hint: What club selection and smash factor values are most common for the best designs (shots)?

- Whatis the approximate cost (distance penalty) of choosing the wrong club?

Hint: Compare the **DistanceToHole**** **of designs that don’t use the optimal club choice.

**Discussion**** ****Questions**

**Discussion**

**Questions**Develop your own answers to these questions, then read some possible responses on the following page.

- If sheet metal is available in only specific thicknesses, how should you represent a thickness variable?

- What are the advantages of using a discretized representationof a continuous variable?

- Provide two examples of using a discrete variable in
*your*engineering applications.

- Providetwo examples of using a dependent variable or response in
*your*

更多代写：加拿大物理代上网课 雅思代考 留学生Course代写 记叙文essay代写 环境艺术设计论文代写 代写毕业论文网价格