<?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 = "task"/><meta name = "description" content = "This example shows a more general optimization setup using sensitivity-based algorithms for shape optimization. Thus, the volume can be minimized considering as well stress and frequency constraints."/><meta name = "DC.format" content = "HTML5"/><meta name = "DC.identifier" content = "tso-t-example-shape-sens-CraneHookOptimize"/><meta name = "DC.language" content = "en"/><link rel = "stylesheet" type = "text/css" href = "../DSDocUI_XML34.css"/><title>Optimizing the Crane Hook Model</title>
<script type = "text/javascript" src = "../DSDocUI_Highlight34.js">
  	/* */
  	</script></head><body onLoad = "highlightSearchTerms();" id = "tso-t-example-shape-sens-CraneHookOptimize">
<a name = "hj-top"> </a><table class = "table1" id = "table11"><tr><td><table class = "DocHeader"><tr><td class = "DocHeader1" colspan = "2"><h1>Optimizing the Crane Hook Model</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 = "shortdesc">This example shows a more general optimization setup using sensitivity-based algorithms
  for shape optimization. Thus, the volume can be minimized considering as well stress and frequency
  constraints. 
</p></td></tr></table></td></tr></table>



<div class = "body taskbody">
<section><ol class = "ol steps"><li class = "li step stepexpand">
Load the input files with the FEM_INPUT command.
</li><li class = "li step stepexpand">
Define the Design Area (DV_SHAPE):
<div class = "itemgroup stepresult">
<pre class = "codeblock">
DV_SHAPE  
 ID_NAME  = MY_DV_SHAPE  
 ND_GROUP  = design_nodes
END_
</pre>
<div class = "note"><span class = "run-in.note">Note:
			</span><span class = "notecontent">If you are using <span class = "ph">MSC Nastran®</span>, the group is defined as <span class = "ph uicontrol">set 1</span> of the file <span class = "ph filepath filepath">cranehook_groups.bdf</span> and can be loaded into <span class = "ph">Tosca Structure.gui</span>in the command GROUP_DEF.</span></div>

</div>
</li><li class = "li step stepexpand">
Define the elements for mesh smoothing (MESH_SMOOTH):
<div class = "itemgroup stepresult">
<pre class = "codeblock">
MESH_SMOOTH  
 ID_NAME        = MY_MESH_SMOOTH  
 EL_GROUP       = mesh_smooth_elem  
 CORRECT_ELEMENTS = YES  
 FREE_SF        = FREE
END_
</pre>
<p>All free surface nodes might remain free.</p>
</div>
</li><li class = "li step stepexpand">
To constrain the node displacement to 10, define a Design Variable Constraint (DVCON_SHAPE):
<div class = "itemgroup stepresult">
<pre class = "codeblock">
DVCON_SHAPE  
 ID_NAME        = DVCON_LIMIT    
 CHECK_BC       = NO  
 ND_GROUP       = design_nodes   
 CHECK_GROW     = 10  
 CHECK_SHRINK   = 10
END_
</pre>
</div>
</li><li class = "li step stepexpand">
To consider the boundary conditions for the node displacement, define a second Design Variable Constraint (DVCON_SHAPE): 
<div class = "itemgroup stepresult">
<pre class = "codeblock">
DVCON_SHAPE  
 ID_NAME        = DVCON_BC
 CHECK_BC       = YES  
 ND_GROUP       = design_nodes
END_
</pre>
</div>
</li><li class = "li step stepexpand">
     To constrain the volume, define a Design Response (DRESP) that references the volume of
     all elements: 
    <div class = "itemgroup stepresult">
     <pre class = "codeblock">
DRESP  
 ID_NAME        = DRESP_VOLUME 
 DEF_TYPE       = SYSTEM  
 TYPE           = VOLUME  
 EL_GROUP       = ALL_ELEMENTS
END_
</pre>
    </div>
   </li><li class = "li step stepexpand">
Define an Objective Function (OBJ_FUNC) that references the Design Response and sets the target to MIN:
<div class = "itemgroup stepresult">
<pre class = "codeblock">
OBJ_FUNC  
 ID_NAME        = MINIMIZE_VOLUME  
 TARGET         = MIN  
 DRESP          = DRESP_VOLUME, ,  
END_
</pre>
</div>
</li><li class = "li step stepexpand">
To define the stress constraint, do the following;
<ol type = "a" class = "ol substeps">
<li class = "li substep">
Create a Design Response (DRESP) for the maximum von Mises stresses of the <span class = "ph uicontrol">STRESS_NODES</span> node group.
<div class = "itemgroup stepresult">
<pre class = "codeblock">
DRESP  
 ID_NAME        = DRESP_MAX_MISES  
 DEF_TYPE       = SYSTEM  
 TYPE           = SIG_MISES  
 ND_GROUP       = STRESS_NODES  
 LC_SET         = STATIC,1,All
END_
</pre>
</div>
</li>
<li class = "li substep">
Reference the Design Response in a constraint (CONSTRAINT), set a relative value of 90% and the constraint type to less or equal:
<div class = "itemgroup stepresult">
<pre class = "codeblock">
CONSTRAINT  
  ID_NAME        = CONSTRAINT_stress  
  MAGNITUDE      = REL  
  DRESP          = DRESP_MAX_MISES    
  LE_VALUE       = 0.9
END_
</pre>
</div>
</li>
</ol>
</li><li class = "li step stepexpand">
To constrain the frequency, do the following:
<ol type = "a" class = "ol substeps">
<li class = "li substep">
Create a Design Response (DRESP) with an Eigenmode of 5:
<div class = "itemgroup stepresult">
<pre class = "codeblock">
DRESP  
 ID_NAME        = DRESP_FREQ  
 DEF_TYPE       = SYSTEM  
 TYPE           = DYN_FREQ  
 LC_SET         = ALL,10001,5
END_
</pre>
</div>
</li>
<li class = "li substep">
Reference the Design Response in a constraint (CONSTRAINT) and set a
relative value of 110% and the constraint type to greater or
equal:
<div class = "itemgroup stepresult">
<pre class = "codeblock">
CONSTRAINT  
 ID_NAME        = CONSTRAINT_freq    
 MAGNITUDE      = REL  
 DRESP          = DRESP_FREQ  
 GE_VALUE       = 1.1
END_
</pre>
</div>
</li>
</ol>
</li><li class = "li step stepexpand">
Reference the Design Variables, Objective Function, constraints and the mesh smoothing in the OPTIMIZE command:
<div class = "itemgroup stepresult">
<pre class = "codeblock">
OPTIMIZE  
 ID_NAME        = SHAPE_OPTIMIZATION  
 OBJ_FUNC       = MINIMIZE_VOLUME  
 DV             = MY_DV_SHAPE  
 DVCON          = DVCON_LIMIT  
 DVCON          = DVCON_BCC  
 CONSTRAINT     = CONSTRAINT_stress  
 CONSTRAINT     = CONSTRAINT_freq  
 MESH_SMOOTH    = MY_MESH_SMOOTH  
 STRATEGY       = SHAPE_SENSITIVITY
END_
</pre>
<p>Make sure you chose the SHAPE_SENSITIVITY strategy.</p>
</div></li></ol></section>
<p class = "result">
The result looks as follows:<br/><img class = "image" src = "../TsoExampleImages/sensShapeCraneHookResult.png" width = "500"/><br/>
</p>
</div>

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