<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html
  SYSTEM "about:legacy-compat">
<html xmlns:mml = "http://www.w3.org/1998/Math/MathML" lang = "en"><head><meta charset = "UTF-8"/><meta name = "copyright" content = "(C) Copyright 2020"/><meta name = "DC.rights.owner" content = "(C) Copyright 2020"/><meta name = "DC.type" content = "concept"/><meta name = "abstract" content = "For remote calculations or work with queuing systems, it may become necessary to call Tosca Structure modules in batch mode from a command shell."/><meta name = "description" content = "For remote calculations or work with queuing systems, it may become necessary to call Tosca Structure modules in batch mode from a command shell."/><meta name = "DC.relation" scheme = "URI" content = "tso-m-usr-control-general-test-sb.htm#tso-m-usr-control-general-test-sb"/><meta name = "DC.date.modified" content = "2022-07-27"/><meta name = "DC.format" content = "HTML5"/><meta name = "DC.identifier" content = "tso-c-usr-work-cmdShell"/><meta name = "DC.language" content = "en"/><link rel = "stylesheet" type = "text/css" href = "../DSDocUI_XML34.css"/><title>Working with Tosca Structure in the Command Shell</title>
<script type = "text/javascript" src = "../DSDocUI_Highlight34.js">
  	/* */
  	</script></head><body onLoad = "highlightSearchTerms();" id = "tso-c-usr-work-cmdShell">
<a name = "hj-top"> </a><table class = "table1" id = "table11"><tr><td><table class = "DocHeader"><tr><td class = "DocHeader1" colspan = "2"><h1> Working with 
<span class = "ph">Tosca Structure</span>
in the Command Shell </h1></td></tr><tr><td class = "DocHeader4" colspan = "2"/></tr><tr><td class = "DocHeader3"><table class = "DocHeaderIntro" id = "table12"><tr><td class = "Intro1Only"><p class = "header"><p class = "abstract"> 
<span class = "shortdesc"> For remote calculations or work with queuing systems, it may
become necessary to call 
<span class = "ph">Tosca Structure</span>
modules in batch mode from a command shell. 
</span>
 
</p>
<p>This page discusses: </p><ul><li><a href = "#tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-logIn" id = "toc_rg" title = "">About Logging in Command Shell</a></li><li><a href = "#tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-preproc" id = "toc_rg" title = "">About Preprocessing</a></li><li><a href = "#tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-checkRun" id = "toc_rg" title = "">Check Run</a></li><li><a href = "#tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-startOpt" id = "toc_rg" title = "">Start Optimization</a></li><li><a href = "#tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-postproc" id = "toc_rg" title = "">About Post-Processing </a></li><li><a href = "#tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-rstTransfer" id = "toc_rg" title = "">Result Transfer</a></li></ul>
</p></td></tr></table></td><td class = "DocHeader2"><table class = "DocTopicsSeeAlso" id = "table13"><tr><td class = "TopicsTitle">See Also</td></tr><tr><td><a title = "SIMULIA Tosca Structure consists of many individual software modules that load the FE input and result data or modify the input files when required. The complete optimization process is controlled from one principal module named SIMULIA Tosca Structure Control. It controls the calling sequence of the individual software modules and the relevant solver." href = "tso-m-usr-control-general-test-sb.htm#tso-m-usr-control-general-test-sb">SIMULIA Tosca Structure Control</a></td></tr></table></td></tr></table>


 

    
<div class = "body conbody"> 
<p> Ensure that the <span class = "ph">Tosca Structure</span> 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 (<a class = "xref" href = "tso-m-usr-control-general-test-sb.htm#tso-m-usr-control-general-test-sb" title = "SIMULIA Tosca Structure consists of many individual software modules that load the FE input and result data or modify the input files when required. The complete optimization process is controlled from one principal module named SIMULIA Tosca Structure Control. It controls the calling sequence of the individual software modules and the relevant solver.">SIMULIA Tosca Structure Control</a>). A quick and very short help is printed using the
         command: <pre class = "codeblock">ToscaStructure --help</pre></p>

<div class = "section" id = "tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-logIn"><h2 class = "title sectiontitle">About Logging in Command Shell</h2> 
 
<p> Logging is always done to 
<code class = "ph codeph">&lt;jobname&gt;/TOSCA.OUT-file</code>. The following levels
can be used. </p>

<ul class = "ul" id = "tso-c-usr-work-cmdShell__ul_5A10B3B74B5C437DA63E7C4C1C8A6146"> 
<li class = "li"> WARNING (<span class = "ph uicontrol">not
recommended</span>) Only WARNINGs and ERRORs are printed. </li> 
<li class = "li"> 
<span class = "ph uicontrol">NOTICE</span> Default output to 
<code class = "ph codeph">STDOUT</code>. Only the most important logging. </li> 
<li class = "li"> 
<span class = "ph uicontrol">INFO</span> Default output to log file 
<code class = "ph codeph">TOSCA.OUT</code>. </li>
<li class = "li"> 
<span class = "ph uicontrol">DEBUG</span> Very verbose output, mostly for support.  </li> 
<li class = "li"> TRACE (<span class = "ph uicontrol">not recommended</span>)
Extremely verbose, major performance loss, only for developers </li> 
</ul> 
<p> To change log level <code class = "ph codeph">TOSCA.OUT</code>, use the command line parameter: </p> 
<p> <pre class = "codeblock">ToscaStructure --loglevel &lt;new_level&gt; ...</pre> </p>
<p>To increase the amount of output to the command shell set the parameter: </p> 
<p> 
<pre class = "codeblock">
ToscaStructure --loglevel_stdout &lt;new_loglevel&gt;
</pre> 
</p><div class = "note"><span class = "run-in.note">Note:
			</span><span class = "notecontent"><code class = "ph codeph">--loglevel</code> must be equal or more verbose than
          <pre class = "codeblock">--loglevel_stdout</pre></span></div>
 
<p>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 <code class = "ph codeph">TOSCA.OUT</code>:
   <pre class = "codeblock">
   ToscaStructure --loglevel_stdout INFO --loglevel DEBUG ...
   </pre></p> 
<p> More information, 
    see <a class = "xref" href = "tso-c-usr-control-logging.htm#tso-c-usr-control-logging" title = "Within this section, the logging functionality is described.">Logging</a></p>
</div>
 

<div class = "section" id = "tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-preproc"><p><map name = "FPMap1"><area href = "#hj-top" title = "Back to Top" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title sectiontitle">About Preprocessing</h2> 
 
<p> 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. </p> 
<p> 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. </p> 
<p> A more detailed description of the command syntax for parameter files
can be found in the 
<a class = "xref" href = "../TsoCmdMap/tso-c-ov.htm#tso-c-ov" title = "The SIMULIA Tosca Structure Commands Guide contains explanations for all commands usable in the parameter file. It can be used as a reference with quick access to available parameters.">SIMULIA Tosca Structure Commands Guide</a>.</p> 
<p><span class = "ph">Tosca Structure.gui</span>
can be started with the command 
<code class = "ph codeph">tosca_gui</code> in a command shell.</p> 
<p> The start script is located in 
<code class = "ph codeph"><span class = "ph">&lt;install_dir&gt;/&lt;os&gt;</span>/code/command/ToscaStructureGui.[bat|sh]</code>.</p> 
</div>
 

<div class = "section" id = "tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-checkRun"><p><map name = "FPMap1"><area href = "#hj-top" title = "Back to Top" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title sectiontitle">Check Run</h2> 
 
<p> Before starting the optimization, the FE model
(&lt;<code class = "ph codeph">jobname&gt;.ext</code>) and the parameter file
(&lt;<code class = "ph codeph">jobname&gt;.par</code>) 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. </p> 
<p> 
<pre class = "codeblock">
ToscaStructure --job &lt;jobname&gt;  --solver &lt;solvername&gt; --type test1
</pre> </p> 
<p> (see 
<a class = "xref" href = "tso-c-usr-control-testOpt.htm#tso-c-usr-control-testOpt" title = "Usually, an optimization requires several iterations. Wrong or incomplete definitions can be seen very early in the internal preprocessing of the optimization process. There are four different types of test levels available for controlling the optimization process. Note, that test levels 2-4 are not available for sensitivity-based topology optimization.">Testing the Optimization Process</a>).
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. </p> 
</div>
 

<div class = "section" id = "tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-startOpt"><p><map name = "FPMap1"><area href = "#hj-top" title = "Back to Top" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title sectiontitle">Start Optimization</h2> 
 
<p>The start script is located in <code class = "ph codeph"><span class = "ph">&lt;install_dir&gt;/&lt;os&gt;</span>/code/command/ToscaStructure.[bat|sh] </code>. Starting the optimization with the
            standard settings is done with the
            command<pre class = "codeblock">ToscaStructure --job &lt;jobname&gt; --solver &lt;solvername&gt;</pre></p> 
<p> Further command line options are described in 
<a class = "xref" href = "tso-c-usr-control-commandLine.htm#tso-c-usr-control-commandLine" title = "The program call in the command line and the corresponding options are described within this section.">Starting Tosca Structure from Command Line</a>. </p> 
</div>


<div class = "section" id = "tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-postproc"><p><map name = "FPMap1"><area href = "#hj-top" title = "Back to Top" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title sectiontitle">About Post-Processing </h2> 
 
<p>
            <span class = "ph">Tosca Structure.report</span> allows the preparation of optimization results for postprocessing using <span class = "ph">Tosca Structure.view</span>.</p> 
<p>The optimization results are written by <span class = "ph">Tosca Structure</span> 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: <pre class = "codeblock">ToscaStructure --job &lt;jobname&gt; --report</pre></p> 
<p>The above automatically call <span class = "ph">Tosca Structure.report</span>, which generates a vtfx file in the directory TOSCA_POST after a successful optimization. </p> 
<p> More details regarding postprocessing can be found in <a class = "xref" href = "tso-m-usr-post-genData-sb.htm#tso-m-usr-post-genData-sb" title = "The result of topology optimization is the normalized material distribution in the optimized model; in other words, for each element, its &#34;density&#34; is found. These values are saved in a solver result file, or, for visualization reasons, in vtfx files by the component Tosca Structure.report. Further, smoothed results can also be processed in vtfx format. Shape and bead optimizations result in displacements of the nodes in the design area. In this case, too, Tosca Structure.report produces vtfx files containing the model with these displacements. In addition to the optimization displacements, it is possible to write the controller input values from controller-based shape or bead optimization to the output file in vtfx format for visualization. Sizing optimization modifies the shell thicknesses in the model. Tosca Structure.report produces vtfx files containing the model with the modified shell thicknesses as well as the shell thickness changes as a contour plot. Morphing creates similar to shape optimization models with displaced nodes. Tosca Structure.report produces vtfx files containing the model with these displacements for each morphing step. In addition to the optimization displacements, it is possible to write the controller input values from the assigned shape optimization task. In addition, optimization relevant values (scalar values of objective or constraint) and all design responses or variables defined in the optimization job will be available in an history plot in the vtfx report. Note that conversion or variables defined in the optimization job will be available in a of optimization results to solver formats is no longer available. Tosca Structure.view remains the quickly accessible, easy-to-use method for post-processing of optimization results. Nevertheless, analysis and evaluation results of the optimized model are available for post-processing.">Generation of Post-Processing Data</a>. The vtfx file can be viewed in <span class = "ph">Tosca Structure.view</span>, which allows visualization of the optimization results by an animation over the
            iterations of the optimization. The sequences can be created with <span class = "ph">Tosca Structure.smooth</span> or <span class = "ph">Tosca Structure.report</span>. Call <span class = "ph">Tosca Structure.view</span> with the command line: </p> 
<p> 
<pre class = "codeblock">
ToscaStructure --view &lt;jobname&gt;/TOSCA_POST/&lt;vtfx-file&gt;
</pre> 
</p> 
</div>
 

<div class = "section" id = "tso-c-usr-work-cmdShell__tso-c-usr-work-cmdShell-rstTransfer"><p><map name = "FPMap1"><area href = "#hj-top" title = "Back to Top" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title sectiontitle">Result Transfer</h2> 
 
<p> <span class = "ph">Tosca Structure.smooth</span>
allows the preparation for the transfer of the optimization results into the
design process (for more details, see 
<a class = "xref" href = "tso-m-usr-validation-smooth-sb.htm#tso-m-usr-validation-smooth-sb" title = "Tosca Structure.smooth takes the ONF files produced during the optimization as input, generates the smooth isosurface or the model surface (depending on settings and optimization type) and saves the surface in one or several output formats.">Tosca Structure.smooth</a>).</p> 
<p>
            <span class = "ph">Tosca Structure.smooth</span> is called up in a command shell with the command <pre class = "codeblock">
ToscaStructure --job &lt;jobname&gt; --smooth
</pre></p> 
<p> More details regarding postprocessing can be found in <a class = "xref" href = "tso-m-usr-validation-sb.htm#tso-m-usr-validation-sb" title = "In the previous chapter, the visualization of unprocessed optimization results is discussed. Still, in order to be able to use the optimization results, they are to be processed (&#34;smoothed&#34;). In case of a three-dimensional model, the first processed result is the isosurface generated by Tosca Structure.smooth, that can be either written in a required format directly by Tosca Structure.smooth. If the starting model is two-dimensional, the workflow remains basically the same except that the surface simply gets modified and no remeshing is needed. Using Tosca Structure.view, one is able to view the processed optimization results with VTFX files that are also generated by Tosca Structure.smooth. A complete analysis of a finished optimization task can be only achieved by the validation run of the FE solver corresponding to the initial model. External post-processors can be used to generate a model for finite element analysis, using the results of Tosca Structure.smooth as starting point.">Result Transfer and Validation Run</a>. The vtfx file can be viewed in <span class = "ph">Tosca Structure.view</span>, which allows visualization of the optimization results by an animation over the
            iterations of the optimization. </p> 
<p> 
<pre class = "codeblock">
ToscaStructure --view &lt;jobname&gt;/TOSCA_POST/&lt;vtfx-file&gt;
</pre> 
</p> 
</div>
 
</div>
 
<div class = "related-links"/> 
</td></tr></table><script type = "text/javascript" src = "../DSDocUI_Bottom34.js">/* */</script></body>
</html>
