Configurable Driver-Properties

This section provides a reference of all possible driver-statement properties which are configurable through the DRIVER-command.

Introduction and Overview

A Python object called driver is exposed to the user via the DRIVER-command. The usual syntax of accessing the members or properties of this object is as follows:

    DRIVER
      driver.Logger.LogLevel = LogLevels.DEBUG
      driver.Modules[ ToscaModules.TOSCA_PREP ].Path = r'e:\FE_APP\TOSCA\SMATsoToscaPrep.exe'
    END_
    
The driver-object contains further Python-objects. An overview of the hierarchy of all available objects looks as follows:



The squared letters (shown also in the Legend) correspond to the different types of the Python-objects. A detailed explanation of the different objects is provided in the sections below.

driver.Solver

The driver.Solver object provides access to the settings of the FE-solver used for the optimization. Please note that this object can have additional and/or different members for some solvers. For example, the driver.Solver.MatrixFormat is used only in the context of the Abaqus solver and is ignored for other solvers.

Name

Data Type

Range of Values

Description

Default Value

driver.Solver.Name

Enumeration constant

FeSolvers.ABAQUS

FeSolvers.ANSYS

FeSolvers.MSCNASTRAN

FeSolvers.MARC

FeSolvers.PERMAS

Identifies the solver used for the optimization.

FeSolvers.ABAQUS

driver.Solver.Path

String

For example, r'e:\FE_APP\Solver\MySolver.exe'

Points to the full path of the main solver executable file.

Installation/configuration setting

driver.Solver.AddCallArgs

List of Strings

Arbitrary strings containing solver specific command-line arguments.

Example: [ '--format_matrices', 'FIL' ]

Allows addition of command-line arguments to the solver call.

Empty list

driver.Solver.Wrapper

List of Strings

Please refer to the section: Defining Wrappers for Executable Modules

Provides a way to execute the solver as a child process of a given tool.

Empty List

driver.Solver.StandardCallArgs

List of Strings

Arbitrary strings containing solver specific command-line arguments.

Example: [ '--format_matrices', 'FIL' ]

Allows overwriting of the default command-line arguments for the solver.

Installation/configuration setting

driver.Solver.Cpus

Integer

1, 2, 3, ...

Defines the number of CPUs to be used by the solver.

1

driver.Solver.NumQueues

Integer

1, 2, 3, ...

Defines the maximum number of solver-tasks to be executed simultaneously.

1

driver.Solver.MaterialCluster

Integer

Non-negative integer, typical values: 10000..100000

Defines the maximum number of materials (after reduction) in the modified input deck.

More materials improve the resolution of the optimization method, but may slow-down the solver pre-processor.

If no value is provided, the default value of 10000 is assumed and used internally.

Please enter a value of 0 to disable clustering of materials and thus use a separate material for each element.

Unset, i.e. 10000 is enforced.

driver.Solver.CheckStrings

List of Two Strings

Solver-specific string messages to look for in the solver output.

The first string corresponds to solver success, the second string corresponds to solver failure.

Redefinition of these strings enables the user to change the criterion for determining whether the solver run succeeded or failed.

Example: a value of [ 'Solver Run OK', '' ] instructs the Python Control that the solver run was successful in the string 'Solver Run OK' is found.

A value of [ '', 'Solver Run Failed!' ] prescribes the criterion for failure, assuming success if the string 'Solver Run Failed!' is not detected.

Installation/configuration setting

driver.Solver.MessageExt

String

A valid file extension string.

Redefinition of the file extension of the solver message file.

Example: 'msg' is the extension for the Abaqus Standard solver, 'sta' - for the Abaqus Explicit solver.

Installation/configuration setting

driver.Solver.runMode

(Abaqus-specific)

Enumeration constant

AbaqusRunModes.SEQUENTIAL

AbaqusRunModes.SIMULTANEOUS

Affects the way the Abaqus-solver is executed. The "sequential" mode forces Abaqus to be started anew for each optimization iteration. The "simultaneous" mode keeps the Abaqus process alive during the whole optimization.

AbaqusRunModes.SIMULTANEOUS for topology optimization, AbaqusRunModes.SEQUENTIAL otherwise

driver.Solver.MatrixFormat

(Abaqus-specific)

Enumeration constant

MatrixFormats.SIM

MatrixFormats.FIL

Prescribes which file format is used for the transfer of elemental stiffness matrices from Abaqus to SIMULIA Tosca Structure.

MatrixFormats.SIM

driver.Solver.PseudoStepToLc

(Abaqus-specific)

Integer (Boolean)

0 or 1

Triggers the automatic conversion of Abaqus linear *STEP-commands into *LOADCASE-commands for improved solver performance.

1

driver.Solver.MaxStepPseudoLc

(Abaqus-specific)

Integer

Arbitrary integer value

Establishes a limit for the number of Abaqus *LOADCASE-keywords to be used within one *STEP-keyword.

A negative value or zero indicates that the limit is disabled.

-1

driver.Solver.iMode

(Nastran-specific)

Enumeration constant

MSCNastranRunModes.I4

MSCNastranRunModes.I8

Defines the mode for the Nastran-solver (I4 or I8).

MSCNastranRunModes.I4

driver.LifeSolver

The driver.LifeSolver object provides access to settings specific to the different Life-solvers which are supported by SIMULIA Tosca Structure.

The driver.LifeSolver object is derived from the driver.Solver object and thus most of the settings are identical between driver.LifeSolver and driver.Solver. In this section, only the settings unique to the Life-Solvers are documented.

Name

Data Type

Range of Values

Description

Default Value

driver.LifeSolver.Inverse

Integer (Boolean)

0 or 1

Trigger an inverted value interpretation for the Damage-value.

1

driver.Modules

The driver.Modules dictionary gives access to the setup of the SIMULIA Tosca Structure executable modules. The user can replace one or mode modules for a specific optimization run. For a list of the modules, please refer to the Redefinition of the Tosca Modules section.

Name

Data Type

Range of Values

Description

Default Value

driver.Modules[ <Module> ].Name

Enumeration constant

ToscaModules.ABQ_LC_STEP

ToscaModules.FEM_INCLUDE

ToscaModules.FEM_2_ONF

ToscaModules.FEM_MODIF

ToscaModules.TOSCA_PREP

ToscaModules.TOSCA_OPT

ToscaModules.RES_2_VTM

ToscaModules.ODB_2_VTM

ToscaModules.LIFE_2_VTM

ToscaModules.REPORT

ToscaModules.SMOOTH

ToscaModules.ONF_2_SIM

Read-only name of the module, used as an index for the dictionary. Basically identical to <Module>.

These values are explained in more details in the Redefinition of the Tosca Modules section.

Installation/configuration setting

driver.Modules[ <Module> ].Path

String

A valid path to a file

Established an alternative execution module.

Installation/configuration setting

driver.Modules[ <Module> ].AddCallArgs

List of Strings

Arbitrary strings containing module specific command-line arguments.

Example: [ '--format_matrices', 'FIL' ]

Allows addition of command-line arguments to the module call.

Empty list

driver.Modules[ <Module> ].LogLevel

Enumeration constant

LogLevels.QUIET

LogLevels.CRITICAL

... (same as driver.Logger.LogLevel below)

Establishes a new log-level setting for the module.

Inherit global log-level for the run: value copied from driver.Logger.LogLevel

driver.Modules[ <Module> ].Wrapper

List of Strings

Please refer to the section: Defining Wrappers for Executable Modules

Provides a way to execute the module as a child process of a given tool.

Empty List

driver.Logger

The driver.Logger object allows modification of the logging settings of the SIMULIA Tosca Structure run.

Name

Data Type

Range of Values

Description

Default Value

driver.Logger.LogFileName

String

A valid path to a file

Redirect the log-output to a new file.

Please note that some messages - output prior to the setting of the new log-file - may end up logged in the default log-file.

For optimization: TOSCA.OUT

For post-processing: TOSCA_POST.OUT

For info output: TOSCA_INFO.OUT

driver.Logger.LogLevel

Enumeration constant

LogLevels.QUIET

LogLevels.CRITICAL

LogLevels.ERROR

LogLevels.WARNING

LogLevels.NOTICE

LogLevels.QA_INFO

LogLevels.INFO

LogLevels.DEBUG

LogLevels.TRACE

LogLevels.DEVELOP

Establish a new global log-level.

Please note that some messages - output prior to the setting of the new log-level - may be logged with a different log-level.

LogLevels.INFO

driver.Logger.ScreenLogLevel

Enumeration constant

LogLevels.QUIET

LogLevels.CRITICAL

... (same as driver.Logger.LogLevel above)

Establish a new global log-level for the console output.

Please note that some messages - output prior to the setting of the new log-level - may be displayed with a different log-level.

LogLevels.NOTICE

driver.registerSaveRule

The driver.registerSaveRule function allows the user to add rules for saving files from the SIMULIA Tosca Structure working directory.

Here is an example of the usage of driver.registerSaveRule. In this example, any *.odb files found at the end of the optimization design cycle ("Iteration") are saved into the sub-folder SAVE.odb. A suffix with the iteration number is added to the file name, and this is done for design cycles 0, 1, and the last one.

DRIVER
  driver.registerSaveRule( UpdateRules.COPY, CheckPoints.ITER_COMPLETE, EventTimes.FIRST_LAST, [ '*.odb' ], 'SAVE.odb', '_%i' )
  driver.registerSaveRule( UpdateRules.COPY, CheckPoints.ITER_COMPLETE, (EventTimes.NTH, 1), [ '*.odb' ], 'SAVE.odb', '_%i' )
END_

The meaning of the arguments to driver.registerSaveRule can be explained as follows:



  • The action to perform ("What") can be one of the following:

    UpdateRules.COPY: Copy the file(s)

    UpdateRules.MOVE: Move the file(s)

    UpdateRules.DELETE: Delete the file(s)

  • The check-point for the action ("When") can be one of the following:

    CheckPoints.PERT_COMPLETE: After a perturbation step is completed

    CheckPoints.ITER_COMPLETE: After a design cycle ("Iteration") is completed

    CheckPoints.OPT_COMPLETE: After the whole optimization is completed

    CheckPoints.MX_COMPLETE: After a matrix cycle is completed

    CheckPoints.PERT_BEGIN: A perturbation step is about to begin

    CheckPoints.OPT_BEGIN: The optimization is about to begin

  • The frequency for the action ("How often") can be one of the following:

    EventTimes.EVER: Every time

    EventTimes.NEVER: Never

    EventTimes.FIRST: Only the first time

    EventTimes.LAST: Only the last time

    EventTimes.FIRST_LAST: Only the first and the last time

    EventTimes.NTH: Only once, the Nth-time

    EventTimes.FREQ: Every Nth-time

  • The object(s) for which to perform the action ("Which") should be provided as a list with file-names or file-masks.

  • "Where" is the name of a sub-folder to the SIMULIA Tosca Structure working directory. The file(s) which match the save-rule will be stored into this sub-folder. The folder is created, as necessary.

  • The files being stored are renamed by adding a suffix to the base file name. The one of the following special strings can be used:

    %i: Iteration number

    %p: Perturbation number