# Tutorial: Optimizing Gauge

Run and review the results of a gauge optimization.

In this lesson you will:
• Run a baseline analysis of a multi-part bracket assembly and view the results
• Define a design space and run a gauge optimization
• Review the results of the gauge optimization
• Run a reanalysis of the optimized shape and compare the results

## Overview

Gauge optimization is a type optimization that finds the optimal thickness of parts. This approach is ideal for minimizing the mass of an assembly. It can also be used to maximize stiffness or frequency of a model when using realistic design constraints like displacement constraints. Note that gauge optimization only works on parts that are defined by surface geometry.

In this tutorial, you will run a baseline analysis and gauge optimization on a typical multi-part bracket design space.

## Analyze the Baseline Model

Let's start by opening the model, review it and running a baseline analysis.

Performing analysis on a model before setting up optimization helps ensure that constraints and other parameters are reasonable for optimization.

1. Press F7 to open the Demo Browser.
2. Double-click the fabricated_gauge.stmod file to load it in the modeling window.
Note that it has two load cases, five parts, a concentrated mass, and six mounting locations.
3. Make sure the display units in the Unit System Selector are set to MPA (mm t N s).
4. Click Run Analysis on the Analyze icon on the Structure ribbon.
Tip: To find and open a tool, press Ctrl+F. For more information, see Find and Search for Tools.
5. Set the options in the Run Analysis window as shown below:
6. Change the Element size to 1.5 mm.
7. Make sure that Speed/Accuracy is set to Faster.
8. Click Run to perform the analysis.

## Review the Baseline Analysis Results

1. When the run is complete, double-click on the name of the run to view the results.
2. Select Displacement for the Result Type and make note of the maximum for both load cases.
We will not use them in this tutorial, but these displacements can be used as good constraints when running an optimization.
3. Click the Create, Show, and Hide Callouts button under Callouts and place a callout at Point 1.
4. Close the Analysis Explorer.

## Define the Design Space

Next, we'll set the design space for the optimization.

1. In the Model Browser, hold Ctrl and select the Rear, Upper, and Stiffener parts.
2. Right-click on the selected parts in the Model Browser and pick Design Space from the context menu.
3. Click on empty space in the modeling window.
The design spaces are shown below:

## Run a Gauge Optimization

1. Click Run Optimization on the Optimize icon on the Structure ribbon.
2. Set the options in the Run Optimization window as shown below:
3. Select Gauge for the optimization Type.
4. Select Minimize Mass for the optimization Objective.
Note: Notice that the options in the Run Optimization window change depending on what type and objective are selected. Because we are running a gauge optimization, we have Gauge Thickness options for the five sheet design spaces that are available as design variables for gauge optimization. Each design space has a current, minimum, and maximum thickness which can be edited as desired. The minimum and maximum thickness default to +/- 20% of the current thickness.
5. Set the Element size to 4.5 mm.
6. For the Gauge thickness, set the Minimum to 2.0 mm and the Maximum to 6.0 mm for all design spaces.
7. Under Stress Constraints, set the Minimum safety factor to 1.5.
8. Click Run.

## View the Results in the Shape Explorer

1. When the run is complete, double-click on the name of the run to view the results in the Shape Explorer.
2. Review the part gauge Thickness results.
Each thickness is assigned a different color, as shown in the legend.
3. Select Percentage in the Part Gauge pull-down menu and review the percentage thickness results.
This time the results are color coded according to the percentage change in thickness.
4. You can also review the mass of each design space vs the optimized shape in the Model Browser by switching between the design space and the gauge results at the top of the Shape Explorer.
Note: To display masses in the Model Browser, right-click on the title bar of the browser and select Mass.

## Reanalyze the Optimized Shape and Compare Results

1. To analyze the optimized shape, click the Analyze button on the Shape Explorer.
2. When the run is complete, double-click on the name of the run to view the results.
3. Select Displacement for the Result Type and note that the maximum for both load cases has increased.
This is because we used a minimum safety factor of 1.5 as a design constraint. (If you wish to maintain displacement you can create displacement constraints on your model for different results.)
4. Click the Compare Results button on the Analysis Explorer to open the Comparison table.
5. Compare the Mass Total and Max Displacement for each analysis run.
Comparing the baseline to the optimized analysis runs for both load cases shows that the mass has been lowered by optimizing the gauge while still achieving the stress target.