User Tools

Site Tools


wiki:sns:sns2014:perform_geometry_optimization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:sns:sns2014:perform_geometry_optimization [2017/07/14 13:56] clairewiki:sns:sns2014:perform_geometry_optimization [2017/07/17 10:51] (current) claire
Line 2: Line 2:
 {{TOC:wide}} {{TOC:wide}}
 \\ \\
-=====Performing geometry optimization with SnSScript=====+======Performing geometry optimization with SnSScript======
 This document highlights one of the powerful possibilities that Scan&Solve has to offer:  geometry optimization.  Essentially, the following process will be automated: This document highlights one of the powerful possibilities that Scan&Solve has to offer:  geometry optimization.  Essentially, the following process will be automated:
  
Line 23: Line 23:
 Try it now!  You can copy the following script into a file name of your choosing, with the .rvb file extension, and then run this script in a new Rhino document.  Make sure to choose the Centimeters unit system in order to get the same results as below. Try it now!  You can copy the following script into a file name of your choosing, with the .rvb file extension, and then run this script in a new Rhino document.  Make sure to choose the Centimeters unit system in order to get the same results as below.
  
-{{ cyllinder_optimization_script.rvb }}+{{ :cyllinder_optimization_script.rvb }}
  
 Download the above file and run using Rhinoscript.  It will generate the same results seen below. Download the above file and run using Rhinoscript.  It will generate the same results seen below.
Line 33: Line 33:
 In this example, we will find the optimum load direction for a given solid geometry.  We will consider an angle iron made of steel, fixed at one end, with a bending load applied to one end.  The bending load will be a vector quantity with a direction, and will initially point in the x-direction.  We want to vary the direction of the load in the x-y plane to find the direction (angle) that produces the smallest and largest deflections. In this example, we will find the optimum load direction for a given solid geometry.  We will consider an angle iron made of steel, fixed at one end, with a bending load applied to one end.  The bending load will be a vector quantity with a direction, and will initially point in the x-direction.  We want to vary the direction of the load in the x-y plane to find the direction (angle) that produces the smallest and largest deflections.
  
-{{ optimization_angle_iron.png?400 }}+{{ :optimization_angle_iron.png?400 }}
  
 This process is essentially the same as finding an object's maximum and minimum cross sectional moment's of inertia about a changing axis.  For the angle iron cross section, we expect the minimum moment of inertia to occur along it's axis of symmetry, and the maximum to be located 90 degrees away from the axis of symmetry.  To find the orientation with the lowest deflection, the following script will use a golden section algorithm. This process is essentially the same as finding an object's maximum and minimum cross sectional moment's of inertia about a changing axis.  For the angle iron cross section, we expect the minimum moment of inertia to occur along it's axis of symmetry, and the maximum to be located 90 degrees away from the axis of symmetry.  To find the orientation with the lowest deflection, the following script will use a golden section algorithm.
Line 39: Line 39:
 The golden search algorithm is similar in structure to the binary search (or half-interval search).  However, the golden search uses roughly half the computational resources per iteration, because only one of the two interior values need be re-evaluated.  Check out the script below: The golden search algorithm is similar in structure to the binary search (or half-interval search).  However, the golden search uses roughly half the computational resources per iteration, because only one of the two interior values need be re-evaluated.  Check out the script below:
  
-{{ optimization_golden_section.rvb |Golden Section Optimization Script }}+{{ :optimization_golden_section.rvb |Golden Section Optimization Script }}
  
 The above script can be edited in RhinoEdit.  As written, the script is set to find the angle which causes minimum displacement.  However, the algorithm can be changed to find maximum displacement by reversing the sign of the optimization function.  In this case, the optimization function is the function defined in the script **totalDisplacement**. So, multiplying the output of the function by **-1** will cause the script to produce the angle causing **maximum** displacement. The above script can be edited in RhinoEdit.  As written, the script is set to find the angle which causes minimum displacement.  However, the algorithm can be changed to find maximum displacement by reversing the sign of the optimization function.  In this case, the optimization function is the function defined in the script **totalDisplacement**. So, multiplying the output of the function by **-1** will cause the script to produce the angle causing **maximum** displacement.
Line 45: Line 45:
 Not only can the script be modified to search for both maximum and minimum locations, but the script could also be changed and used for any general, [[https://en.wikipedia.org/wiki/Unimodality#Unimodal_function|unimodal]] optimization problem.  The optimization function, input parameters, geometry specification, restraints and loads would all need to be modified, but the core golden section algorithm could be re-used.  Not only can the script be modified to search for both maximum and minimum locations, but the script could also be changed and used for any general, [[https://en.wikipedia.org/wiki/Unimodality#Unimodal_function|unimodal]] optimization problem.  The optimization function, input parameters, geometry specification, restraints and loads would all need to be modified, but the core golden section algorithm could be re-used. 
 =====References===== =====References=====
-[[http://www.intact-solutions.com/snsscript_documents/index.htm|Scan&Solve Scripting Documentation]]+[[wiki:sns:snsscript:scan_solve_script|Scan&Solve Script]]
  
 [[http://wiki.mcneel.com/developer/rhinoscript|RhinoScript Wiki]] [[http://wiki.mcneel.com/developer/rhinoscript|RhinoScript Wiki]]
  
wiki/sns/sns2014/perform_geometry_optimization.1500062185.txt.gz · Last modified: 2017/07/14 13:56 by claire