ME 475 – Modal Analysis and Optimization of a Tapered Beam

Objectives: To optimize the shape of a tapered beam to minimize the mass, while holding the first three natural frequencies above those of the baseline design.

Analysis Problem Statement: the natural frequencies and mode shapes of vibration for a cantilevered tapered beam. The geometrical, material, and loading specifications are given in Figure 1. The height of the beam is 2h inches, where h is described by the equation: h = 4 − 0.6x + 0.03x2 .

Figure 1. Geometry, material, and loading specifications for a tapered beam.

Optimization Problem Statement: minimize: mass of the tapered beam subject to: first natural frequency ≥ 2127 Hz second natural frequency ≥ 5604.5 Hz third natural frequency ≥ 6417.7 Hz

1 by varying: 3 ≤ height1 ≤ 5 2 ≤ height2 ≤ 4 2 ≤ height3 ≤ 3.5 1.5 ≤ height4 ≤ 3.5 1 ≤ height5 ≤ 3 0.5 ≤ height6 ≤ 2.5 0.5 ≤ height7 ≤ 2

Baseline Design: height1 = 4 height2 = 3.43 height3 = 2.92 height4 = 2.08 height5 = 1.48 height6 = 1.12 height7 = 1 Mass = 0.0294228 lbm. FirstNaturalFreq = 2127.0 Hz SecondNaturalFreq = 5604.5 Hz ThirdNaturalFreq = 6417.7 Hz

Mathematical Idealization: The analysis will use the plane stress assumption, because the tapered beam is very thin in comparison to its other dimensions.

Preliminary Procedure: Past optimizations modified parameters that existed directly in the Abaqus input . Since this optimization involves changing geometry (shape optimization) of the part, it must be remeshed, and a new input file will be created for every HEEDS evaluation. The pre-processing side of this optimization will be similar to that for the Torque Arm optimization problem. A python script will

2 be recorded that will be used to generate new designs. In this case, the post-processing will use HEEDS Scripting.

This around, it is very important that the script always begin with a CAE database that reflects the baseline design. This is important because splines can become very irregular if modified than once.

Start with the finished Abaqus/CAE database from the last lab. The following steps will be recorded by Abaqus/CAE to a python script, so if mistakes are made, they will be recorded as well. It may be necessary to perform this series of steps a second or third time to get a good python script. This script is created so HEEDS can recreate the steps the analyst would typically perform by hand to generate a new design, except in an automated fashion. 1. Create a working directory in C:\Temp called “Modal_Optimization”. 2. Copy your 2D Modal Analysis CAE database, created in the last lab, into this folder. 3. Start with Abaqus/CAE closed. 4. Start  Run  “cmd”, press enter. 5. Type “C:”, press enter. 6. Type “ C:\Temp\Modal_Optimization”. 7. Type “abaqus cae”. 8. Open the saved 2D Model Analysis CAE database. 9. Edit the sketch that defines the beam geometry. 10. Modify the values of the vertical dimensions that define the height of the 7 points that the spline is created through. Change them to values that are different from the original values, but within the variable ranges specified in the Optimization Problem Statement. 11. the sketcher, and be sure the part regenerates. The beam geometry should now reflect the changes made to the sketch. If it does not, you will need to regenerate the part manually. 12. Move to the assembly module. This will allow the assembly instance to regenerate. 13. Move to the mesh module. 14. Remesh the part. Mesh seed, controls, and element type should not need to be specified again.

3 15. Move to the job module. 16. the input file. 17. Use the “Save As” command to save the CAE database as a new database. Do not use the “Save” command!

Now look in the working directory for a file called “abaqus.rpy”. Rename it to “change_beam.py”. Open this file in a text editor.

Change the path to the CAE database (on the line that starts with “openMdb”) so only the name of the CAE database (“old” *.cae file) remains inside the single quotes. Do the same for the line the end of the file (on the line that starts with “mdb.saveAs”).

Save this python script. It is not ready to be used with HEEDS. However, it should be tested first. Modify the values of the variable values. Keep them within the ranges stated in the Optimization Problem Statement. Save the python script. Delete the *.inp file in the folder.

Finally, from a command prompt that is already set to the working directory, execute the following command: abaqus cae noGUI=change_beam.py

This will start Abaqus/CAE and immediately execute the python script. After it finishes, check that the input file has been rewritten. If the input file was rewritten properly, then the python script works are intended. If not, you can attempt to debug the python script, or re-record it.

Open the *.inp file in a text editor. Delete the contents, and save it. This is an error catching measure.

4 HEEDS Procedure: First, be sure the python script and the CAE database is in the working directory. Also, be sure that there is a *.dat file in the output database.

1. Open the HEEDS Modeler. 2. Create a new project in the working directory. 3. In the Processes tab, change the name of the analysis to “CAE”, the execution command to “abaqus”, and the command line options to “cae noGUI=change_beam.py”, all without the quotes. It should look similar to Figure 2 when finished.

Figure 2. First HEEDS analysis manager options.

4. Add, as input files, the CAE database (“old” *.cae file), the python script, and the now empty *.inp file. 5. There are no output files for this HEEDS analysis. 6. Create a second analysis, and name it “FEA”. Change the execution command to “abaqus”, and the command line options to “interactive job=” where is the name of the input deck that is created by the python script. It should look similar to Figure 3 when finished.

Figure 3. Second HEEDS analysis manager options.

7. There are no input files for this HEEDS analysis. Add the *.dat file as an output file.

5 8. Move on to the variables tab. 9. Create seven design variables, and assign ranges as listed in the Optimization Problem Statement. 10. Create four responses, those listed in the Optimization Problem Statement. All will have a file as the source. 11. Move on to the Tagging tab. 12. Tag the design variables in the python script, as has been done in previous labs. 13. Next, the responses will be tagged using the “Script” method. Select the “Mass” response, then the *.dat file as the output file, and change the tagging mode to “Script”. 14. Add the following script: OPEN_FILE(Tapered_Beam_2D_Modal.dat) GOTO_STRING(TOTAL MASS,1) MOVE_DOWN(2) GET_VALUE_FREE(1) CLOSE_FILE a. Be sure to modify the file listed in the “OPEN_FILE” command to match the name of your output file. b. Be sure to press the “Tag”. 15. Do the same for the following responses and scripts: a. FirstNaturalFreq: OPEN_FILE(Tapered_Beam_2D_Modal.dat) GOTO_STRING(EIGENVALUE,2) MOVE_DOWN(4) GET_VALUE_FREE(4) CLOSE_FILE b. SecondNaturalFreq: OPEN_FILE(Tapered_Beam_2D_Modal.dat) GOTO_STRING(EIGENVALUE,2) MOVE_DOWN(5) GET_VALUE_FREE(4) CLOSE_FILE

6 c. ThirdNaturalFreq: OPEN_FILE(Tapered_Beam_2D_Modal.dat) GOTO_STRING(EIGENVALUE,2) MOVE_DOWN(6) GET_VALUE_FREE(4) CLOSE_FILE 16. Be sure to extract the values for all these responses. They should match the values in the Baseline Design section. 17. Tagging is now complete. Move on to the Assembly tab. 18. Assign “Process_1” to the optimization agent “OPT_Agent_1”. 19. Next, setup the responses. It should look like Figure 4 when finished.

Figure 4. The agent responses after assigning the optimization options.

20. Click on the “Variables” button. Verify that all seven variables appear. If some or all are missing, it means they were not tagged properly. The default resolution of 101 is acceptable for this problem. 21. Click on the “Methods” button. Choose SHERPA, with 150 evaluations. 22. Next, move to the Run tab. Save the project. The optimization is now ready to be run.

The length of one evaluation for this problem is usually about 10 to 40 seconds, depending on the computer used and location of the working directory. Thus, it could take a couple of hours to run the full optimization. Running on the local drive, such as in C:\Temp, will minimize runtime for each evaluation.

Model Validation: The model was validated in last week’s lab, so it is not necessary to validate it again.

7 Report Requirements: A full report is required for this lab (see ME 475 Lab Report Format Guidelines). 1. Present plots of the first mode of vibration for the best and baseline design. 2. Present a table comparing the variable and response values for the best and baseline designs. 3. Present plots of trajectories of the responses throughout the optimization. Do the same for the design variables. 4. Comment on any convergence that exists. Note any constraints that are active and any design variables at extreme values.

8