HS-1090: Define Discrete Size Variables with the Lookup Model
Learn how to define discrete size input variables with the Lookup model. You will establish links between the input variables imported from a parameterized file with the output responses imported from a .csv file using the Lookup model.
Perform the Study Setup
- Start HyperStudy.
-
Start a new study in the following ways:
- From the menu bar, click .
- On the ribbon, click .
- In the Add Study dialog, enter a study name, select a location for the study, and click OK.
- Go to the Define Models step.
-
Add a Parameterized File model.
-
Add a Lookup model.
- In the work area, click Add Model.
- In the Add dialog, select Lookup and click OK.
- In the Resource column, click .
- In the HyperStudy – Load model resource dialog, navigate to your working directory and open the material_prop.csv file.
- Click Import Variables.
-
In the Import Variables dialog, specify the input
variables to import from the material_prop.csv file.
- In the Number of design variables field, enter 1.
- Click OK.
The Lookup model automatically populates the input variables based on the number you provided, and you can now identify the material by strings. - Go to the Define Input Variables step.
-
Review the four input variables that were imported from the
beam.tpl file in the Parameterized File model, and the
one input variable that was imported from the
material_prop.csv file in the Lookup model.
Note: The label of fifth input variable has the same label as the first column in the material_prop.csv file, that is Material.
Perform Nominal Run
- Go to the Test Models step.
-
Click Run Definition.
An approaches/setup_1-def/ directory is created inside the study Directory. The approaches/setup_1-def/run__00001/m_1 directory contains the input file, which is the result of the nominal run.
Create and Evaluate Output Responses
- Go to the Define Output Responses step.
-
Review the three output responses that were automatically added to the study
from the Lookup model, which correspond to the nominal values from the
material_prop.csv file.
Note: The output response labels are the same as the labels in the material_prop.csv file.
- Click the Data Sources tab.
- Click Add Data Source twice to add two data sources.
-
Define Data Source 1.
- In the File field for Data Source 1, click ….
- In the Data Source Builder dialog, File field, navigate to the approaches\setup_1-def\run__00001\m_1 directory inside your working directory and open the beam.h3d file.
- Set Tool to File Source.
- Set Subcase to Subcase 1 (Modal).
- Set Type, Request, and Component to Frequency.
- Click OK.
-
Define Data Source 2.
- In the File field for Data Source 2, click ….
- In the Data Source Builder dialog, File field, navigate to the approaches\setup_1-def\run__00001\m_1 directory inside your working directory and open the beam.h3d file.
- Set Tool to Read Simulation.
- Set Subcase to Subcase 2 (Static).
- Set Type to Displacement (Grids).
- For Request, set Start to First Request and End to Last Request.
- For Components, select MAG.
- Set Time to All.
- Click OK.
- Click the Define Output Responses tab.
-
Define the 1st_natural_freq output response.
-
Define the Max_disp output response.
- Click Evaluate to extract the response values.
Link Input Variables and Output Responses
In this step you will establish links between the input variables imported from the beam.tpl file in the Parameterized File model with the output responses imported from the material_prop.csv file in the Lookup model.
- Go to the Define Input Variables step.
- Click the Links tab.
-
Link the Modulus input variable to the Modulus output response.
- In the Expression field for Modulus, click ….
- In the Expression Builder, click the Output Responses tab.
- From the list of output responses, select Modulus.
- Click Insert Varname.
- Click OK to close the Expression Builder.
-
Create two more links.
- Link the Poissons input variable to the Poissons output response.
- Link the Density input variable to the Density output response.
- Go to the Test Models step and click Run Definition.
-
Click the Model Data tab and verify that the input
variables are equal to their corresponding linked output response.
Run DOE
-
Add a DOE.
- Go to the step.
- Set the Mode to Modified Extensible Lattice Sequence (Mels) and that the Number of Runs is set to 6.
-
Verify the Number of Runs is set to 6.
- Click Apply.
- Go to the step.
- Click Evaluate Tasks.
- Go to the step.
-
Click the Summary tab.
The output responses (material property numbers) from the .csv file are linked to the input variables (material property set in the FEA deck), and are now controlled in the categorical input variable Material.
Any number of material data can be added using a library, without requiring you to explicitly create “if” conditions in a .tpl file. This is the advantage of using Lookup model in this case.