Using Script

Solutions > Advanced > DOE > Using Script

Introduction

SimLab provides a mechanism to record the modelling process in a python script file. The recording is a sequence of operations, and the operations can refer to geometry and SimLab parameters. The script can be executed by changing the values for these parameters. Each variation is an experiment. The result from all these experiments can help make design decisions. The DOE (Design of Experiments) tool allows users to set up the experiments.

Setting up DOE

To set up DOE, three files are required.

  1. Python script: Recording of the steps that define the process with parameters.
  2. Parameter file: Geometry and SimLab parameters in an XML file.
  3. Response file: Names of output responses in a text file.

The Parameter file and Response file can be written out at the end of recording the process. The parameter file can be written out by selecting “Automation | Parameters | Export Parameters”. The response file can be written out by selecting the option “Export Responses” by RMB click on the solution name in the solution browser.

The script file should reside in a folder, referred to Project folder. The Python script file can use other files for mesh specification, contact definition, running the solver, etc. These supporting files should reside in the Project folder.

There are options to create a DOE solution in SimLab and run it inside SimLab or to launch HyperStudy to set up DOE in HyperStudy. When HyperStudy is launched to set up DOE, SimLab exports all the necessary information from SimLab to HyperStudy, enabling seamless DOE setup in HyperStudy.

To define a set of experiments, select the “Using script” icon in DOE secondary ribbon and select all the required files.

This will create a DOE solution in the solution browser. This will guide the user to set up and execute experiments.

The “Execute Options” in RMB click on “Settings” allows to define the number of processors to run experiments in parallel.

Double-clicking “Design Variables” in the DOE solution will list all the parameters that are read from the parameter file in Parameter Manager. The “DOE” column in this table allows the user to select parameters that the user wants to include for experiments.

“Continuous” and “Discrete” are two different modes to define the parameter. “Continuous” mode allows the definition of range and number of levels in between. “Discrete” mode allows the definition of multiple discrete values.

A DOE table can be displayed by clicking on “Experiments” in the Analysis ribbon. This will show a table with a set of experiments created based on the parameters defined. This table allows users to add/remove experiments and change the parameter value.

The “Update” option in RMB click on “Results” in the DOE solution start executing the experiments. The status of each experiment will be updated in the DOE table. User can select a maximum of 4 experiments by selecting the row to open the database by clicking “Open Database”.