<?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 = "The Tosca Structure preprocessor can read ANSYS® input files of arbitrary format, however, the ANSYS® input files must be able to be processed in batch mode."/><meta name = "description" content = "The Tosca Structure preprocessor can read ANSYS® input files of arbitrary format, however, the ANSYS® input files must be able to be processed in batch mode."/><meta name = "DC.format" content = "HTML5"/><meta name = "DC.identifier" content = "tso-c-usr-solver-ansys-files"/><meta name = "DC.language" content = "en"/><link rel = "stylesheet" type = "text/css" href = "../DSDocUI_XML34.css"/><title>Files and Formats</title>
<script type = "text/javascript" src = "../DSDocUI_Highlight34.js">
  	/* */
  	</script></head><body onLoad = "highlightSearchTerms();" id = "tso-c-usr-solver-ansys-files">
<a name = "hj-top"> </a><table class = "table1" id = "table11"><tr><td><table class = "DocHeader"><tr><td class = "DocHeader1" colspan = "2"><h1>Files and Formats</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">The <span class = "ph">Tosca Structure</span>
preprocessor can read <span class = "ph">ANSYS®</span>
input files of arbitrary format, however, the <span class = "ph">ANSYS®</span>
input files must be able to be processed in batch mode.</span>

</p>
<ul><li><a href = "#tso-c-usr-solver-ansys-files__tso-c-usr-solver-ansys-files-opt" id = "toc_rg" title = ""><span class = "ph">ANSYS®</span>
Files Generated during a <span class = "ph">Tosca Structure</span>
Optimization</a></li></ul>
</p></td></tr></table></td></tr></table>




<div class = "body conbody">
<p>The <span class = "ph">ANSYS®</span>
input file can be created by an arbitrary FE-Preprocessor. In <span class = "ph">ANSYS®</span>,
the <code class = "ph codeph">CDB</code> file is created with the following command:</p>
<pre class = "codeblock"><code class = "ph codeph">CDWRITE, Option, Fname, Ext, Dir, Fnamei, Exti, Fmat</code></pre> 
<p>At least one Solve-Command has always to be specified: <code class = "ph codeph">solve</code>
or <code class = "ph codeph">lssolve</code>.</p>
<p>To check, if the input file is executable in batch mode, one analysis
should be performed in batch mode from the command line before starting
the complete optimization. The corresponding batch call of <span class = "ph">ANSYS®</span>
version 14.0 on <span class = "ph">Windows</span> is as following:</p>
<pre class = "codeblock"><code class = "ph codeph">Ansys140 -b -i&lt;input file&gt; -o&lt;output file&gt; -p&lt;productvar&gt;
</code></pre>
<p>Error messages and warnings can be found in the *.err file. The input
file must be corrected if an error occurs.</p>
<p>As input an file for the optimization loop, <code class = "ph codeph">TOSCA_PREP</code>
generates an <span class = "ph">ANSYS®</span>
<code class = "ph codeph">CDB</code> file from the <span class = "ph">ANSYS®</span>
input file. Compared to a complete <span class = "ph">ANSYS®</span>
input file this file contains no solution strategy (/SOLU).</p>
<p>During the optimization procedure, the analysis results are read from
the <code class = "ph codeph">*.rst</code> file. </p>
<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">The <span class = "ph">ANSYS®</span>
interface will stop reading element and node definitions when the first
<code class = "ph codeph">/SOLU </code>definition in the input file occurs. Elements
that are defined after the first<code class = "ph codeph"> /SOLU</code> (usually elements
and nodes generated by macros) are not known in <span class = "ph">Tosca Structure</span>.
In return, this allows for more possibilities of using macros and <code class = "ph codeph">/PREP7</code>
sections after a<code class = "ph codeph"> /SOLU</code> definition. Most definitions
after <code class = "ph codeph">/SOLU</code> are not modified by the interface. </li>
<li class = "li">For a topology optimization with the controller algorithm using static
finite element analysis, which contains only solid elements, the iterative
<code class = "ph codeph">PCG</code> Solver of <span class = "ph">ANSYS®</span>
should be used due to performance reasons. The solver might be activated
by adding the following command in the solution block of the corresponding
<code class = "ph codeph">CDB</code> file: <pre class = "codeblock">            eqsl, pcg, 1.e-5
</pre></li>
<li class = "li">The iterative solver is not recommended for sensitivity-based optimizations.</li>
<li class = "li">It is not allowed to define new nodes or elements after the first
<code class = "ph codeph">/SOLU</code> statement. (The solution part is cut off the .cdb
file before the <span class = "ph">ANSYS®</span>
Preprocessing-run.)</li>
<li class = "li">In <span class = "ph">Tosca Structure</span>
configuration file<code class = "ph codeph"> tosca_ctrl.cfg</code> (see also <code class = "ph codeph">CONFIG</code>)
the environment variable <code class = "ph codeph">ANSWAIT=1 </code>will be set, to let
<span class = "ph">ANSYS®</span>
wait for a free license. </li>
<li class = "li">In earlier versions of the <span class = "ph">ANSYS®</span>
interface, for shape and bead optimization the positions of nodes used
to be modified using the special command <code class = "ph codeph">NMODIF</code>.
This prevented the user from visually inspecting the modified state
of the model. The interface now modifies directly the coordinates of
the nodes.</li>
</ul></p></span></td></tr></table>

<div class = "section" id = "tso-c-usr-solver-ansys-files__tso-c-usr-solver-ansys-files-opt"><h2 class = "title sectiontitle"><span class = "ph">ANSYS®</span>
Files Generated during a <span class = "ph">Tosca Structure</span>
Optimization</h2>


<p>During the optimization preprocessing the <span class = "ph">ANSYS®</span>
model will be imported to <span class = "ph">ANSYS®</span>
and exported again to generate a standard blocked <code class = "ph codeph">CDB</code>
file. During this import/export step, all macros in the <span class = "ph">ANSYS®</span>
input file will be executed in <span class = "ph">ANSYS®</span>
and can no longer be found as macros in the input files used during the
<span class = "ph">Tosca Structure</span>
optimization.</p>
<ul class = "ul">
<li class = "li">The input file (<code class = "ph codeph">model.cdb</code>) is split into multiple
files during the optimization preprocessing (<code class = "ph codeph">TOSCA_PREP</code>):
<ul class = "ul"><li class = "li"><code class = "ph codeph">model_ans.cdb</code> input file without solution <code class = "ph codeph">/SOLU</code></li>
<li class = "li"><code class = "ph codeph">model_ans.head</code> file containing the <span class = "ph">ANSYS®</span>
Header</li>
<li class = "li"><code class = "ph codeph">model_ans.solu</code> file containing the <span class = "ph">ANSYS®</span>
Solution <code class = "ph codeph">/SOLU</code>. Eventually, existing <span class = "ph">load case</span>
files <code class = "ph codeph">*.s0X</code> are copied into the optimization working
directory. These remain unchanged during the optimization process. </li>
<li class = "li"><code class = "ph codeph">model_ans.tosca</code> temporary file, which is used for
the generation of the model_ans.cdb file </li>
</ul>
</li>
<li class = "li">Two files are generated during the <code class = "ph codeph">fem_modif</code> call:
<ul class = "ul"><li class = "li"><code class = "ph codeph">model_&lt;iter&gt;.ans</code></li>
<li class = "li"><code class = "ph codeph">model_&lt;iter&gt;.cdb</code>. The <code class = "ph codeph">CDB</code> file
is included in the ans file using a <code class = "ph codeph">CDREAD </code>The <code class = "ph codeph">model&lt;iter&gt;.ans</code>
file is renamed into <code class = "ph codeph">model.ans</code> before the finite element
analysis is executed. The <code class = "ph codeph">CDB</code> file is not renamed -
it is referenced with the iteration extension in the <code class = "ph codeph">ans</code> file.</li>
</ul>
</li>
<li class = "li">Two files are moved in the corresponding <code class = "ph codeph">SAVE</code> directory:
<ul class = "ul"><li class = "li"><code class = "ph codeph">model.ans</code>: is copied (<code class = "ph codeph">copy_solver_info_list</code>) into the
corresponding <code class = "ph codeph">SAVE</code> directory and gets an iteration
counter number before the finite element analysis is executed. </li>
<li class = "li"><code class = "ph codeph">model_&lt;iter&gt;.cdb</code>:
is moved (<code class = "ph codeph">move_per_iter_xxx_list</code>) into the corresponding
<code class = "ph codeph">SAVE</code> directory at the end of the design cycle. </li></ul>
</li>
<li class = "li">The newly created <code class = "ph codeph">CDB</code> file in blocked format is detected and analyzed
automatically by the optimization preprocessor. Thus, the FE model is
imported into <span class = "ph">Tosca Structure</span>.
The data of the <span class = "ph">ANSYS®</span>
model (coordinates of nodes, materials, properties, and assignment of
elements) in the <code class = "ph codeph">CDB</code> file can be modified during the
optimization. The load files contain the boundary restrictions, which
provide information about boundary movements for shape optimization.
</li>
<li class = "li">The solve section contains the solution strategy of the original
input file, checks, and the definition of which kind of results must be
written to the <code class = "ph codeph">*.rst</code> files for shape and topology optimization,
respectively. Thus, during the <span class = "ph">ANSYS®</span>
analysis only the results necessary for the optimization are written
to the result file.</li>
<li class = "li">During the optimization the data in the <code class = "ph codeph">CDB</code> file
is modified. Afterwards the three parts are merged and a new <span class = "ph">ANSYS®</span>
analysis is performed. The load files are not changed during the optimization.</li>
</ul>
</div>

</div>

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