Working with Tosca Structure in the Command Shell

For remote calculations or work with queuing systems, it may become necessary to call Tosca Structure modules in batch mode from a command shell.

This page discusses:

See Also
SIMULIA Tosca Structure Control

Ensure that the Tosca Structure variable is known (for example, by using a when working without a graphical user interface). This chapter gives only a brief overview of the basic process and the individual commands. More detailed information regarding the optimization process can be found in (SIMULIA Tosca Structure Control). A quick and very short help is printed using the command:

ToscaStructure --help

About Logging in Command Shell

Logging is always done to <jobname>/TOSCA.OUT-file. The following levels can be used.

  • WARNING (not recommended) Only WARNINGs and ERRORs are printed.
  • NOTICE Default output to STDOUT. Only the most important logging.
  • INFO Default output to log file TOSCA.OUT.
  • DEBUG Very verbose output, mostly for support.
  • TRACE (not recommended) Extremely verbose, major performance loss, only for developers

To change log level TOSCA.OUT, use the command line parameter:

ToscaStructure --loglevel <new_level> ...

To increase the amount of output to the command shell set the parameter:

ToscaStructure --loglevel_stdout <new_loglevel>

Note: --loglevel must be equal or more verbose than
--loglevel_stdout

For example, the following command line shows how to increase the log level to INFO on the command shell and to DEBUG output into the log file TOSCA.OUT:

   ToscaStructure --loglevel_stdout INFO --loglevel DEBUG ...
   

More information, see Logging

About Preprocessing

Once the FE model has been completed and checked, the optimization task must be defined. The parameter files containing these definitions can be created with an editor. This is only recommended when single commands in an existing parameter file need to be modified. Groups and coordinate systems can be defined in the FE-model to simplify the creation of the optimization task.

There are some limitations for the parameter file that need to be considered. One line in the parameter file must not exceed 160 characters. The par file should be saved with UTF-8 encoding. When using Unicode characters, this is obligatory. Caution: Because some symbols are composed of multiple characters in UTF-8 encoding, the 160 character limitation can be reached earlier than expected.

A more detailed description of the command syntax for parameter files can be found in the SIMULIA Tosca Structure Commands Guide.

Tosca Structure.gui can be started with the command tosca_gui in a command shell.

The start script is located in <install_dir>/<os>/code/command/ToscaStructureGui.[bat|sh].

Check Run

Before starting the optimization, the FE model (<jobname>.ext) and the parameter file (<jobname>.par) must already exist in the work directory. As part of a routine check, the FE model should be analyzed and evaluated. Consequently, a test run must be completed and checked with respect to the optimization task before beginning the optimization.

ToscaStructure --job <jobname>  --solver <solvername> --type test1

(see Testing the Optimization Process). It is worthwhile to make different test runs depending on the optimization task. Once the test run is completed, a visual check of the definition of the optimization task can follow.

Start Optimization

The start script is located in <install_dir>/<os>/code/command/ToscaStructure.[bat|sh] . Starting the optimization with the standard settings is done with the command

ToscaStructure --job <jobname> --solver <solvername>

Further command line options are described in Starting Tosca Structure from Command Line.

About Post-Processing

Tosca Structure.report allows the preparation of optimization results for postprocessing using Tosca Structure.view.

The optimization results are written by Tosca Structure in a neutral format (ONF). A converting module allows the creation of a report file containing visualization sequences and graphs for specific results. Automatic generation of a visual postprocessing file can be done with the command line option -report; for example:

ToscaStructure --job <jobname> --report

The above automatically call Tosca Structure.report, which generates a vtfx file in the directory TOSCA_POST after a successful optimization.

More details regarding postprocessing can be found in Generation of Post-Processing Data. The vtfx file can be viewed in Tosca Structure.view, which allows visualization of the optimization results by an animation over the iterations of the optimization. The sequences can be created with Tosca Structure.smooth or Tosca Structure.report. Call Tosca Structure.view with the command line:

ToscaStructure --view <jobname>/TOSCA_POST/<vtfx-file>

Result Transfer

Tosca Structure.smooth allows the preparation for the transfer of the optimization results into the design process (for more details, see Tosca Structure.smooth).

Tosca Structure.smooth is called up in a command shell with the command

ToscaStructure --job <jobname> --smooth

More details regarding postprocessing can be found in Result Transfer and Validation Run. The vtfx file can be viewed in Tosca Structure.view, which allows visualization of the optimization results by an animation over the iterations of the optimization.

ToscaStructure --view <jobname>/TOSCA_POST/<vtfx-file>