HyperStudy

HS-1080: Settings Up an Operator Model

HS-1080: Settings Up an Operator Model

Previous topic Next topic Expand/collapse all hidden text  

HS-1080: Settings Up an Operator Model

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

In this tutorial you will use the Operator model type to run a script that uses a combination of HyperView and HVTrans to split the solver result file in multiple result files, one for each component in the model. This tutorial uses a model which consists of a plate with a hole which is loaded in plane. The design has three thickness variables; one for each zone. The output responses of interest are the maximum stress in each of the three zones.

The files used in this tutorial can be found in <hst.zip>/HS-1080/. Copy the tutorial files from this directory to your working directory.

hmtoggle_plus1greyStep 1: Perform the Study Setup
1.Start HyperStudy
2.To start a new study, click File > New from the menu bar, or click files_new_hst2 on the toolbar.
3.In the HyperStudy – Add dialog, enter a study name, select a location for the study, and click OK.
4.Go to the Define Models step.
5.Add a Parameterized File model.
a.From the Directory, drag-and-drop the plate.tpl file into the work area.

hs_1080_drag_drop_tpl_file

b.In the Solver input file column, enter plate.fem. This is the name of the solver input file HyperStudy writes during any evaluation.
c.In the Solver execution script column, select OptiStruct (os).

hs_1080_define_model

6.Click Import Variables. Three input variables are imported from the plate.tpl resource file.
7.Go to the Define Input Variables step.
8.Review the input variable's lower and upper bound ranges.
9.Go to the Specification step.

 

hmtoggle_plus1greyStep 2: Perform the Nominal Run
1.In the work area, set the Mode to Nominal Run.
2.Click Apply.
3.Go to the Evaluate step.
4.Click Evaluate Tasks.

 

hmtoggle_plus1greyStep 3: Setup the Operator Model

This step requires the plate.h3d file generated in step 2, which is why you cannot setup the operator model until after the nominal run.

1.Go back to the Define Models step.
2.Add an Operator model.
a.Click Add Model.
b.In the Add - HyperStudy dialog, select Operator and click OK.
3.Add model resources.
a.In the work area, right-click on the Operator model and select Model Resources from the context menu.

hs_1080_context_menu_model_resource

b.In the Model Resources dialog, click Add Resource.
c.In the Add - HyperStudy dialog, add two Normal resources and one Link resource and click OK.

hs_1080_model_resource_dialog

4.Define model resource 1.

Model resource 1 references the python script that will be used as the solver script. This is a reference to a file that is not generated during a solver run, therefore it is of type Normal. This file does not need to be in the run directory.

a.In the Origin Path field for File 1, navigate to your working directory and open the hv_resultsbyComp.py file.
b.Set Operation to None.
5.Define model resource 2.

Model resource 2 references the tcl script that will be used to run HyperView and Hvtrans in batch. This is a reference to a file that is called by the python script and not by a solver, therefore it is of type Normal. This file is required to be in the run directory.

a.In the Origin Path field for File 2, navigate to your working directory and open the hv_resultsbyComp.tcl file.
b.Set Operation to Copy.
6.Define model resource 3.

Model resource 3 will be used as a link to the result file from the first model. This file is the target file for the tcl script, and it is required to be in the run directory. It is a file that changes for each run, therefore it is a linked file and it is copied in the run directory. Note that the file can be moved.

a.In the Origin Path field for File 3, navigate to the approaches/nom_1/run__00001/m_1 directory and open the plate.h3d file.
b.Set Operation to Copy.
7.In the Model Resources dialog, click Close.

hs_1080_model_resources_dialog_2

8.In the work area, verify that the Operator model's Solver execution script is set to Python (py).
9.In the Solver input arguments field, enter ${m_2.file_1} ${m_2.file_3}.

The input arguments are references to the model resources' varnames. The first argument (m_2.file_1) is a reference to the model resource’s varname, and tells python which script to run. The second argument (m_2.file_3) is the varname to the target result file to split, and will be the first argument to the python script.

10.Go to the Specifications step.

 

hmtoggle_plus1greyStep 4: Perform the Nominal Run

In this step you will perform the same steps as Step 2, except during this nominal run the Operator model will also be run.

1.In the work area, set the Mode to Nominal Run.
2.Click Apply.
3.In the HyperStudy dialog, click Yes to overwrite the run matrix.
4.Go to the Evaluate step.
5.Click Evaluate Tasks.
6.In the HyperStudy dialog, click Yes to overwrite files.

 

hmtoggle_plus1greyStep 5: Define Output Responses

In this step you will create four output responses: maxStressPart2, maxStressPart4, maxStress3, Volume.

1.Go to the Define Output Responses step.
2.Create the maxStressPart2 output response.
a.From the Directory, drag-and-drop the plate_2_shell.h3d file, located in approaches/nom_1/run_00001/m_2, into the work area.
b.In the File Assistant dialog, set the Reading technology to Altair® HyperWorks® (Hyper3D Reader) and click Next.
c.Select Multiple items at multiple time steps, then click Next.
d.Define the following options, and then click Next.
Set Subcase to Subcase 1(Load).
Set Type to Element Stresses (2D & 3D) (2D).
For Request, select the First request and Last request checkboxes.
For Components, select vonMises (Z1).
For Timestep, enter 0.

hs_1080_response_define_maxstresspart2

e.Label the output response maxStressPart2.
f.Set Expression to Maximum.

hs_1080_response_label_maxstresspart2

g.Click Finish. The maxStressPart2 output response is displayed in the work area.
3.Create the maxStressPart4 output response.
a.From the Directory, drag-and-drop the plate_4_patch2.h3d file, located in approaches/nom_1/run_00001/m_2, into the work area.
b.In the File Assistant dialog, set the Reading technology to Altair® HyperWorks® (Hyper3D Reader) and click Next.
c.Select Multiple items at multiple time steps (readsim), then click Next.
d.Define the following options, and then click Next.
Set Subcase to Subcase 1(Load).
Set Type to Element Stresses (2D & 3D) (2D).
For Request, select the First request and Last request checkboxes.
For Components, select vonMises (Z1).
For Timestep, enter 0.
e.Label the output response maxStressPart4.
f.Set Expression to Maximum.
g.Click Finish. The maxStressPart4 output response is added to the work area.
4.Create the maxStress3 output response.
a.From the Directory, drag-and-drop the plate_3_patch1.h3d file, located in approaches/nom_1/run_00001/m_2, into the work area.
b.In the File Assistant dialog, set the Reading technology to Altair® HyperWorks® (Hyper3D Reader) and click Next.
c.Select Multiple items at multiple time steps (readsim), then click Next.
d.Define the following options, and then click Next.
Set Subcase to Subcase 1(Load).
Set Type to Element Stresses (2D & 3D) (2D).
For Request, select the First request and Last request checkboxes.
For Components, select vonMises (Z1) and vonMises (Z2).
For Timestep, select Last timestep.
e.Label the output response maxStress3.
f.Set Expression to Maximum.
g.Click Finish. The maxStress3 output response is added to the work area.
5.Create the Volume output response.
a.From the Directory, drag-and-drop the plate.out file, located in approaches/nom_1/run_00001/m_1, into the work area.
b.In the File Assistant dialog, set the Reading technology to Altair® HyperWorks® (osmass.tpl) and click Next.
c.Select Single item in a time series, then click Next.
d.Define the following options, and then click Next.
Set Type to OptiStruct Analysis.
Set Request to Out File.
Set Component to Volume.
e.Label the output response Volume.
f.Set Expression to Maximum.
g.Click Finish. The Volume output response is added to the work area.
6.Click Evaluate to extract the output response values.

hs_1080_responses_work_area

 

hmtoggle_plus1greyStep 6: Define the DOE
1.In the Explorer, right-click and select Add Approach from the context menu.
2.In the HyperStudy - Add dialog, select Doe and click OK.
3.Go to the Specifications step.
4.In the work area, set the Mode to Modified Extensible Lattice Sequence.
5.Click Apply.
6.Go to the Evaluate step.
7.Click Evaluate Tasks.
8.Go to the Post-Processing step.
9.Click the Pareto Plot tab to plot the effects of variables on output responses in hierarchical order (highest to lowest).

Each variable contributes nearly equally to volume. A positive hashing indicates that the relationship is positive: as the variable increases, mass increases. For the three stress output responses, the maximum stress in each zone is dominated by the thickness of that zone.

hs_1080_pareto_plot

 

 

 

See Also:

HyperStudy Tutorials