Additional Variables

These variables may only be used for new definitions. They should not be overwritten.

${startdir}

Start directory of the optimization job.

${jobname}

Name of the optimization job. The $jobname variable is extracted from the parameter file name or the -opt statement.

${parfile}

Name of the parameter file (including extension).

${modelfile}

Obsolete, see ${__FE_FILE__} in FE Solver and LIFE Solver Filenames.

${parname}

Name of the parameter file (without extension).

${modelname}

Obsolete, see ${__FE_MODEL__} in FE Solver and LIFE Solver Filenames.

${opt_ext}

Standard extension of the parameter file.

Special Abaqus configuration settings

See also for information about Abaqus interface.

$abaqus_datacheck = <option>;

$abaqus_datacheck = "yes";

SIMULIA Tosca Structure will execute an Abaqus datacheck sequence before Abaqus run if parameters are found in the Abaqus input deck by the default setting:

$abaqus_datacheck = "yes";

If this behaviour is not wanted set:

$abaqus_datacheck = "no";

$flatten_abaqus_input= <option>;

$flatten_abaqus_input= "yes";

SIMULIA Tosca Structure will execute an Abaqus datacheck sequence before Abaqus run if parts and assemblies are found in the Abaqus input deck by the default setting:

$flatten_abaqus_input = "yes";

If this behaviour is not wanted set:

$flatten_abaqus_input = "no";

Other settings

add_files_to_work_dir(lab1, ..., labn);

add_files_to_work_dir ("file1.ext","file2.txt");

Obsolete: Use FEMINPUT COPY_FILE instead.

lab1 - labn: Sets the list of files that additionally should be copied into the working directory. Wild card (’*’) is NOT allowed. The files must exist by SIMULIA Tosca Structure 2017 start.

set_dos2unix_list(lab1, ..., labn);

set_dos2unix_list("*.par");

lab1 - labn: Sets the list of files on which dos2unix should be performed. Wild card (’*’) is allowed.

add_dos2unix_list(lab1, ..., labn);

add_dos2unix_list("*.par");

lab1 - labn: Adds to the list of files on which dos2unix should be performed.

$allow_absolute_include_paths= <int>;

$allow_absolute_include_paths =1;

If this variable is set to 1 absolute file paths will be tolerated in SIMULIA Tosca Structure 2017. This setting is NOT recommended!

$print_tosca_includes = <option>;

$print_tosca_includes = "no";

Controls the printing of SIMULIA Tosca Structure 2017 include files in the file "${parfile}.tosca_includes".

<option> = "no" (Default: Not printing file)

<option> = "yes" (Print file)

<option> = "only" (Print file only, do not start optimization)

The latter option is handy for queuing systems. May also be used on command line:

tosca <jobname>   -print_tosca_includes only

$TOSCA_KEEP_ BACKSLASH = <string>;

$TOSCA_KEEP_ BACKSLASH ="TOS­ CA_KEEP_ BACKSLASH";

If this variable is set backs­ lashes will NOT be replaced in configuration. This setting is NOT recommended!

${script} = "USE_DE­ FAULT_ SCRIPT";

${pre_fem_modif_ matrix} = "USE_DE­ FAULT_ SCRIPT";

To use a default script. SIMULIA Tosca Structure.control searches following directories (in this sequence):
$tosca/$fe_solver
$tosca/$life_solver
$tosca

for the first script where a part of the name matches ${script}.

In perl-syntax:
$filename =~ /${script}/i; 

The found script with name $filename will be called.

${execute_as_ perl_ext} = "<script extension>";

${execute_as_ perl_ext} ="pl";

Script that should be executed as a perl script within SIMULIA Tosca Structure.control. This is essential for using ${fe_solver_script} and ${life_solver_­ script}. If this is not wanted set the value to "do_not_execute_as_perl".

$killscripts{<execut­ able name} = "<action>"

$killscripts{abaqus} = "${fe_solver_exe} job=__FE_MODEL__ terminate";

Certain solvers may have special ways of terminating on interrupt signals. SIMULIA Tosca Structure searches the $killscripts keys (<executable name>) and calls the given <action> if one is defined. The default action is to pass the interrupt signal on the child process (FE solver, LIFE solver, optimization module etc.)

$copy_tosca_out_on_­ success = "yes"/"no";

$copy_tosca_out_on_­ success = "yes";

"yes" causes the log file TOSCA.OUT to be copied to TOSCA.POST directory after optimization to imitate old handling of log file.

"no" implies that TOSCA.OUT is only in $workdir and will not be copied to TOSCA.POST after optimization.

Remarks

  1. The SIMULIA Tosca Structure configuration is completely defined in PERL syntax. It is important to generate correct perl codes when creating user defined configuration settings. The variable values are enclosed in quotation marks. Each command must end with a semicolon. All Perl statements (i.e. if, ...) may be used in the configuration files. A more detailed perl documentation may be found in the world wide web: http://www.perl.com.
  2. The single configuration files are overwritten in the following order: If a CONFIG block is defined in the parameter file, a job-configuration file is extracted. This file is called <jobname>.par_cfg.

    installation configuration

    $tosca/bin/tosca_ctrl.cfg

    user configuration

    $HOME/tosca_ctrl.cfg

    job configuration

    parameter file

  3. The list of files for move, delete or copy actions may be defined by using the add_ functions (lists are expanded) or by using the set_ functions (lists are initialized). The lists are expanded over the complete configuration file hierarchy. An entry in the user defined configuration is added at the end of the list. As the lists are executed backwards, the user defined entries are executed first.
  4. All files in the MOVE_PER_ITER_LIST are moved in the corresponding directories at the end of each design cycle. The files get an iteration counter extension number.
  5. All files in the MOVE_PER_ITER_XXX_LIST are moved in the corresponding directories at the end of each design cycle. This list matches all files, which already have an iteration counter extension number (like the *.WRL files).
  6. All files in the COPY_SOLVER_INFO_LIST are copied in the corresponding directories before the finite element solver call. The files get an iteration counter extension number.
  7. If the variable $fe_solver_exe is modified, the $fe_solver_call also has to be modified.
  8. Dos2unix is performed at beginning of optimization on all file types in start directory defined in the dos2unix_list by set_dos2unix_list or add_­ dos2unix_list. Turn dos2unix off by setting the dos2unix_list to an empty list:
    "set_dos2unix_list()";
  9. It is not recommended to set the variable $allow_absolute_include_paths. This should only be done if the user is certain that SIMULIA Tosca Structure 2017 will not change anything in the referenced files.
  10. SIMULIA Tosca Structure replaces all "\" with "/" in configuration files before reading them. If you really need backslashes use "\\". Another option is to turn this search and replace action off. Set following line in the configuration file:
    $TOSCA_KEEP_BACKSLASH = "TOSCA_KEEP_BACKSLASH";
    
  11. Scripts with the extension ${execute_as_perl_ext} will be called with SIMULIA Tosca Structure.control as a perl (version 5.8) script using the perl function:
    do "$script";
    
    Hereby are all SIMULIA Tosca Structure.control variables accessible. All variables can be seen in the tosca.restart file if the optimization has not ended correctly. The most important arrays are @{$::cf{model_list}} and @{$::cf{life_list}} which lists the FE solver and LIFE solver input decks, respectively. If the script has arguments they will be parsed to the usual @ARGV variable. The @ARGV variable is available in the same manner as when calling the perl script directly from the command line.

Examples

CONFIG
 add_move_per_iter_list("first_last", "SAVE.op2","my_model.op2");
 add_move_after_opt_list("SAVE.txt", "my_results.txt");
 $fe_solver_exe = "/usr/bin/nastran";
 $fe_solver_call = "$fe_solver_exe $modelfile -batch=no -notify=no";
END_
CONFIG
 $pre_prep = "my_test.pl will now test my perl-script";
 $execute_as_perl_ext = "pl";
END_

Let the file my_test.pl be following simple perl-script:

my $i = 0; 
for each my $arg  (@ARGV) {print " $i : $arg "; $i++;}

The above configuration will then print the following line the log file before the preprocessor:

0 : will  1 : now  2 : test  3 : my  4 : perl-script