Batch processing: Automating script generation

The OrcaFlex spreadsheet has facilities for automating the generation of a script file for a regular set of cases. To use this facility select the pre-processing worksheet, then select the script table cell and then click the create batch scripts command which can be found on the OrcaFlex tab of the Excel ribbon.

The batch script filename is specified in the cell next to the script table cell. It is relative to the directory containing this spreadsheet, so if you do not specify the folder name then it will be created in the folder containing this spreadsheet.

Below the script table cell is a table defining the script, consisting of 3 sections:

An example is shown below:

Figure: Example table for automatic batch script generation

The script generated by this table loads a base case from a file named Base Case.dat. Because no path is specified then this file is located in the same directory as the spreadsheet. Four cases are produced based on this data file with current values of 0.5 and 0.8 and line lengths of 100 and 120.

Notes: The cell containing the base case data file name has the file name surrounded by quotes. This is because the file name contains a space. However, the quotes are not needed for the file names in the last column because they do not contain spaces.
The generated script adheres to the formatting specified in the Excel cells. So, if a cell is formatted to have, say, 1 decimal place, the corresponding value in the script will also have 1 decimal place.

The script is generated as follows. First select the cell containing the text script table. Then click the create batch scripts command which can be found on the OrcaFlex tab of the Excel ribbon. When you do this you are presented with the following window:

Figure: Automatically generated batch script

The script file has not been saved yet. You should check that the automatically generated script is as intended. Should you wish to, you can modify the script file name at this point.

If there is a problem with the script you can click the close button and correct the script table.

Save button

Saves the script file.

Save and run button

Saves the script file and then processes it.

If the script has any run commands then OrcaFlex is loaded and the script is processed by the standard OrcaFlex batch form. Otherwise the script is processed from within Excel – progress is reported on the Excel status bar.

Save, run and submit button

Saves the script file and then processes it within Excel. Each data file saved by the script is then submitted to Distributed OrcaFlex which runs and saves the simulation file.

Note: The save, run and submit button is only available if Distributed OrcaFlex is installed on your machine. In addition, it cannot be used if the script contains any run commands.

Multiple tables

You can have multiple script tables within a workbook. To create all the batch scripts in one operation select all the script tables and then click create batch scripts in the OrcaFlex tab of the Excel ribbon.