Configuration

The complete program is controlled by a system of variables. To allow user and model-specific variations, the necessary variables are loaded from several configuration files.

This page discusses:

Ways to Configure Tosca Structure

There are several ways to configure Tosca Structure. Options can be set in a file called tosca.cfg, in the DRIVER command section of a parameter file or directly on the command line of tosca. Multiple versions of tosca.cfg can contribute to the final configuration. The default (system-wide) settings can be found in <install_dir>/<os>/SMATsoResources/config/tosca.cfg. If Tosca Structure finds files named tosca.cfg in the user's root directory or in the input directory, the included settings are loaded in the order presented below. The underlying concept is that more general (global) settings can always be overwritten by local ones.

Configuration Hierarchy

The configuration files are loaded in the following sequence:



Configuration Files

The control script does not explicitly require a configuration file. There are several configuration steps, none of which is mandatory.

  1. Static configuration with .cfg files located on the hard-drive
  2. DRIVER command in the parameter file
  3. Environment variables
  4. Command line

The system will search and execute configuration files first, then the DRIVER-command, etc. Any of the steps can be omitted or appear more than once.

The configuration file and DRIVER-command share the same syntax.

Static Configuration

The system will search for static configuration files in the following directories, and execute the file if it exists.

Linux Windows
${tosca}/SMATsoResources/tosca.cfg %tosca%\SMATsoResources\tosca.cfg
${tosca}/linux_a64/SMATsoResources/tosca.cfg %tosca%\win_b64\SMATsoResources\tosca.cfg
${CATInstallPath}/SMATsoResources/tosca.cfg %CATInstallPath%\SMATsoResources\tosca.cfg
${HOME}/tosca.cfg %HOME%\tosca.cfg
<Input_dir>/tosca.cfg <Input_dir>\tosca.cfg

where:

  • <Input_dir> - the directory where the job is started from (where the parameter file is located).
  • CATInstallPath might consist of more than one directory. The list is unfolded so every entry is a separate search directory.

DRIVER-Command

Refer to the DRIVER-command documentation for a detailed description of its features.

Environment Variables

Tosca Structure uses and sets several environment variables during the optimization. Some can be configured by the user (either in the installation process, directly using standard operating system procedures or with Tosca Structure configuration files). Internal variables cannot (should not) be set or changed manually.

Most of the variables have a value of either 0 or 1, meaning whether it is ON or OFF. To enable the feature it controls set it to 1 (ON), to disable - either omit the definition of the variable, or set it to 0 (OFF).

Environment variable Set by default Usage
SMA_TSO_ABAQUS_PATH=<path_to_exe> NO

Abaqus path. The same variable is used with Tosca Structure. It is equivalent to $fe_solver_exe.

SMA_TSO_ANSYS_PATH=<path_to_exe> NO

ANSYS® path. The same variable is used with Tosca Structure. It is equivalent to $fe_solver_exe.

SMA_TSO_MSCNASTRAN_PATH=<path_to_exe> NO

MSC Nastran® path. The same variable is used with Tosca Structure. It is equivalent to $fe_solver_exe.

SMA_TSO_FESAFE_PATH=<path_to_exe> NO

fe-safe path. The same variable is used with Tosca Structure. It is equivalent to $life_solver_exe.

ABA_NO_SITE_JOB_COMPLETION=1 YES

Used to skip some post completion check from Abaqus, which makes the Abaqus run faster.

ABA_TOSCA_PROTOTYPE=1 YES

Used to activate specific features in Abaqus to make it possible to work with the Tosca Python driver.

Note: Set internally by the driver. Relevant only for simultaneous mode.
ABA_TOSCA_OVERLAY=1 YES

Used by Abaqus to overwrite the ODB file with each design cycle, instead of appending frames to a single file.

Note: Set internally by the driver. Relevant only for simultaneous mode.
ABA_TOSCA_STALL=1 NO

Used by Abaqus to be held in-memory while running the Tosca optimization module.

Note: Set internally by the driver. Relevant only for simultaneous mode.
ABA_TOSCA_JOB_STALL=1 YES

Used by Abaqus to be held in-memory while running the Tosca optimization module. Allows more than one instance.

ABA_ALLOW_NFORC=1 YES

Used by Abaqus to allow writing of internal forces for connector elements.

SMA_TSO_POST_REPORT=1 NO

Used by Tosca Python Driver to enable/disable the Tosca Structure.report postprocessing tool at the end of the job.

SMA_TSO_POST_SMOOTH=1 NO

Used by Tosca Python Driver to enable/disable the Tosca Structure.smooth postprocessing tool at the end of the job.

SMA_TSO_POST_ONF2SIM=1 NO

Used by Tosca Python Driver to enable/disable the Onf2Sim post-processing tool at the end of the job.

SMA_TSO_ABAQUS_DIAGNOSTICS=1 NO

Used by Tosca Python Driver to enable archiving of solver diagnostic files (SAVE.msg, SAVE.dat, and SAVE.sta).

SMA_TSO_ABAQUS_DIAGNOSTICS=2 NO

Used to append the stderr output stream from the solver to TOSCA.OUT.

Remarks

  • All options configurable through the DRIVER commands are also configurable in tosca.cfg files, see Configurable Driver commands for details.
  • Settings can always be overwritten by an equal assignment on a configuration down the line of the execution order.
  • The syntax for tosca.cfg files and any DRIVER command is python 3.7.1.

UNC Paths

Whenever you must provide a path in one of the configuration files, you might use UNC paths. But be careful to use forward slashes "/" instead of backward slashes. Example:


//server_resource/folder/executable