<?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 theoretical background of the sensitivity-based shape optimization approach is briefly discussed."/><meta name = "description" content = "The theoretical background of the sensitivity-based shape optimization approach is briefly discussed."/><meta name = "DC.format" content = "HTML5"/><meta name = "DC.identifier" content = "tso-c-usr-shape-optTaskSens"/><meta name = "DC.language" content = "en"/><link rel = "stylesheet" type = "text/css" href = "../DSDocUI_XML34.css"/><title>Sensitivity-Based Shape Optimization</title>
<script type = "text/javascript" src = "../DSDocUI_Highlight34.js">
  	/* */
  	</script><script type = "text/javascript" src = "../MathJax/MathJax.js?config=DS-default,local/local">
  		/* */
  		</script></head><body onLoad = "highlightSearchTerms();" id = "tso-c-usr-shape-optTaskSens">
<a name = "hj-top"> </a><table class = "table1" id = "table11"><tr><td><table class = "DocHeader"><tr><td class = "DocHeader1" colspan = "2"><h1>Sensitivity-Based Shape Optimization</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 theoretical background of the sensitivity-based shape optimization approach is
briefly discussed. </span>

</p>
<p>This page discusses: </p><ul><li><a href = "#tso-c-usr-shape-optTaskSens__tso-c-usr-shape-optTask-algorthm" id = "toc_rg" title = "">Sensitivities</a></li><li><a href = "#tso-c-usr-shape-optTaskSens__tso-c-usr-shape-optTaskSens-semiAnalyticalSens" id = "toc_rg" title = "">Semi-Analytical Sensitivity Calculation</a></li></ul>
</p></td></tr></table></td></tr></table>




<div class = "body conbody">
<div class = "section" id = "tso-c-usr-shape-optTaskSens__tso-c-usr-shape-optTask-algorthm"><h2 class = "title sectiontitle">Sensitivities</h2>

<p>The sensitivity is gradient information of a design response (DRESP). The calculation of
                sensitivities can be done by various methods (for example, global finite difference,
                direct, and adjoint). For SENS_CALC_MODE = TOSCA, semianalytical adjoint
                sensitivities are calculated. </p>
</div>


<div class = "section" id = "tso-c-usr-shape-optTaskSens__tso-c-usr-shape-optTaskSens-semiAnalyticalSens"><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">Semi-Analytical Sensitivity Calculation</h2>
  
  <p>
    The sensitivity-based algorithm uses semi-analytical sensitivities based
    on a finite difference of the stiffness and mass element matrices:
  </p>
  <p>
    <span class = "ph inlineequation"><math class = "- topic/foreign "><mrow class = "- topic/foreign "><mfrac class = "- topic/foreign "><mrow class = "- topic/foreign "><mo class = "- topic/foreign ">∂</mo><mi class = "- topic/foreign ">K</mi></mrow><mrow class = "- topic/foreign "><mo class = "- topic/foreign ">∂</mo><mi class = "- topic/foreign ">x</mi></mrow></mfrac><mo class = "- topic/foreign ">≈</mo><mi class = "- topic/foreign ">Δ</mi><msup class = "- topic/foreign "><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">K</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">*</mi></mrow></msup><mo class = "- topic/foreign ">=</mo><mi class = "- topic/foreign ">Δ</mi><mi class = "- topic/foreign ">K</mi><mo class = "- topic/foreign ">+</mo><msup class = "- topic/foreign "><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">α</mi></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">j</mi><mi class = "- topic/foreign ">k</mi></mrow></msup><mtext class = "- topic/foreign ">with</mtext><mi class = "- topic/foreign ">Δ</mi><mi class = "- topic/foreign ">K</mi><mo class = "- topic/foreign ">=</mo><mfrac class = "- topic/foreign "><mrow class = "- topic/foreign "><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">K</mi></mrow><mrow class = "- topic/foreign "><mn class = "- topic/foreign ">0</mn><mo class = "- topic/foreign ">+</mo><mi class = "- topic/foreign ">p</mi></mrow></msub><mo class = "- topic/foreign ">-</mo><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">K</mi></mrow><mrow class = "- topic/foreign "><mn class = "- topic/foreign ">0</mn></mrow></msub></mrow><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">Δ</mi><mi class = "- topic/foreign ">x</mi></mrow></mfrac></mrow></math></span>
  </p>
  <p>
    Where K is the stiffness matrix, <span class = "ph inlineequation"><math class = "- topic/foreign "><mrow class = "- topic/foreign "><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">K</mi></mrow><mrow class = "- topic/foreign "><mn class = "- topic/foreign ">0</mn></mrow></msub></mrow></math></span>
    is the original matrix and <span class = "ph inlineequation"><math class = "- topic/foreign "><mrow class = "- topic/foreign "><msub class = "- topic/foreign "><mrow class = "- topic/foreign "><mi class = "- topic/foreign ">K</mi></mrow><mrow class = "- topic/foreign "><mn class = "- topic/foreign ">0</mn><mo class = "- topic/foreign ">+</mo><mi class = "- topic/foreign ">p</mi></mrow></msub></mrow></math></span>
    is the perturbed matrix when one of the nodes is moved. The first term in the
    above equation is necessary to calculate the sensitivity for most of the design
    responses that are available in
    <span class = "ph">Tosca Structure.bead</span>.
   To get this term, we utilize a "matrix-step" (see figure below). 
  </p>

  <table class = "table" id = "tso-c-usr-shape-optTaskSens__d126e138"><caption/><colgroup><col/></colgroup><tbody class = "tbody">
        <tr class = "row">
          <td class = "entry">
            <br/><img class = "image" height = "232" src = "../TsoUserImages/bead_optimization_loop.png" width = "449"/><br/>
          </td>
        </tr>
      </tbody></table>

  <p>
    This matrix step's only purpose is to perturb all design nodes to get these perturbed matrices
    - the original matrix is obtained in the last perturbation (PERTURBATION = 0) where also the
    results of the FE-problem are wanted.
  </p>
  <p>
    To avoid too long optimization run times, it is important to understand this workflow. It has
    two potential pitfalls that might slow the optimization tremendously:
  </p>
  <ol class = "ol">
    <li class = "li">
      Too long calculation during matrix steps
    </li>
    <li class = "li">
      Too many pseudo loads
    </li>
  </ol>
  <ol class = "ol">
    <li class = "li">
      The first case is discussed in more detail in the chapters concerning
      the specific solvers. But in short, the problem is that some solvers have no
      possibility of only writing the element matrices without solving the whole
    system. The number of matrix steps usually varies between 4-8 which in the worst
      case leads to 9 full solvers runs every iteration.
    </li>
    <li class = "li">
      The second case is a mutual problem with almost every sensitivity-based
      optimization algorithm; using the adjoint method to calculate sensitivities one
      must solve the adjoint problems. The adjoint problems are added as "pseudo
      loads" or extra
      <span class = "ph">load cases</span>
      which are added to the original input file. The number of these pseudo loads
      depends on the types of design responses and how they are defined.
    </li>
  </ol>
  <p>
    It would demand a lengthy discussion to explain in detail exactly when and why which loads are
    added but some guidelines are given here:
  </p>
  <ul class = "ul">
    <li class = "li">
      Compliance and eigenvalue optimization do not add pseudo loads (self-adjoint problems) and
      are therefore preferable optimization quantities.
    </li>
    <li class = "li">
      Avoid the <code class = "ph codeph">DRESP</code>s without any direction (for example, DISP_ABS). These design
      responses lead to three pseudo loads (in all 3 dimensions) whereas the single directional
      (DISP_X, DISP_X_ABS, DISP_Y, etc.) only lead to one pseudo load.
      
    </li>
    <li class = "li">
      Define the
      <span class = "ph">load case</span>
      of interest directly in the
      <code class = "ph codeph">DRESP</code> definition using
      <code class = "ph codeph">LC_SET</code>. If only one
      <span class = "ph">load case</span>
      is referenced
      <span class = "ph">Tosca Structure</span>
      will only add one pseudo load. If LC_SET = ALL,ALL,ALL (which is default!)
      <span class = "ph">Tosca Structure</span>
      will add a pseudo load for each
      <span class = "ph">load case</span>
      found in the original input file.
    </li>
  </ul>
</div>

</div>

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