<?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 = "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."/><meta name = "description" content = "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."/><meta name = "DC.format" content = "HTML5"/><meta name = "DC.identifier" content = "tso-c-usr-control-testOpt"/><meta name = "DC.language" content = "en"/><link rel = "stylesheet" type = "text/css" href = "../DSDocUI_XML34.css"/><title>Testing the Optimization Process</title>
<script type = "text/javascript" src = "../DSDocUI_Highlight34.js">
  	/* */
  	</script></head><body onLoad = "highlightSearchTerms();" id = "tso-c-usr-control-testOpt">
<a name = "hj-top"> </a><table class = "table1" id = "table11"><tr><td><table class = "DocHeader"><tr><td class = "DocHeader1" colspan = "2"><h1>Testing the Optimization Process</h1></td></tr><tr><td class = "DocHeader4" colspan = "2"/></tr><tr><td class = "DocHeader3" colspan = "2"><table class = "DocThemeIntro" id = "table12"><tr><td class = "Intro1Only"><p class = "header"><p class = "abstract">
<span class = "shortdesc">
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. </span>

</p>
<p>This page discusses: </p><ul><li><a href = "#tso-c-usr-control-testOpt__tso-c-usr-control-testOpt-test1" id = "toc_rg" title = "">Test Level 1 </a></li><li><a href = "#tso-c-usr-control-testOpt__tso-c-usr-control-testOpt-test2" id = "toc_rg" title = "">Test Level 2 </a></li><li><a href = "#tso-c-usr-control-testOpt__tso-c-usr-control-testOpt-test3" id = "toc_rg" title = "">Test Level 3</a></li><li><a href = "#tso-c-usr-control-testOpt__tso-c-usr-control-testOpt-test4" id = "toc_rg" title = "">Test Level 4 </a></li></ul>
</p></td></tr></table></td></tr></table>





<div class = "body conbody">

<div class = "section" id = "tso-c-usr-control-testOpt__tso-c-usr-control-testOpt-test1"><h2 class = "title sectiontitle">Test Level 1 </h2>

<p>Test level 1 is called using the command</p>

<pre class = "codeblock">
<code class = "ph codeph">
tosca --job job_name --type test1
</code>
</pre>

<p>For the first test level, it is required that the following files exist:</p>

<ul class = "ul">
<li class = "li">a complete file with the commands for the optimization preprocessor (<code class = "ph codeph">*.par</code>). </li>
<li class = "li">a FE model (<code class = "ph codeph">*.ext</code>), that can be loaded in the optimization preprocessor using the command <code class = "ph codeph">FEM_INPUT</code>. </li>
</ul>

<p>The optimization is stopped after the optimization preprocessing is finished
and the database for the optimization has been created. The directory <code class = "ph codeph">jobname</code>
is created containing all files needed for loading of the input files and
creating the <span class = "ph">Tosca Structure</span> database.</p>
<p>If the test run has been finished correctly (output <code class = "ph codeph">TOSCA job finished</code>), it
means that the syntax of all necessary parameters is correct. If any
parameter is not defined correctly, this is logged as <code class = "ph codeph">ERROR</code> in the <code class = "ph codeph">TOSCA.OUT</code>
file located in the <code class = "ph codeph">TOSCA_POST</code> directory. The relevant comments can be found
there. The optimization will be stopped because of this.</p>
<p>In shape optimization, all restrictions can be checked using the
<code class = "ph codeph">TEST_SHAPE</code> command, which applies a virtual optimization displacement
to the design area.</p>
<p>In bead optimization, all restrictions as well as the direction of the resulting
beads can be checked using the <code class = "ph codeph">TEST_BEAD</code> command.</p>

<table class = "table"><caption/><colgroup><col/></colgroup><tbody class = "tbody">
<tr class = "row">
<td class = "entry"><br/><img class = "image" src = "../TsoUserImages/usr_control_7.png" width = "350"/><br/></td>
</tr>
</tbody></table>
</div>


<div class = "section" id = "tso-c-usr-control-testOpt__tso-c-usr-control-testOpt-test2"><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">Test Level 2 </h2>

<p>Test level 2 requires not only the files <code class = "ph codeph">*.par</code> and <code class = "ph codeph">*.ext</code> (as in test level 1), but
also the result file from a separate analysis produced by the relevant solver.
This file is saved in the start directory of the optimization job. The result file
must contain all the results needed for the optimization. </p>
<table class = "Remark" id = "table132"><tr><td class = "Remark"><span class = "run-in.important">Important:
				</span><span class = "notecontent">
<p>This test
level is not available for sensitivity-based topology optimization.</p></span></td></tr></table>

<p>In this test level, the first optimization step is carried out without a FE analysis.
The existing result file is copied to the working directory from the start
directory.</p>
<p>The optimization is stopped after the optimization module has been called
once and a modified analysis model for the relevant solver has been created.
The first optimized model, derived from the optimization model and the analysis
of the initial design, is generated with low CPU time. As no FE analysis is carried out at this test level, a saving of 70% to 90% in CPU time is achieved
compared with the time needed for a single optimization loop including a FE
analysis of large models.</p>

<table class = "table"><caption/><colgroup><col/></colgroup><tbody class = "tbody">
<tr class = "row">
<td class = "entry"><br/><img class = "image" src = "../TsoUserImages/usr_control_8.png" width = "350"/><br/></td>
</tr>
</tbody></table>

<p>In this way, several variations can be tested effectively (for example, different parameter
files such as <code class = "ph codeph">file1.par</code> and <code class = "ph codeph">file2.par</code>) using an analysis model with the
respective result file before the “real” optimization is started:</p>

<pre class = "codeblock">
<code class = "ph codeph">
tosca --job job_name --type test2 --opt file1.par
tosca --job job_name --type test2 --opt file2.par
</code>
</pre>

</div>


<div class = "section" id = "tso-c-usr-control-testOpt__tso-c-usr-control-testOpt-test3"><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">Test Level 3</h2>

<p>No finite element analysis must be completed previously in test level 3. After
the evaluation of the parameter file (<code class = "ph codeph">*.par</code>) and the finite element model by the
optimization preprocessor, the analysis file is calculated by the FE solver.</p>
<p>When a modified analysis model has been generated from one evaluation of
the preprocessing results and the FE results, the optimization is stopped. The
modified analysis model is not analyzed by the finite element solver at this
test level.</p>

<table class = "table"><caption/><colgroup><col/></colgroup><tbody class = "tbody">
<tr class = "row">
<td class = "entry"><br/><img class = "image" src = "../TsoUserImages/usr_control_9.png" width = "350"/><br/></td>
</tr>
</tbody></table>

<p>A possible call could be as follows:</p>

<pre class = "codeblock">
<code class = "ph codeph">
tosca --job job_name --type test3
</code>
</pre>

<table class = "Remark" id = "table132"><tr><td class = "Remark"><span class = "run-in.important">Important:
				</span><span class = "notecontent">
<p><ul class = "ul">
   <li class = "li">If the same analysis model is to be used several times for test level 3, it is
better to switch to test level 2. To do this, the result file of the FE analysis
must be copied into the start directory of the optimization from the
<code class = "ph codeph">SAVE.&lt;res_ext&gt;</code> directory and renamed as <code class = "ph codeph">&lt;modelname&gt;.&lt;res_ext&gt;</code>
(During saving in the optimization process, the result files are automatically
given an iteration number – this extension must be deleted from the file
name).</li>
   <li class = "li">This test level is not available for sensitivity-based topology optimization. </li>
</ul></p></span></td></tr></table>

</div>


<div class = "section" id = "tso-c-usr-control-testOpt__tso-c-usr-control-testOpt-test4"><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">Test Level 4 </h2>

<p>Test level 4 is an extension of test level 2. A result file must exist in the start
directory of the optimization job. This result file must contain all results
needed for the optimization.</p>
<p>In test level 4 and during the first iteration, the present result file is copied to
the working directory. The optimization continues as normal until convergence
has been achieved or a stop condition has been met.</p>
<p>Using this test level, the finite element analysis performed in the first iteration
of an optimization can be reused for a completely different optimization performed
on the same model. Because the results of the initial model are
always the same, the same result file can always be used and does not need
to be recalculated each time.</p>

<p>A possible call could be as follows:</p>

<pre class = "codeblock">
<code class = "ph codeph">
tosca --job job_name --type test4
</code>
</pre>

<table class = "table"><caption/><colgroup><col/></colgroup><tbody class = "tbody">
<tr class = "row">
<td class = "entry"><br/><img class = "image" src = "../TsoUserImages/usr_control_10.png" width = "350"/><br/></td>
</tr>
</tbody></table>

</div>

</div>

</td></tr></table><script type = "text/javascript" src = "../DSDocUI_Bottom34.js">/* */</script></body>
</html>
