<?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 = "abstract" content = "This example shows the usage of the SURF_TURN manufacturing constraint."/><meta name = "description" content = "This example shows the usage of the SURF_TURN manufacturing constraint."/><meta name = "DC.format" content = "HTML5"/><meta name = "DC.identifier" content = "tso-t-example-shape-sens-shaftSurfTurnOptimize"/><meta name = "DC.language" content = "en"/><link rel = "stylesheet" type = "text/css" href = "../DSDocUI_XML34.css"/><title>Optimizing the Shaft Model</title>
<script type = "text/javascript" src = "../DSDocUI_Highlight34.js">
  	/* */
  	</script></head><body onLoad = "highlightSearchTerms();" id = "tso-t-example-shape-sens-shaftSurfTurnOptimize">
<a name = "hj-top"> </a><table class = "table1" id = "table11"><tr><td><table class = "DocHeader"><tr><td class = "DocHeader1" colspan = "2"><h1>Optimizing the Shaft 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 = "header"><p class = "abstract">
<span class = "shortdesc">This example shows the usage of the SURF_TURN manufacturing constraint.</span>

</p>

</p></td></tr></table></td></tr></table>




<div class = "body taskbody">
<section><ol class = "ol steps"><li class = "li step stepexpand">
        Define input data, additional groups, and design variables.
        <div class = "itemgroup stepresult">
          <pre class = "codeblock">
FEM_INPUT
  ID_NAME        = MY_INPUT_FILES
  FILE           = shaft_surfturn_sens.inp
END_

include, shaft_surfturn_sens.inc

GROUP_DEF
  ID_NAME        = NODES_FOR_DISP
  TYPE           = NODE
  FORMAT         = LIST
  LIST_BEGIN
  13, 440
END_

DV_SHAPE
  ID_NAME        = MY_DV_SHAPE
  ND_GROUP       = design_nodes
END_
</pre>
        </div>
      </li><li class = "li step stepexpand">
Create geometric constraints.
<ol type = "a" class = "ol substeps">
<li class = "li substep">
Rotational Symmetry (SURF_TURN):
<div class = "itemgroup stepresult">
<pre class = "codeblock">
LINK_SHAPE
  ID_NAME        = LS_TURN
  CLIENT         = SURF_TURN
  MAIN         = AUTO
  CLIENT_DIR     = 0, 1, 0
  CS             = CS_0
END_

DVCON_SHAPE
  ID_NAME        = DVCON_SHAPE_SURF_TURN
  CHECK_BC       = NO
  ND_GROUP       = design_nodes
  CHECK_LINK     = LS_TURN
END_
</pre>
</div>
</li>

<li class = "li substep">
Node fixations:
<div class = "itemgroup stepresult">
<pre class = "codeblock">
CS_DEF
  ID_NAME        = MY_CS
  DEF_TYPE       = LOCAL
  CS_TYPE        = CYLINDRICAL
  CS_REF         = CS_0
  ORIGIN_123     = 0, 0, 0
  ROTATION_321   = 0, 0, 270
END_

DVCON_SHAPE
  ID_NAME        = DVCON_SHAPE_FIXED
  CHECK_BC       = NO
  ND_GROUP       = nodes_fixed
  CHECK_DOF      = MY_CS, FIX , FREE, FREE
END_
</pre>
</div>
</li>

<li class = "li substep">
Shrink control:
<div class = "itemgroup stepresult">
<pre class = "codeblock">
DVCON_SHAPE
  ID_NAME        = SHRINK_CTRL
  CHECK_SHRINK   = 3.
  ND_GROUP       = design_nodes
END_
</pre>
</div>
</li>

</ol>
</li><li class = "li step stepexpand">
Create a constraint for the volume. 
<ol type = "a" class = "ol substeps">
<li class = "li substep">
Define a Design Response with the volume (DRESP):
<div class = "itemgroup stepresult">
<pre class = "codeblock">
DRESP
 ID_NAME    = DRESP_VOLUME
 LIST       = NO_LIST
 DEF_TYPE   = SYSTEM
 EL_GROUP   = ALL_ELEMENTS
 TYPE       = VOLUME
 UPDATE     = EVER
 GROUP_OPER = Sum
END_
</pre>
</div>
</li>
<li class = "li substep">
Reference the Design Response in a constraint (CONSTRAINT) and constrain it to 100%.
<div class = "itemgroup stepresult">
<pre class = "codeblock">
CONSTRAINT
 ID_NAME   = VOLUME_CONSTRAINT
 DRESP     = DRESP_VOLUME
 MAGNITUDE = REL
 LE_VALUE  = 1.0
END_
</pre>
</div>
</li>
</ol>
</li><li class = "li step stepexpand">
To define the Objective Function (OBJ_FUNC) for the plastic equivalent magnitude (PEMAG)
in the second <span class = "ph">load case</span>, do the following:
<ol type = "a" class = "ol substeps">
<li class = "li substep">
Create a Design Response (DRESP).
<div class = "itemgroup stepresult">
<pre class = "codeblock">
DRESP
 ID_NAME  = DRESP_PEMAG
 DEF_TYPE = SYSTEM
 TYPE     = PEMAG
 EL_GROUP = ALL_ELEMENTS
END_
</pre>
</div>
</li>
<li class = "li substep">
Define the objective function.
<div class = "itemgroup stepresult">
<pre class = "codeblock">
OBJ_FUNC
 ID_NAME = OBJ_FUNCTION
 TARGET  = MIN
 DRESP   = DRESP_PEMAG
END_
</pre>
</div>
</li>
</ol>
</li><li class = "li step stepexpand">
Design responses and optimization functions
<div class = "itemgroup stepresult">
<pre class = "codeblock">
DRESP
  ID_NAME    = VOLUME
  DEF_TYPE   = SYSTEM
  TYPE       = VOLUME
  EL_GROUP   = ALL_ELEMENTS
END_

DRESP
  ID_NAME    = DISPLACEMENT_X
  DEF_TYPE   = SYSTEM
  TYPE       = DISP_X_ABS
  ND_GROUP   = NODES_FOR_DISP
  GROUP_OPER = Max
  CS_REF     = CS_0
END_

DRESP
  ID_NAME    = DISPLACEMENT_Z
  DEF_TYPE   = SYSTEM
  TYPE       = DISP_Z_ABS
  ND_GROUP   = NODES_FOR_DISP
  GROUP_OPER = Max
  CS_REF     = CS_0
END_

OBJ_FUNC
  ID_NAME    = MY_OBJ_FUNC
  TARGET     = MINMAX
  DRESP      = DISPLACEMENT_X, ,
  DRESP      = DISPLACEMENT_Z, ,
END_

CONSTRAINT
  ID_NAME    = VOLUME_CONSTRAINT
  MAGNITUDE  = REL
  DRESP      = VOLUME
  LE_VALUE   = 1.0
END_
</pre>
</div>
</li><li class = "li step stepexpand">
Mesh regularization
<div class = "itemgroup stepresult">
<pre class = "codeblock">
MESH_SMOOTH
  ID_NAME             = MY_MESH_SMOOTH
  CORRECT_ELEMENTS    = YES
  FREE_SF             = FREE
  MS_LAYER            = design_nodes, 4
  FREEZE_DESIGN_NODES = YES
END_
</pre>
</div>
</li><li class = "li step stepexpand">
Reference the Design Variables, Objective Function, and Constraints as well as DVCONs in
the OPTIMIZE command.
<div class = "itemgroup stepresult">
<pre class = "codeblock">
OPTIMIZE
  ID_NAME        = MY_OPTIMIZATION_TASK
  OBJ_FUNC       = MY_OBJ_FUNC
  DV             = MY_DV_SHAPE
  CONSTRAINT     = VOLUME_CONSTRAINT
  STRATEGY       = SHAPE_SENSITIVITY
  DVCON          = DVCON_SHAPE_SURF_TURN
  DVCON          = DVCON_SHAPE_FIXED
  DVCON          = SHRINK_CTRL
  MESH_SMOOTH    = MY_MESH_SMOOTH
END_
</pre>
</div>
</li><li class = "li step stepexpand">
Set stop condition.
<div class = "itemgroup stepresult">
<pre class = "codeblock">
STOP
  ID_NAME        = MY_STOP
  ITER_MAX       = 150
END_
</pre>
</div>
</li></ol></section>
<p class = "result">
<p>The optimization result looks as follows:<br/><img class = "image" src = "../TsoExampleImages/tso-t-example-shape-sens-shaftSurfTurnOptimize_result.png" width = "454"/><br/></p>
</p>
</div>

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