From 5f9d3e3330115b628ddf93f2d03ae5b775d4e282 Mon Sep 17 00:00:00 2001 From: Jayant Mukhopadhaya Date: Fri, 20 Sep 2019 08:10:34 -0700 Subject: [PATCH 1/9] updating tutorial for new fixed cl mode --- .../turb_SA_RAE2822.cfg | 47 ++++++++++++------- .../Turbulent_2D_Constrained_RAE2822.md | 4 +- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg b/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg index f632113b..fde2977b 100644 --- a/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg +++ b/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg @@ -53,8 +53,8 @@ TARGET_CL= 0.724 % Estimation of dCL/dAlpha (0.2 per degree by default) DCL_DALPHA= 0.2 % -% Number of times the AoA is updated in a fix CL problem (5 by default) -UPDATE_ALPHA= 5 +% Maximum number of iterations between AoA updates +UPDATE_AOA_ITER_LIMIT= 100 % % Number of iterations to evaluate dCL/dAlpha at the end of the simulation ITER_DCL_DALPHA= 500 @@ -100,6 +100,7 @@ CFL_NUMBER= 10.0 % % Number of total iterations EXT_ITER= 5000 +ITER = 5000 % % Objective function in gradient evaluation (DRAG, LIFT, SIDEFORCE, MOMENT_X, % MOMENT_Y, MOMENT_Z, EFFICIENCY) @@ -230,10 +231,10 @@ GEO_MODE= FUNCTION CONV_CRITERIA= RESIDUAL % % Residual reduction (order of magnitude with respect to the initial value) -RESIDUAL_REDUCTION= 9 +RESIDUAL_REDUCTION= 8 % % Min value of the residual (log10 of the residual) -RESIDUAL_MINVAL= -12 +RESIDUAL_MINVAL= -10 % % Start convergence criteria at iteration number STARTCONV_ITER= 10 @@ -367,17 +368,29 @@ OPT_BOUND_UPPER= 1E10 % Lower bound for each design variable (bound in the python optimizer) OPT_BOUND_LOWER= -1E10 -% List of design variables (Design variables are separated by semicolons) -% - HICKS_HENNE ( 1, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc ) -% - NACA_4DIGITS ( 4, Scale | Mark. List | 1st digit, 2nd digit, 3rd and 4th digit ) -% - DISPLACEMENT ( 5, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) -% - ROTATION ( 6, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) -% - FFD_CONTROL_POINT ( 7, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) -% - FFD_DIHEDRAL_ANGLE ( 8, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% - FFD_TWIST_ANGLE ( 9, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% - FFD_ROTATION ( 10, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% - FFD_CAMBER ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% - FFD_THICKNESS ( 12, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% - FFD_VOLUME ( 13, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -DEFINITION_DV= ( 1, 1.0 | AIRFOIL | 0, 0.05 ); ( 1, 1.0 | AIRFOIL | 0, 0.10 ); ( 1, 1.0 | AIRFOIL | 0, 0.15 ); ( 1, 1.0 | AIRFOIL | 0, 0.20 ); ( 1, 1.0 | AIRFOIL | 0, 0.25 ); ( 1, 1.0 | AIRFOIL | 0, 0.30 ); ( 1, 1.0 | AIRFOIL | 0, 0.35 ); ( 1, 1.0 | AIRFOIL | 0, 0.40 ); ( 1, 1.0 | AIRFOIL | 0, 0.45 ); ( 1, 1.0 | AIRFOIL | 0, 0.50 ); ( 1, 1.0 | AIRFOIL | 0, 0.55 ); ( 1, 1.0 | AIRFOIL | 0, 0.60 ); ( 1, 1.0 | AIRFOIL | 0, 0.65 ); ( 1, 1.0 | AIRFOIL | 0, 0.70 ); ( 1, 1.0 | AIRFOIL | 0, 0.75 ); ( 1, 1.0 | AIRFOIL | 0, 0.80 ); ( 1, 1.0 | AIRFOIL | 0, 0.85 ); ( 1, 1.0 | AIRFOIL | 0, 0.90 ); ( 1, 1.0 | AIRFOIL | 0, 0.95 ); ( 1, 1.0 | AIRFOIL | 1, 0.05 ); ( 1, 1.0 | AIRFOIL | 1, 0.10 ); ( 1, 1.0 | AIRFOIL | 1, 0.15 ); ( 1, 1.0 | AIRFOIL | 1, 0.20 ); ( 1, 1.0 | AIRFOIL | 1, 0.25 ); ( 1, 1.0 | AIRFOIL | 1, 0.30 ); ( 1, 1.0 | AIRFOIL | 1, 0.35 ); ( 1, 1.0 | AIRFOIL | 1, 0.40 ); ( 1, 1.0 | AIRFOIL | 1, 0.45 ); ( 1, 1.0 | AIRFOIL | 1, 0.50 ); ( 1, 1.0 | AIRFOIL | 1, 0.55 ); ( 1, 1.0 | AIRFOIL | 1, 0.60 ); ( 1, 1.0 | AIRFOIL | 1, 0.65 ); ( 1, 1.0 | AIRFOIL | 1, 0.70 ); ( 1, 1.0 | AIRFOIL | 1, 0.75 ); ( 1, 1.0 | AIRFOIL | 1, 0.80 ); ( 1, 1.0 | AIRFOIL | 1, 0.85 ); ( 1, 1.0 | AIRFOIL | 1, 0.90 ); ( 1, 1.0 | AIRFOIL | 1, 0.95 ) +% List of available design variables (Design variables are separated by semicolons) +% +% 2D Design variables +% FFD_CONTROL_POINT_2D ( 19, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, x_Mov, y_Mov ) +% FFD_CAMBER_2D ( 20, Scale | Mark. List | FFD_BoxTag, i_Ind ) +% FFD_THICKNESS_2D ( 21, Scale | Mark. List | FFD_BoxTag, i_Ind ) +% FFD_TWIST_2D ( 22, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig ) +% HICKS_HENNE ( 30, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc ) +% ANGLE_OF_ATTACK ( 101, Scale | Mark. List | 1.0 ) +% +% 3D Design variables +% FFD_CONTROL_POINT ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) +% FFD_NACELLE ( 12, Scale | Mark. List | FFD_BoxTag, rho_Ind, theta_Ind, phi_Ind, rho_Mov, phi_Mov ) +% FFD_GULL ( 13, Scale | Mark. List | FFD_BoxTag, j_Ind ) +% FFD_CAMBER ( 14, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) +% FFD_TWIST ( 15, Scale | Mark. List | FFD_BoxTag, j_Ind, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) +% FFD_THICKNESS ( 16, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) +% FFD_ROTATION ( 18, Scale | Mark. List | FFD_BoxTag, x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) +% FFD_ANGLE_OF_ATTACK ( 24, Scale | Mark. List | FFD_BoxTag, 1.0 ) +% +% Global design variables +% TRANSLATION ( 1, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) +% ROTATION ( 2, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) +% +DEFINITION_DV= ( 30, 1.0 | AIRFOIL | 0, 0.05 ); ( 30, 1.0 | AIRFOIL | 0, 0.10 ); ( 30, 1.0 | AIRFOIL | 0, 0.15 ); ( 30, 1.0 | AIRFOIL | 0, 0.20 ); ( 30, 1.0 | AIRFOIL | 0, 0.25 ); ( 30, 1.0 | AIRFOIL | 0, 0.30 ); ( 30, 1.0 | AIRFOIL | 0, 0.35 ); ( 30, 1.0 | AIRFOIL | 0, 0.40 ); ( 30, 1.0 | AIRFOIL | 0, 0.45 ); ( 30, 1.0 | AIRFOIL | 0, 0.50 ); ( 30, 1.0 | AIRFOIL | 0, 0.55 ); ( 30, 1.0 | AIRFOIL | 0, 0.60 ); ( 30, 1.0 | AIRFOIL | 0, 0.65 ); ( 30, 1.0 | AIRFOIL | 0, 0.70 ); ( 30, 1.0 | AIRFOIL | 0, 0.75 ); ( 30, 1.0 | AIRFOIL | 0, 0.80 ); ( 30, 1.0 | AIRFOIL | 0, 0.85 ); ( 30, 1.0 | AIRFOIL | 0, 0.90 ); ( 30, 1.0 | AIRFOIL | 0, 0.95 ); ( 30, 1.0 | AIRFOIL | 30, 0.05 ); ( 30, 1.0 | AIRFOIL | 30, 0.10 ); ( 30, 1.0 | AIRFOIL | 30, 0.15 ); ( 30, 1.0 | AIRFOIL | 30, 0.20 ); ( 30, 1.0 | AIRFOIL | 30, 0.25 ); ( 30, 1.0 | AIRFOIL | 30, 0.30 ); ( 30, 1.0 | AIRFOIL | 30, 0.35 ); ( 30, 1.0 | AIRFOIL | 30, 0.40 ); ( 30, 1.0 | AIRFOIL | 30, 0.45 ); ( 30, 1.0 | AIRFOIL | 30, 0.50 ); ( 30, 1.0 | AIRFOIL | 30, 0.55 ); ( 30, 1.0 | AIRFOIL | 30, 0.60 ); ( 30, 1.0 | AIRFOIL | 30, 0.65 ); ( 30, 1.0 | AIRFOIL | 30, 0.70 ); ( 30, 1.0 | AIRFOIL | 30, 0.75 ); ( 30, 1.0 | AIRFOIL | 30, 0.80 ); ( 30, 1.0 | AIRFOIL | 30, 0.85 ); ( 30, 1.0 | AIRFOIL | 30, 0.90 ); ( 30, 1.0 | AIRFOIL | 30, 0.95 ) diff --git a/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md b/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md index 8cc1838d..f50e36ee 100755 --- a/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md +++ b/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md @@ -73,8 +73,8 @@ TARGET_CL= 0.724 % Estimation of dCL/dAlpha (0.2 per degree by default) DCL_DALPHA= 0.2 % -% Number of times the AoA is updated in a fix CL problem (5 by default) -UPDATE_ALPHA= 5 +% Maximum number of iterations between AoA updates +UPDATE_AOA_ITER_LIMIT= 100 % % Number of iterations to evaluate dCL/dAlpha at the end of the simulation ITER_DCL_DALPHA= 500 From a5b10b1abdabf1b8e3c2865cdb5890cc1d733b1d Mon Sep 17 00:00:00 2001 From: Jayant Mukhopadhaya Date: Mon, 23 Sep 2019 14:02:57 -0700 Subject: [PATCH 2/9] updating DV definition numbers to be consistent with new definition --- .../inv_NACA0012_basic.cfg | 42 ++++++++----- .../inv_ONERAM6_adv.cfg | 44 +++++++++----- .../inv_wedge_ROE_multiobj_combo.cfg | 46 +++++++++------ .../turb_SA_RAE2822.cfg | 2 +- Turbulent_ONERAM6/turb_ONERAM6.cfg | 59 +++++++++++++------ .../Inviscid_2D_Unconstrained_NACA0012.md | 2 +- .../Inviscid_3D_Constrained_ONERAM6.md | 6 +- .../Multi_Objective_Shape_Design.md | 2 +- .../Turbulent_2D_Constrained_RAE2822.md | 9 +-- 9 files changed, 136 insertions(+), 76 deletions(-) diff --git a/Inviscid_2D_Unconstrained_NACA0012/inv_NACA0012_basic.cfg b/Inviscid_2D_Unconstrained_NACA0012/inv_NACA0012_basic.cfg index 079ca5f0..b7507c56 100644 --- a/Inviscid_2D_Unconstrained_NACA0012/inv_NACA0012_basic.cfg +++ b/Inviscid_2D_Unconstrained_NACA0012/inv_NACA0012_basic.cfg @@ -306,12 +306,17 @@ WRT_CON_FREQ_DUALTIME= 10 WRT_HALO= NO % --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------% +% % Available flow based objective functions or constraint functions -% DRAG, LIFT, SIDEFORCE, EFFICIENCY, +% DRAG, LIFT, SIDEFORCE, EFFICIENCY, BUFFET, % FORCE_X, FORCE_Y, FORCE_Z, % MOMENT_X, MOMENT_Y, MOMENT_Z, % THRUST, TORQUE, FIGURE_OF_MERIT, % EQUIVALENT_AREA, NEARFIELD_PRESSURE, +% TOTAL_HEATFLUX, MAXIMUM_HEATFLUX, +% INVERSE_DESIGN_PRESSURE, INVERSE_DESIGN_HEATFLUX, +% SURFACE_TOTAL_PRESSURE, SURFACE_MASSFLOW +% SURFACE_STATIC_PRESSURE, SURFACE_MACH % % Available geometrical based objective functions or constraint functions % AIRFOIL_AREA, AIRFOIL_THICKNESS, AIRFOIL_CHORD, AIRFOIL_TOC, AIRFOIL_AOA, @@ -320,18 +325,27 @@ WRT_HALO= NO % STATION#_TWIST (where # is the index of the station defined in GEO_LOCATION_STATIONS) % % Available design variables -% HICKS_HENNE ( 1, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc ) -% SPHERICAL ( 3, Scale | Mark. List | ControlPoint_Index, Theta_Disp, R_Disp ) -% NACA_4DIGITS ( 4, Scale | Mark. List | 1st digit, 2nd digit, 3rd and 4th digit ) -% DISPLACEMENT ( 5, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) -% ROTATION ( 6, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) -% FFD_CONTROL_POINT ( 7, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) -% FFD_TWIST ( 9, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% FFD_ROTATION ( 10, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% FFD_CAMBER ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% FFD_THICKNESS ( 12, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% FFD_VOLUME ( 13, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% FOURIER ( 14, Scale | Mark. List | Lower(0)/Upper(1) side, index, cos(0)/sin(1) ) +% 2D Design variables +% FFD_CONTROL_POINT_2D ( 19, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, x_Mov, y_Mov ) +% FFD_CAMBER_2D ( 20, Scale | Mark. List | FFD_BoxTag, i_Ind ) +% FFD_THICKNESS_2D ( 21, Scale | Mark. List | FFD_BoxTag, i_Ind ) +% FFD_TWIST_2D ( 22, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig ) +% HICKS_HENNE ( 30, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc ) +% ANGLE_OF_ATTACK ( 101, Scale | Mark. List | 1.0 ) +% +% 3D Design variables +% FFD_CONTROL_POINT ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) +% FFD_NACELLE ( 12, Scale | Mark. List | FFD_BoxTag, rho_Ind, theta_Ind, phi_Ind, rho_Mov, phi_Mov ) +% FFD_GULL ( 13, Scale | Mark. List | FFD_BoxTag, j_Ind ) +% FFD_CAMBER ( 14, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) +% FFD_TWIST ( 15, Scale | Mark. List | FFD_BoxTag, j_Ind, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) +% FFD_THICKNESS ( 16, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) +% FFD_ROTATION ( 18, Scale | Mark. List | FFD_BoxTag, x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) +% FFD_ANGLE_OF_ATTACK ( 24, Scale | Mark. List | FFD_BoxTag, 1.0 ) +% +% Global design variables +% TRANSLATION ( 1, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) +% ROTATION ( 2, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) % % Optimization objective function with scaling factor, separated by semicolons. % To include quadratic penalty function: use OPT_CONSTRAINT option syntax within the OPT_OBJECTIVE list. @@ -364,4 +378,4 @@ OPT_BOUND_UPPER= 0.1 OPT_BOUND_LOWER= -0.1 % % Optimization design variables, separated by semicolons -DEFINITION_DV= ( 1, 1.0 | airfoil | 0, 0.05 ); ( 1, 1.0 | airfoil | 0, 0.10 ); ( 1, 1.0 | airfoil | 0, 0.15 ); ( 1, 1.0 | airfoil | 0, 0.20 ); ( 1, 1.0 | airfoil | 0, 0.25 ); ( 1, 1.0 | airfoil | 0, 0.30 ); ( 1, 1.0 | airfoil | 0, 0.35 ); ( 1, 1.0 | airfoil | 0, 0.40 ); ( 1, 1.0 | airfoil | 0, 0.45 ); ( 1, 1.0 | airfoil | 0, 0.50 ); ( 1, 1.0 | airfoil | 0, 0.55 ); ( 1, 1.0 | airfoil | 0, 0.60 ); ( 1, 1.0 | airfoil | 0, 0.65 ); ( 1, 1.0 | airfoil | 0, 0.70 ); ( 1, 1.0 | airfoil | 0, 0.75 ); ( 1, 1.0 | airfoil | 0, 0.80 ); ( 1, 1.0 | airfoil | 0, 0.85 ); ( 1, 1.0 | airfoil | 0, 0.90 ); ( 1, 1.0 | airfoil | 0, 0.95 ); ( 1, 1.0 | airfoil | 1, 0.05 ); ( 1, 1.0 | airfoil | 1, 0.10 ); ( 1, 1.0 | airfoil | 1, 0.15 ); ( 1, 1.0 | airfoil | 1, 0.20 ); ( 1, 1.0 | airfoil | 1, 0.25 ); ( 1, 1.0 | airfoil | 1, 0.30 ); ( 1, 1.0 | airfoil | 1, 0.35 ); ( 1, 1.0 | airfoil | 1, 0.40 ); ( 1, 1.0 | airfoil | 1, 0.45 ); ( 1, 1.0 | airfoil | 1, 0.50 ); ( 1, 1.0 | airfoil | 1, 0.55 ); ( 1, 1.0 | airfoil | 1, 0.60 ); ( 1, 1.0 | airfoil | 1, 0.65 ); ( 1, 1.0 | airfoil | 1, 0.70 ); ( 1, 1.0 | airfoil | 1, 0.75 ); ( 1, 1.0 | airfoil | 1, 0.80 ); ( 1, 1.0 | airfoil | 1, 0.85 ); ( 1, 1.0 | airfoil | 1, 0.90 ); ( 1, 1.0 | airfoil | 1, 0.95 ) +DEFINITION_DV= ( 30, 1.0 | airfoil | 0, 0.05 ); ( 30, 1.0 | airfoil | 0, 0.10 ); ( 30, 1.0 | airfoil | 0, 0.15 ); ( 30, 1.0 | airfoil | 0, 0.20 ); ( 30, 1.0 | airfoil | 0, 0.25 ); ( 30, 1.0 | airfoil | 0, 0.30 ); ( 30, 1.0 | airfoil | 0, 0.35 ); ( 30, 1.0 | airfoil | 0, 0.40 ); ( 30, 1.0 | airfoil | 0, 0.45 ); ( 30, 1.0 | airfoil | 0, 0.50 ); ( 30, 1.0 | airfoil | 0, 0.55 ); ( 30, 1.0 | airfoil | 0, 0.60 ); ( 30, 1.0 | airfoil | 0, 0.65 ); ( 30, 1.0 | airfoil | 0, 0.70 ); ( 30, 1.0 | airfoil | 0, 0.75 ); ( 30, 1.0 | airfoil | 0, 0.80 ); ( 30, 1.0 | airfoil | 0, 0.85 ); ( 30, 1.0 | airfoil | 0, 0.90 ); ( 30, 1.0 | airfoil | 0, 0.95 ); ( 30, 1.0 | airfoil | 1, 0.05 ); ( 30, 1.0 | airfoil | 1, 0.10 ); ( 30, 1.0 | airfoil | 1, 0.15 ); ( 30, 1.0 | airfoil | 1, 0.20 ); ( 30, 1.0 | airfoil | 1, 0.25 ); ( 30, 1.0 | airfoil | 1, 0.30 ); ( 30, 1.0 | airfoil | 1, 0.35 ); ( 30, 1.0 | airfoil | 1, 0.40 ); ( 30, 1.0 | airfoil | 1, 0.45 ); ( 30, 1.0 | airfoil | 1, 0.50 ); ( 30, 1.0 | airfoil | 1, 0.55 ); ( 30, 1.0 | airfoil | 1, 0.60 ); ( 30, 1.0 | airfoil | 1, 0.65 ); ( 30, 1.0 | airfoil | 1, 0.70 ); ( 30, 1.0 | airfoil | 1, 0.75 ); ( 30, 1.0 | airfoil | 1, 0.80 ); ( 30, 1.0 | airfoil | 1, 0.85 ); ( 30, 1.0 | airfoil | 1, 0.90 ); ( 30, 1.0 | airfoil | 1, 0.95 ) diff --git a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg index 11172ba3..d2ffeeb7 100644 --- a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg +++ b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg @@ -320,12 +320,17 @@ DEFORM_LINEAR_SOLVER_ERROR= 1E-14 DEFORM_STIFFNESS_TYPE= WALL_DISTANCE % --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------% +% % Available flow based objective functions or constraint functions -% DRAG, LIFT, SIDEFORCE, EFFICIENCY, +% DRAG, LIFT, SIDEFORCE, EFFICIENCY, BUFFET, % FORCE_X, FORCE_Y, FORCE_Z, % MOMENT_X, MOMENT_Y, MOMENT_Z, % THRUST, TORQUE, FIGURE_OF_MERIT, % EQUIVALENT_AREA, NEARFIELD_PRESSURE, +% TOTAL_HEATFLUX, MAXIMUM_HEATFLUX, +% INVERSE_DESIGN_PRESSURE, INVERSE_DESIGN_HEATFLUX, +% SURFACE_TOTAL_PRESSURE, SURFACE_MASSFLOW +% SURFACE_STATIC_PRESSURE, SURFACE_MACH % % Available geometrical based objective functions or constraint functions % AIRFOIL_AREA, AIRFOIL_THICKNESS, AIRFOIL_CHORD, AIRFOIL_TOC, AIRFOIL_AOA, @@ -334,20 +339,27 @@ DEFORM_STIFFNESS_TYPE= WALL_DISTANCE % STATION#_TWIST (where # is the index of the station defined in GEO_LOCATION_STATIONS) % % Available design variables -% HICKS_HENNE ( 1, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc ) -% COSINE_BUMP ( 2, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc, x_Size ) -% SPHERICAL ( 3, Scale | Mark. List | ControlPoint_Index, Theta_Disp, R_Disp ) -% NACA_4DIGITS ( 4, Scale | Mark. List | 1st digit, 2nd digit, 3rd and 4th digit ) -% DISPLACEMENT ( 5, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) -% ROTATION ( 6, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) -% FFD_CONTROL_POINT ( 7, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) -% FFD_DIHEDRAL_ANGLE ( 8, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% FFD_TWIST_ANGLE ( 9, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% FFD_ROTATION ( 10, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% FFD_CAMBER ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% FFD_THICKNESS ( 12, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% FFD_VOLUME ( 13, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% FOURIER ( 14, Scale | Mark. List | Lower(0)/Upper(1) side, index, cos(0)/sin(1) ) +% 2D Design variables +% FFD_CONTROL_POINT_2D ( 19, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, x_Mov, y_Mov ) +% FFD_CAMBER_2D ( 20, Scale | Mark. List | FFD_BoxTag, i_Ind ) +% FFD_THICKNESS_2D ( 21, Scale | Mark. List | FFD_BoxTag, i_Ind ) +% FFD_TWIST_2D ( 22, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig ) +% HICKS_HENNE ( 30, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc ) +% ANGLE_OF_ATTACK ( 101, Scale | Mark. List | 1.0 ) +% +% 3D Design variables +% FFD_CONTROL_POINT ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) +% FFD_NACELLE ( 12, Scale | Mark. List | FFD_BoxTag, rho_Ind, theta_Ind, phi_Ind, rho_Mov, phi_Mov ) +% FFD_GULL ( 13, Scale | Mark. List | FFD_BoxTag, j_Ind ) +% FFD_CAMBER ( 14, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) +% FFD_TWIST ( 15, Scale | Mark. List | FFD_BoxTag, j_Ind, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) +% FFD_THICKNESS ( 16, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) +% FFD_ROTATION ( 18, Scale | Mark. List | FFD_BoxTag, x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) +% FFD_ANGLE_OF_ATTACK ( 24, Scale | Mark. List | FFD_BoxTag, 1.0 ) +% +% Global design variables +% TRANSLATION ( 1, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) +% ROTATION ( 2, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) % % Optimization objective function with scaling factor % ex= Objective * Scale @@ -378,4 +390,4 @@ OPT_BOUND_UPPER= 1E6 OPT_BOUND_LOWER= -1E6 % % Optimization design variables, separated by semicolons -DEFINITION_DV= ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 0, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 2, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 3, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 4, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 5, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 6, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 7, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 8, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 0, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 1, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 2, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 3, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 4, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 5, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 6, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 7, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 8, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 8, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 8, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 8, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 8, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 8, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 8, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 8, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 8, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 8, 1, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 8, 1, 0.0, 0.0, 1.0 ) +DEFINITION_DV= ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 0, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 2, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 3, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 4, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 5, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 6, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 7, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 8, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 0, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 1, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 2, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 3, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 4, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 5, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 6, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 7, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 8, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 8, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 2, 8, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 3, 8, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 4, 8, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 5, 8, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 6, 8, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 7, 8, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 8, 8, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 9, 8, 1, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 10, 8, 1, 0.0, 0.0, 1.0 ) diff --git a/Multi_Objective_Shape_Design/inv_wedge_ROE_multiobj_combo.cfg b/Multi_Objective_Shape_Design/inv_wedge_ROE_multiobj_combo.cfg index e6f721cb..484c61ee 100644 --- a/Multi_Objective_Shape_Design/inv_wedge_ROE_multiobj_combo.cfg +++ b/Multi_Objective_Shape_Design/inv_wedge_ROE_multiobj_combo.cfg @@ -346,15 +346,17 @@ DEFORM_STIFFNESS_TYPE= INVERSE_VOLUME % --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------% % +% % Available flow based objective functions or constraint functions -% DRAG, LIFT, SIDEFORCE, EFFICIENCY, +% DRAG, LIFT, SIDEFORCE, EFFICIENCY, BUFFET, % FORCE_X, FORCE_Y, FORCE_Z, % MOMENT_X, MOMENT_Y, MOMENT_Z, % THRUST, TORQUE, FIGURE_OF_MERIT, -% EQUIVALENT_AREA, NEARFIELD_PRESSURE, +% EQUIVALENT_AREA, NEARFIELD_PRESSURE, % TOTAL_HEATFLUX, MAXIMUM_HEATFLUX, % INVERSE_DESIGN_PRESSURE, INVERSE_DESIGN_HEATFLUX, -% FREE_SURFACE, SURFACE_TOTAL_PRESSURE, SURFACE_MASSFLOW +% SURFACE_TOTAL_PRESSURE, SURFACE_MASSFLOW +% SURFACE_STATIC_PRESSURE, SURFACE_MACH % % Available geometrical based objective functions or constraint functions % AIRFOIL_AREA, AIRFOIL_THICKNESS, AIRFOIL_CHORD, AIRFOIL_TOC, AIRFOIL_AOA, @@ -363,21 +365,27 @@ DEFORM_STIFFNESS_TYPE= INVERSE_VOLUME % STATION#_TWIST (where # is the index of the station defined in GEO_LOCATION_STATIONS) % % Available design variables -% HICKS_HENNE ( 1, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc ) -% SPHERICAL ( 3, Scale | Mark. List | ControlPoint_Index, Theta_Disp, R_Disp ) -% NACA_4DIGITS ( 4, Scale | Mark. List | 1st digit, 2nd digit, 3rd and 4th digit ) -% DISPLACEMENT ( 5, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) -% ROTATION ( 6, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) -% FFD_CONTROL_POINT ( 7, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) -% FFD_TWIST ( 9, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% FFD_ROTATION ( 10, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% FFD_CAMBER ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% FFD_THICKNESS ( 12, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% FOURIER ( 14, Scale | Mark. List | Lower(0)/Upper(1) side, index, cos(0)/sin(1) ) -% FFD_CONTROL_POINT_2D ( 15, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, x_Mov, y_Mov ) -% FFD_CAMBER_2D ( 16, Scale | Mark. List | FFD_BoxTag, i_Ind ) -% FFD_THICKNESS_2D ( 17, Scale | Mark. List | FFD_BoxTag, i_Ind ) -% FFD_CONTROL_SURFACE ( 18, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) +% 2D Design variables +% FFD_CONTROL_POINT_2D ( 19, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, x_Mov, y_Mov ) +% FFD_CAMBER_2D ( 20, Scale | Mark. List | FFD_BoxTag, i_Ind ) +% FFD_THICKNESS_2D ( 21, Scale | Mark. List | FFD_BoxTag, i_Ind ) +% FFD_TWIST_2D ( 22, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig ) +% HICKS_HENNE ( 30, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc ) +% ANGLE_OF_ATTACK ( 101, Scale | Mark. List | 1.0 ) +% +% 3D Design variables +% FFD_CONTROL_POINT ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) +% FFD_NACELLE ( 12, Scale | Mark. List | FFD_BoxTag, rho_Ind, theta_Ind, phi_Ind, rho_Mov, phi_Mov ) +% FFD_GULL ( 13, Scale | Mark. List | FFD_BoxTag, j_Ind ) +% FFD_CAMBER ( 14, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) +% FFD_TWIST ( 15, Scale | Mark. List | FFD_BoxTag, j_Ind, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) +% FFD_THICKNESS ( 16, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) +% FFD_ROTATION ( 18, Scale | Mark. List | FFD_BoxTag, x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) +% FFD_ANGLE_OF_ATTACK ( 24, Scale | Mark. List | FFD_BoxTag, 1.0 ) +% +% Global design variables +% TRANSLATION ( 1, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) +% ROTATION ( 2, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) % % Optimization objective function with scaling factor, separated by semicolons. % To include quadratic penalty function: use OPT_CONSTRAINT option syntax within the OPT_OBJECTIVE list. @@ -404,5 +412,5 @@ OPT_BOUND_UPPER= 0.1 OPT_BOUND_LOWER= -0.1 % % Optimization design variables, separated by semicolons -DEFINITION_DV= (15, 1.0| lower | MAIN_BOX, 3,0,0,1.0);(15, 1.0| lower | MAIN_BOX, 4,0,0,1.0);(15, 1.0| lower | MAIN_BOX, 5,0,0,1.0);(15, 1.0| lower | MAIN_BOX, 6,0,0,1.0) +DEFINITION_DV= ( 19, 1.0| lower | MAIN_BOX, 3,0,0,1.0);( 19, 1.0| lower | MAIN_BOX, 4,0,0,1.0);( 19, 1.0| lower | MAIN_BOX, 5,0,0,1.0);( 19, 1.0| lower | MAIN_BOX, 6,0,0,1.0) diff --git a/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg b/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg index fde2977b..2861c7bc 100644 --- a/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg +++ b/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg @@ -392,5 +392,5 @@ OPT_BOUND_LOWER= -1E10 % TRANSLATION ( 1, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) % ROTATION ( 2, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) % -DEFINITION_DV= ( 30, 1.0 | AIRFOIL | 0, 0.05 ); ( 30, 1.0 | AIRFOIL | 0, 0.10 ); ( 30, 1.0 | AIRFOIL | 0, 0.15 ); ( 30, 1.0 | AIRFOIL | 0, 0.20 ); ( 30, 1.0 | AIRFOIL | 0, 0.25 ); ( 30, 1.0 | AIRFOIL | 0, 0.30 ); ( 30, 1.0 | AIRFOIL | 0, 0.35 ); ( 30, 1.0 | AIRFOIL | 0, 0.40 ); ( 30, 1.0 | AIRFOIL | 0, 0.45 ); ( 30, 1.0 | AIRFOIL | 0, 0.50 ); ( 30, 1.0 | AIRFOIL | 0, 0.55 ); ( 30, 1.0 | AIRFOIL | 0, 0.60 ); ( 30, 1.0 | AIRFOIL | 0, 0.65 ); ( 30, 1.0 | AIRFOIL | 0, 0.70 ); ( 30, 1.0 | AIRFOIL | 0, 0.75 ); ( 30, 1.0 | AIRFOIL | 0, 0.80 ); ( 30, 1.0 | AIRFOIL | 0, 0.85 ); ( 30, 1.0 | AIRFOIL | 0, 0.90 ); ( 30, 1.0 | AIRFOIL | 0, 0.95 ); ( 30, 1.0 | AIRFOIL | 30, 0.05 ); ( 30, 1.0 | AIRFOIL | 30, 0.10 ); ( 30, 1.0 | AIRFOIL | 30, 0.15 ); ( 30, 1.0 | AIRFOIL | 30, 0.20 ); ( 30, 1.0 | AIRFOIL | 30, 0.25 ); ( 30, 1.0 | AIRFOIL | 30, 0.30 ); ( 30, 1.0 | AIRFOIL | 30, 0.35 ); ( 30, 1.0 | AIRFOIL | 30, 0.40 ); ( 30, 1.0 | AIRFOIL | 30, 0.45 ); ( 30, 1.0 | AIRFOIL | 30, 0.50 ); ( 30, 1.0 | AIRFOIL | 30, 0.55 ); ( 30, 1.0 | AIRFOIL | 30, 0.60 ); ( 30, 1.0 | AIRFOIL | 30, 0.65 ); ( 30, 1.0 | AIRFOIL | 30, 0.70 ); ( 30, 1.0 | AIRFOIL | 30, 0.75 ); ( 30, 1.0 | AIRFOIL | 30, 0.80 ); ( 30, 1.0 | AIRFOIL | 30, 0.85 ); ( 30, 1.0 | AIRFOIL | 30, 0.90 ); ( 30, 1.0 | AIRFOIL | 30, 0.95 ) +DEFINITION_DV= ( 30, 1.0 | AIRFOIL | 0, 0.05 ); ( 30, 1.0 | AIRFOIL | 0, 0.10 ); ( 30, 1.0 | AIRFOIL | 0, 0.15 ); ( 30, 1.0 | AIRFOIL | 0, 0.20 ); ( 30, 1.0 | AIRFOIL | 0, 0.25 ); ( 30, 1.0 | AIRFOIL | 0, 0.30 ); ( 30, 1.0 | AIRFOIL | 0, 0.35 ); ( 30, 1.0 | AIRFOIL | 0, 0.40 ); ( 30, 1.0 | AIRFOIL | 0, 0.45 ); ( 30, 1.0 | AIRFOIL | 0, 0.50 ); ( 30, 1.0 | AIRFOIL | 0, 0.55 ); ( 30, 1.0 | AIRFOIL | 0, 0.60 ); ( 30, 1.0 | AIRFOIL | 0, 0.65 ); ( 30, 1.0 | AIRFOIL | 0, 0.70 ); ( 30, 1.0 | AIRFOIL | 0, 0.75 ); ( 30, 1.0 | AIRFOIL | 0, 0.80 ); ( 30, 1.0 | AIRFOIL | 0, 0.85 ); ( 30, 1.0 | AIRFOIL | 0, 0.90 ); ( 30, 1.0 | AIRFOIL | 0, 0.95 ); ( 30, 1.0 | AIRFOIL | 1, 0.05 ); ( 30, 1.0 | AIRFOIL | 1, 0.10 ); ( 30, 1.0 | AIRFOIL | 1, 0.15 ); ( 30, 1.0 | AIRFOIL | 1, 0.20 ); ( 30, 1.0 | AIRFOIL | 1, 0.25 ); ( 30, 1.0 | AIRFOIL | 1, 0.30 ); ( 30, 1.0 | AIRFOIL | 1, 0.35 ); ( 30, 1.0 | AIRFOIL | 1, 0.40 ); ( 30, 1.0 | AIRFOIL | 1, 0.45 ); ( 30, 1.0 | AIRFOIL | 1, 0.50 ); ( 30, 1.0 | AIRFOIL | 1, 0.55 ); ( 30, 1.0 | AIRFOIL | 1, 0.60 ); ( 30, 1.0 | AIRFOIL | 1, 0.65 ); ( 30, 1.0 | AIRFOIL | 1, 0.70 ); ( 30, 1.0 | AIRFOIL | 1, 0.75 ); ( 30, 1.0 | AIRFOIL | 1, 0.80 ); ( 30, 1.0 | AIRFOIL | 1, 0.85 ); ( 30, 1.0 | AIRFOIL | 1, 0.90 ); ( 30, 1.0 | AIRFOIL | 1, 0.95 ) diff --git a/Turbulent_ONERAM6/turb_ONERAM6.cfg b/Turbulent_ONERAM6/turb_ONERAM6.cfg index edfa2781..526142b4 100644 --- a/Turbulent_ONERAM6/turb_ONERAM6.cfg +++ b/Turbulent_ONERAM6/turb_ONERAM6.cfg @@ -305,20 +305,45 @@ WRT_CON_FREQ= 1 % --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------% % -% List of design variables (Design variables are separated by semicolons) -% From 1 to 99, Geometrycal design variables. -% - HICKS_HENNE ( 1, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc ) -% - NACA_4DIGITS ( 4, Scale | Mark. List | 1st digit, 2nd digit, 3rd and 4th digit ) -% - DISPLACEMENT ( 5, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) -% - ROTATION ( 6, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) -% - FFD_CONTROL_POINT ( 7, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) -% - FFD_DIHEDRAL_ANGLE ( 8, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% - FFD_TWIST_ANGLE ( 9, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% - FFD_ROTATION ( 10, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) -% - FFD_CAMBER ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% - FFD_THICKNESS ( 12, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% - FFD_VOLUME ( 13, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) -% From 100 to 199, Flow solver design variables. -% - MACH_NUMBER ( 101, Scale | Markers List ) -% - AOA ( 102, Scale | Markers List ) -DEFINITION_DV= ( 1, 0.001 | airfoil | 0, 0.1 ); ( 1, 0.001 | airfoil | 0, 0.2 ) +% +% Available flow based objective functions or constraint functions +% DRAG, LIFT, SIDEFORCE, EFFICIENCY, BUFFET, +% FORCE_X, FORCE_Y, FORCE_Z, +% MOMENT_X, MOMENT_Y, MOMENT_Z, +% THRUST, TORQUE, FIGURE_OF_MERIT, +% EQUIVALENT_AREA, NEARFIELD_PRESSURE, +% TOTAL_HEATFLUX, MAXIMUM_HEATFLUX, +% INVERSE_DESIGN_PRESSURE, INVERSE_DESIGN_HEATFLUX, +% SURFACE_TOTAL_PRESSURE, SURFACE_MASSFLOW +% SURFACE_STATIC_PRESSURE, SURFACE_MACH +% +% Available geometrical based objective functions or constraint functions +% AIRFOIL_AREA, AIRFOIL_THICKNESS, AIRFOIL_CHORD, AIRFOIL_TOC, AIRFOIL_AOA, +% WING_VOLUME, WING_MIN_THICKNESS, WING_MAX_THICKNESS, WING_MAX_CHORD, WING_MIN_TOC, WING_MAX_TWIST, WING_MAX_CURVATURE, WING_MAX_DIHEDRAL +% STATION#_WIDTH, STATION#_AREA, STATION#_THICKNESS, STATION#_CHORD, STATION#_TOC, +% STATION#_TWIST (where # is the index of the station defined in GEO_LOCATION_STATIONS) +% +% Available design variables +% 2D Design variables +% FFD_CONTROL_POINT_2D ( 19, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, x_Mov, y_Mov ) +% FFD_CAMBER_2D ( 20, Scale | Mark. List | FFD_BoxTag, i_Ind ) +% FFD_THICKNESS_2D ( 21, Scale | Mark. List | FFD_BoxTag, i_Ind ) +% FFD_TWIST_2D ( 22, Scale | Mark. List | FFD_BoxTag, x_Orig, y_Orig ) +% HICKS_HENNE ( 30, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc ) +% ANGLE_OF_ATTACK ( 101, Scale | Mark. List | 1.0 ) +% +% 3D Design variables +% FFD_CONTROL_POINT ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) +% FFD_NACELLE ( 12, Scale | Mark. List | FFD_BoxTag, rho_Ind, theta_Ind, phi_Ind, rho_Mov, phi_Mov ) +% FFD_GULL ( 13, Scale | Mark. List | FFD_BoxTag, j_Ind ) +% FFD_CAMBER ( 14, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) +% FFD_TWIST ( 15, Scale | Mark. List | FFD_BoxTag, j_Ind, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End ) +% FFD_THICKNESS ( 16, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind ) +% FFD_ROTATION ( 18, Scale | Mark. List | FFD_BoxTag, x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) +% FFD_ANGLE_OF_ATTACK ( 24, Scale | Mark. List | FFD_BoxTag, 1.0 ) +% +% Global design variables +% TRANSLATION ( 1, Scale | Mark. List | x_Disp, y_Disp, z_Disp ) +% ROTATION ( 2, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn ) +% +DEFINITION_DV= ( 30, 0.001 | airfoil | 0, 0.1 ); ( 30, 0.001 | airfoil | 0, 0.2 ) diff --git a/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md b/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md index d58ae0d5..67e18b44 100755 --- a/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md +++ b/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md @@ -123,7 +123,7 @@ OPT_BOUND_UPPER= 0.1 OPT_BOUND_LOWER= -0.1 % % Optimization design variables, separated by semicolons -DEFINITION_DV= ( 1, 1.0 | airfoil | 0, 0.05 ); ( 1, 1.0 | airfoil | 0, 0.10 ); ( 1, 1.0 | airfoil | 0, 0.15 ); ( 1, 1.0 | airfoil | 0, 0.20 ); ( 1, 1.0 | airfoil | 0, 0.25 ); ( 1, 1.0 | airfoil | 0, 0.30 ); ( 1, 1.0 | airfoil | 0, 0.35 ); ( 1, 1.0 | airfoil | 0, 0.40 ); ( 1, 1.0 | airfoil | 0, 0.45 ); ( 1, 1.0 | airfoil | 0, 0.50 ); ( 1, 1.0 | airfoil | 0, 0.55 ); ( 1, 1.0 | airfoil | 0, 0.60 ); ( 1, 1.0 | airfoil | 0, 0.65 ); ( 1, 1.0 | airfoil | 0, 0.70 ); ( 1, 1.0 | airfoil | 0, 0.75 ); ( 1, 1.0 | airfoil | 0, 0.80 ); ( 1, 1.0 | airfoil | 0, 0.85 ); ( 1, 1.0 | airfoil | 0, 0.90 ); ( 1, 1.0 | airfoil | 0, 0.95 ); ( 1, 1.0 | airfoil | 1, 0.05 ); ( 1, 1.0 | airfoil | 1, 0.10 ); ( 1, 1.0 | airfoil | 1, 0.15 ); ( 1, 1.0 | airfoil | 1, 0.20 ); ( 1, 1.0 | airfoil | 1, 0.25 ); ( 1, 1.0 | airfoil | 1, 0.30 ); ( 1, 1.0 | airfoil | 1, 0.35 ); ( 1, 1.0 | airfoil | 1, 0.40 ); ( 1, 1.0 | airfoil | 1, 0.45 ); ( 1, 1.0 | airfoil | 1, 0.50 ); ( 1, 1.0 | airfoil | 1, 0.55 ); ( 1, 1.0 | airfoil | 1, 0.60 ); ( 1, 1.0 | airfoil | 1, 0.65 ); ( 1, 1.0 | airfoil | 1, 0.70 ); ( 1, 1.0 | airfoil | 1, 0.75 ); ( 1, 1.0 | airfoil | 1, 0.80 ); ( 1, 1.0 | airfoil | 1, 0.85 ); ( 1, 1.0 | airfoil | 1, 0.90 ); ( 1, 1.0 | airfoil | 1, 0.95 ) +DEFINITION_DV= ( 30, 1.0 | airfoil | 0, 0.05 ); ( 30, 1.0 | airfoil | 0, 0.10 ); ( 30, 1.0 | airfoil | 0, 0.15 ); ( 30, 1.0 | airfoil | 0, 0.20 ); ( 30, 1.0 | airfoil | 0, 0.25 ); ( 30, 1.0 | airfoil | 0, 0.30 ); ( 30, 1.0 | airfoil | 0, 0.35 ); ( 30, 1.0 | airfoil | 0, 0.40 ); ( 30, 1.0 | airfoil | 0, 0.45 ); ( 30, 1.0 | airfoil | 0, 0.50 ); ( 30, 1.0 | airfoil | 0, 0.55 ); ( 30, 1.0 | airfoil | 0, 0.60 ); ( 30, 1.0 | airfoil | 0, 0.65 ); ( 30, 1.0 | airfoil | 0, 0.70 ); ( 30, 1.0 | airfoil | 0, 0.75 ); ( 30, 1.0 | airfoil | 0, 0.80 ); ( 30, 1.0 | airfoil | 0, 0.85 ); ( 30, 1.0 | airfoil | 0, 0.90 ); ( 30, 1.0 | airfoil | 0, 0.95 ); ( 30, 1.0 | airfoil | 1, 0.05 ); ( 30, 1.0 | airfoil | 1, 0.10 ); ( 30, 1.0 | airfoil | 1, 0.15 ); ( 30, 1.0 | airfoil | 1, 0.20 ); ( 30, 1.0 | airfoil | 1, 0.25 ); ( 30, 1.0 | airfoil | 1, 0.30 ); ( 30, 1.0 | airfoil | 1, 0.35 ); ( 30, 1.0 | airfoil | 1, 0.40 ); ( 30, 1.0 | airfoil | 1, 0.45 ); ( 30, 1.0 | airfoil | 1, 0.50 ); ( 30, 1.0 | airfoil | 1, 0.55 ); ( 30, 1.0 | airfoil | 1, 0.60 ); ( 30, 1.0 | airfoil | 1, 0.65 ); ( 30, 1.0 | airfoil | 1, 0.70 ); ( 30, 1.0 | airfoil | 1, 0.75 ); ( 30, 1.0 | airfoil | 1, 0.80 ); ( 30, 1.0 | airfoil | 1, 0.85 ); ( 30, 1.0 | airfoil | 1, 0.90 ); ( 30, 1.0 | airfoil | 1, 0.95 ) ``` Here, we define the objective function for the optimization as drag without any constraints. The `OPT_GRADIENT_FACTOR` of 1E-6 is chosen to reduce the value of the gradient norm (based on our experience, for the SLSQP python implementation a norm of the gradient ~1E-6 is desired) and `OPT_RELAX_FACTOR` of 1E3 is used to aid the optimizer in taking a physically appropriate first step (i.e., not too small that the optimizer is not able to detect a change in the objective function or too large that the subsequent calculations go unstable due to a large, non-physical deformation). We could impose a constraint on the maximum thickness, for instance, or add a lift constraint. Constraints will be discussed in the next tutorial on 3D design. diff --git a/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md b/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md index a87a82e0..38940896 100755 --- a/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md +++ b/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md @@ -199,11 +199,11 @@ OPT_BOUND_UPPER= 0.3 OPT_BOUND_LOWER= -0.3 % % Optimization design variables, separated by semicolons -% ex= FFD_CONTROL_POINT ( 7, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) -DEFINITION_DV= ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 1, 0, 0.0, 0.0, 1.0 ); ( 7, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 1, 0, 0.0, 0.0, 1.0 ); ... +% ex= FFD_CONTROL_POINT ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) +DEFINITION_DV= ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 1, 0, 0.0, 0.0, 1.0 ); ... ``` -Here, we define the objective function for the optimization as drag with thickness constraints along 5 sections of the wing. The `DEFINITION_DV` is the list of design variables, note that this is a simulation/optimization at a cte. Cl and the angle of attack is a design variable. For this problem, we want to minimize the drag by changing the position of the control points of the control box. To do so, we list the set of FFD control points that we would like to use as variables. Each design variable is separated by a semicolon. The first value in the parentheses is the variable type, which is 7 for an FFD control point movement. The second value is the scale of the variable (typically left as 1.0). The name between the vertical bars is the marker tag(s) where the variable deformations will be applied. The final seven values in the parentheses are the particular information about the deformation: identification of the FFD tag, the i, j, and k index of the control point, and the allowed x, y, and z movement direction of the control point. Note that other types of design variables have their own specific input format. For this example, we have a long list of design variables that are not all listed above. You can quickly generate a list of FFD variables in the necessary format using the **set_ffd_design_var.py** script that is shipped with the other Python utilities with the source code. +Here, we define the objective function for the optimization as drag with thickness constraints along 5 sections of the wing. The `DEFINITION_DV` is the list of design variables, note that this is a simulation/optimization at a cte. Cl and the angle of attack is a design variable. For this problem, we want to minimize the drag by changing the position of the control points of the control box. To do so, we list the set of FFD control points that we would like to use as variables. Each design variable is separated by a semicolon. The first value in the parentheses is the variable type, which is 11 for an FFD control point movement. The second value is the scale of the variable (typically left as 1.0). The name between the vertical bars is the marker tag(s) where the variable deformations will be applied. The final seven values in the parentheses are the particular information about the deformation: identification of the FFD tag, the i, j, and k index of the control point, and the allowed x, y, and z movement direction of the control point. Note that other types of design variables have their own specific input format. For this example, we have a long list of design variables that are not all listed above. You can quickly generate a list of FFD variables in the necessary format using the **set_ffd_design_var.py** script that is shipped with the other Python utilities with the source code. ``` $ python set_ffd_design_var.py -i 10 -j 8 -k 1 -b WING -m 'UPPER_SIDE, LOWER_SIDE, TIP' ``` diff --git a/_tutorials/design_features/Multi_Objective_Shape_Design.md b/_tutorials/design_features/Multi_Objective_Shape_Design.md index aa8f3a71..64611fa4 100644 --- a/_tutorials/design_features/Multi_Objective_Shape_Design.md +++ b/_tutorials/design_features/Multi_Objective_Shape_Design.md @@ -115,7 +115,7 @@ OPT_BOUND_UPPER= 0.1 OPT_BOUND_LOWER= -0.1 % % Optimization design variables, separated by semicolons -DEFINITION_DV= (15, 1.0| lower | MAIN_BOX, 3,0,0,1.0);(15, 1.0| lower | MAIN_BOX, 4,0,0,1.0);(15, 1.0| lower | MAIN_BOX, 5,0,0,1.0);(15, 1.0| lower | MAIN_BOX, 6,0,0,1.0) +DEFINITION_DV= ( 19, 1.0| lower | MAIN_BOX, 3,0,0,1.0);( 19, 1.0| lower | MAIN_BOX, 4,0,0,1.0);( 19, 1.0| lower | MAIN_BOX, 5,0,0,1.0);( 19, 1.0| lower | MAIN_BOX, 6,0,0,1.0) ``` If OPT_COMBINE_OBJECTIVE is not included or set to 'NO', then the gradients will be evaluated separately in sequential operations when adjoint methods are used. Whether to combine the objectives or not will depend on the needs of the problem at hand. If you have a small number of objectives, have plenty of computing resources available, and may need to examine the gradients of the objectives separately from one another, then you may want to forgo combining the objectives and set this option to 'NO'. On the other hand, if you have a large number of objectives, limited computing resources, and do not need to separate the objective gradients from one another, then combining the objectives may be beneficial. diff --git a/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md b/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md index f50e36ee..a1213734 100755 --- a/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md +++ b/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md @@ -60,9 +60,10 @@ OPT_OBJECTIVE= DRAG % ex= (Objective = Value ) * Scale, use '>','<','=' OPT_CONSTRAINT= ( MOMENT_Z < 0.093 ) * 0.001; ( AIRFOIL_THICKNESS > 0.12 ) * 0.001 ``` -In this particular case we are running at a cte. lift value, in order to set that feature the relevant part of the configuration file is presented below +In this particular case we are running at a constant lift value, in order to set that feature the relevant part of the configuration file is presented below. The `FIXED_CL_MODE` works by updating the angle of attack (AoA) during the simulation run such that the resulting CL matches the `TARGET_CL` value. The `UPDATE_AOA_ITER_LIMIT` specifies the maximum number of iterations between two AoA updates. The AoA might update sooner if the solution converges (as defined by the convergence parameters) to the wrong CL. The level of CL convergence can be specified by the `CAUCHY_EPS` value which is defined in the Convergence Parameters. `DCL_DALPHA` is the proportional constant that is used to calculate the change in AoA when it updates (Change in AoA = (TARGET_CL - CURRENT_CL)/DCL_DALPHA) + ``` -% -------------------------- CL & CM DRIVER DEFINITION ------------------------% +% -------------------------- CL DRIVER DEFINITION -----------------------------% % % Activate fixed lift mode (specify a CL instead of AoA, NO/YES) FIXED_CL_MODE= YES @@ -121,7 +122,7 @@ OPT_BOUND_UPPER= 1E10 OPT_BOUND_LOWER= -1E10 % % Optimization design variables, separated by semicolons -DEFINITION_DV= ( 1, 1.0 | AIRFOIL | 0, 0.05 ); ( 1, 1.0 | AIRFOIL | 0, 0.10 ); ( 1, 1.0 | AIRFOIL | 0, 0.15 ); ( 1, 1.0 | AIRFOIL | 0, 0.20 ); ( 1, 1.0 | AIRFOIL | 0, 0.25 ); ( 1, 1.0 | AIRFOIL | 0, 0.30 ); ( 1, 1.0 | AIRFOIL | 0, 0.35 ); ( 1, 1.0 | AIRFOIL | 0, 0.40 ); ( 1, 1.0 | AIRFOIL | 0, 0.45 ); ( 1, 1.0 | AIRFOIL | 0, 0.50 ); ( 1, 1.0 | AIRFOIL | 0, 0.55 ); ( 1, 1.0 | AIRFOIL | 0, 0.60 ); ( 1, 1.0 | AIRFOIL | 0, 0.65 ); ( 1, 1.0 | AIRFOIL | 0, 0.70 ); ( 1, 1.0 | AIRFOIL | 0, 0.75 ); ( 1, 1.0 | AIRFOIL | 0, 0.80 ); ( 1, 1.0 | AIRFOIL | 0, 0.85 ); ( 1, 1.0 | AIRFOIL | 0, 0.90 ); ( 1, 1.0 | AIRFOIL | 0, 0.95 ); ( 1, 1.0 | AIRFOIL | 1, 0.05 ); ( 1, 1.0 | AIRFOIL | 1, 0.10 ); ( 1, 1.0 | AIRFOIL | 1, 0.15 ); ( 1, 1.0 | AIRFOIL | 1, 0.20 ); ( 1, 1.0 | AIRFOIL | 1, 0.25 ); ( 1, 1.0 | AIRFOIL | 1, 0.30 ); ( 1, 1.0 | AIRFOIL | 1, 0.35 ); ( 1, 1.0 | AIRFOIL | 1, 0.40 ); ( 1, 1.0 | AIRFOIL | 1, 0.45 ); ( 1, 1.0 | AIRFOIL | 1, 0.50 ); ( 1, 1.0 | AIRFOIL | 1, 0.55 ); ( 1, 1.0 | AIRFOIL | 1, 0.60 ); ( 1, 1.0 | AIRFOIL | 1, 0.65 ); ( 1, 1.0 | AIRFOIL | 1, 0.70 ); ( 1, 1.0 | AIRFOIL | 1, 0.75 ); ( 1, 1.0 | AIRFOIL | 1, 0.80 ); ( 1, 1.0 | AIRFOIL | 1, 0.85 ); ( 1, 1.0 | AIRFOIL | 1, 0.90 ); ( 1, 1.0 | AIRFOIL | 1, 0.95 ) +DEFINITION_DV= ( 30, 1.0 | AIRFOIL | 0, 0.05 ); ( 30, 1.0 | AIRFOIL | 0, 0.10 ); ( 30, 1.0 | AIRFOIL | 0, 0.15 ); ( 30, 1.0 | AIRFOIL | 0, 0.20 ); ( 30, 1.0 | AIRFOIL | 0, 0.25 ); ( 30, 1.0 | AIRFOIL | 0, 0.30 ); ( 30, 1.0 | AIRFOIL | 0, 0.35 ); ( 30, 1.0 | AIRFOIL | 0, 0.40 ); ( 30, 1.0 | AIRFOIL | 0, 0.45 ); ( 30, 1.0 | AIRFOIL | 0, 0.50 ); ( 30, 1.0 | AIRFOIL | 0, 0.55 ); ( 30, 1.0 | AIRFOIL | 0, 0.60 ); ( 30, 1.0 | AIRFOIL | 0, 0.65 ); ( 30, 1.0 | AIRFOIL | 0, 0.70 ); ( 30, 1.0 | AIRFOIL | 0, 0.75 ); ( 30, 1.0 | AIRFOIL | 0, 0.80 ); ( 30, 1.0 | AIRFOIL | 0, 0.85 ); ( 30, 1.0 | AIRFOIL | 0, 0.90 ); ( 30, 1.0 | AIRFOIL | 0, 0.95 ); ( 30, 1.0 | AIRFOIL | 1, 0.05 ); ( 30, 1.0 | AIRFOIL | 1, 0.10 ); ( 30, 1.0 | AIRFOIL | 1, 0.15 ); ( 30, 1.0 | AIRFOIL | 1, 0.20 ); ( 30, 1.0 | AIRFOIL | 1, 0.25 ); ( 30, 1.0 | AIRFOIL | 1, 0.30 ); ( 30, 1.0 | AIRFOIL | 1, 0.35 ); ( 30, 1.0 | AIRFOIL | 1, 0.40 ); ( 30, 1.0 | AIRFOIL | 1, 0.45 ); ( 30, 1.0 | AIRFOIL | 1, 0.50 ); ( 30, 1.0 | AIRFOIL | 1, 0.55 ); ( 30, 1.0 | AIRFOIL | 1, 0.60 ); ( 30, 1.0 | AIRFOIL | 1, 0.65 ); ( 30, 1.0 | AIRFOIL | 1, 0.70 ); ( 30, 1.0 | AIRFOIL | 1, 0.75 ); ( 30, 1.0 | AIRFOIL | 1, 0.80 ); ( 30, 1.0 | AIRFOIL | 1, 0.85 ); ( 30, 1.0 | AIRFOIL | 1, 0.90 ); ( 30, 1.0 | AIRFOIL | 1, 0.95 ) ``` The `OPT_GRADIENT_FACTOR` of 1E-6 is chosen to reduce the value of the gradient norm (based on our experience, for the SLSQP python implementation a norm of the gradient ~1E-6 is desired) and `OPT_RELAX_FACTOR` of 1E2 is used to aid the optimizer in taking a physically appropriate first step (i.e., not too small that the optimizer is not able to detect a change in the objective function or too large that the subsequent calculations go unstable due to a large, non-physical deformation). @@ -129,7 +130,7 @@ The SLSQP optimizer from the SciPy package for Python is the default optimizer c The `DEFINITION_DV` is the list of design variables. For the airfoil problem, we want to minimize the drag by changing the surface profile shape. To do so, we define a set of Hicks-Henne bump functions. Each design variable is separated by a semicolon, although **note that there is no final semicolon at the end of the list**. -The first value in the parentheses is the variable type, which is 1 for a Hicks-Henne bump function. The second value is the scale of the variable (typically left as 1.0). The name between the vertical bars is the marker tag where the variable deformations will be applied. Only the airfoil surface will be deformed in this problem. The final two values in the parentheses specify whether the bump function is applied to the upper (1) or lower (0) side and the x-location of the bump between 0 and 1 (we assume a chord of 1.0 for the Hicks-Henne bumps), respectively. +The first value in the parentheses is the variable type, which is 30 for a Hicks-Henne bump function. The second value is the scale of the variable (typically left as 1.0). The name between the vertical bars is the marker tag where the variable deformations will be applied. Only the airfoil surface will be deformed in this problem. The final two values in the parentheses specify whether the bump function is applied to the upper (1) or lower (0) side and the x-location of the bump between 0 and 1 (we assume a chord of 1.0 for the Hicks-Henne bumps), respectively. Note that there are many other types of design variables available in SU2 (including 2D FFD), and each has their own specific input format. 3D design variables based on the free-form deformation approach (FFD) will be discussed in another tutorial. From e8077c0c587b652ac617f705e29e57e3645547e7 Mon Sep 17 00:00:00 2001 From: Jayant Mukhopadhaya Date: Mon, 23 Sep 2019 14:21:15 -0700 Subject: [PATCH 3/9] more detail about fixed cl mode --- _tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md b/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md index a1213734..bb05387d 100755 --- a/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md +++ b/_tutorials/design_features/Turbulent_2D_Constrained_RAE2822.md @@ -60,7 +60,7 @@ OPT_OBJECTIVE= DRAG % ex= (Objective = Value ) * Scale, use '>','<','=' OPT_CONSTRAINT= ( MOMENT_Z < 0.093 ) * 0.001; ( AIRFOIL_THICKNESS > 0.12 ) * 0.001 ``` -In this particular case we are running at a constant lift value, in order to set that feature the relevant part of the configuration file is presented below. The `FIXED_CL_MODE` works by updating the angle of attack (AoA) during the simulation run such that the resulting CL matches the `TARGET_CL` value. The `UPDATE_AOA_ITER_LIMIT` specifies the maximum number of iterations between two AoA updates. The AoA might update sooner if the solution converges (as defined by the convergence parameters) to the wrong CL. The level of CL convergence can be specified by the `CAUCHY_EPS` value which is defined in the Convergence Parameters. `DCL_DALPHA` is the proportional constant that is used to calculate the change in AoA when it updates (Change in AoA = (TARGET_CL - CURRENT_CL)/DCL_DALPHA) +In this particular case we are running at a constant lift value, in order to set that feature the relevant part of the configuration file is presented below. The `FIXED_CL_MODE` works by updating the angle of attack (AoA) during the simulation run such that the resulting CL matches the `TARGET_CL` value. The `UPDATE_AOA_ITER_LIMIT` specifies the maximum number of iterations between two AoA updates. The AoA might update sooner if the solution converges (as defined by the convergence parameters) to the wrong CL. The level of CL convergence can be specified by the `CAUCHY_EPS` value which is defined in the Convergence Parameters. `DCL_DALPHA` is the proportional constant that is used to calculate the change in AoA when it updates (Change in AoA = (TARGET_CL - CURRENT_CL)/DCL_DALPHA). The `ITER_DCL_DALPHA` defines the number of iterations that the run to calculate dCL/dAlpha at the end of the Fixed CL simulation. This calculated value is used by the adjoint to give more accurate gradients with respect to the objective function, when the optimization is run in Fixed CL mode. ``` % -------------------------- CL DRIVER DEFINITION -----------------------------% From ef879889c171c25f25a6de6dfad58359ee023965 Mon Sep 17 00:00:00 2001 From: Jayant Mukhopadhaya Date: Mon, 23 Sep 2019 23:09:30 -0700 Subject: [PATCH 4/9] removing last traces of UPDATE_ALPHA --- Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg | 4 ++-- Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg | 4 +++- .../design_features/Inviscid_2D_Unconstrained_NACA0012.md | 4 ++-- _tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg index d2ffeeb7..e60bd56a 100644 --- a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg +++ b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg @@ -47,8 +47,8 @@ TARGET_CL= 0.286 % Estimation of dCL/dAlpha (0.2 per degree by default) DCL_DALPHA= 0.1 % -% Number of times the AoA is updated in a fix CL problem (5 by default) -UPDATE_ALPHA= 10 +% Maximum number of iterations between AoA updates +UPDATE_AOA_ITER_LIMIT= 150 % % Number of iterations to evaluate dCL_dAlpha by using finite differences (500 by default) ITER_DCL_DALPHA= 500 diff --git a/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg b/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg index 2861c7bc..8f934667 100644 --- a/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg +++ b/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg @@ -98,8 +98,10 @@ NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES % Courant-Friedrichs-Lewy condition of the finest grid CFL_NUMBER= 10.0 % -% Number of total iterations +% Number of total iterations for direct simulation EXT_ITER= 5000 +% +% Number of total iterations for adjoint simulation ITER = 5000 % % Objective function in gradient evaluation (DRAG, LIFT, SIDEFORCE, MOMENT_X, diff --git a/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md b/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md index 67e18b44..82c5cb8f 100755 --- a/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md +++ b/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md @@ -144,8 +144,8 @@ TARGET_CL= 0.326 % Estimation of dCL/dAlpha (0.2 per degree by default) DCL_DALPHA= 0.2 % -% Number of times the AoA is updated in a fix CL problem (5 by default) -UPDATE_ALPHA= 5 +% Maximum number of iterations between AoA updates +UPDATE_AOA_ITER_LIMIT= 50 % % Number of iterations to evaluate dCL_dAlpha by using finite differences (500 by default) ITER_DCL_DALPHA= 250 diff --git a/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md b/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md index 38940896..fdcc2aba 100755 --- a/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md +++ b/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md @@ -54,8 +54,8 @@ TARGET_CL= 0.286 % Estimation of dCL/dAlpha (0.2 per degree by default) DCL_DALPHA= 0.1 % -% Number of times the AoA is updated in a fix CL problem (5 by default) -UPDATE_ALPHA= 10 +% Maximum number of iterations between AoA updates +UPDATE_AOA_ITER_LIMIT= 150 ``` In this particular problem we are setting a value for the lift coefficient equal to 0.286. From 8ffe5820560ada5b593962b927cd78be19f2a4ee Mon Sep 17 00:00:00 2001 From: Jayant Mukhopadhaya Date: Mon, 23 Sep 2019 23:21:45 -0700 Subject: [PATCH 5/9] change some options for better convergence --- Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg index e60bd56a..2939eca1 100644 --- a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg +++ b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg @@ -177,7 +177,7 @@ GEO_MODE= FUNCTION CONV_CRITERIA= RESIDUAL % % Residual reduction (order of magnitude with respect to the initial value) -RESIDUAL_REDUCTION= 10 +RESIDUAL_REDUCTION= 8 % % Min value of the residual (log10 of the residual) RESIDUAL_MINVAL= -12 @@ -189,7 +189,7 @@ STARTCONV_ITER= 25 CAUCHY_ELEMS= 100 % % Epsilon to control the series convergence -CAUCHY_EPS= 1E-10 +CAUCHY_EPS= 1E-6 % % Direct function to apply the convergence criteria (LIFT, DRAG, NEARFIELD_PRESS) CAUCHY_FUNC_FLOW= DRAG From a7c2941685347641f2ea3ae4545c4885e0b6a823 Mon Sep 17 00:00:00 2001 From: Jayant Mukhopadhaya Date: Mon, 23 Sep 2019 23:43:30 -0700 Subject: [PATCH 6/9] added ITER option for oneram6 design --- Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg index 2939eca1..d02896b6 100644 --- a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg +++ b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg @@ -106,6 +106,9 @@ CFL_NUMBER= 7.5 % % Number of total iterations EXT_ITER= 1500 +% +% Number of total iterations for adjoint simulation +ITER = 1500 % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % From ad132e89ea3335b6257227ab435087222233a43e Mon Sep 17 00:00:00 2001 From: Jayant Mukhopadhaya Date: Tue, 24 Sep 2019 00:03:52 -0700 Subject: [PATCH 7/9] minor fixes --- .../inv_ONERAM6_adv.cfg | 2 +- .../turb_SA_RAE2822.cfg | 2 +- .../Inviscid_2D_Unconstrained_NACA0012.md | 2 +- .../Inviscid_3D_Constrained_ONERAM6.md | 494 +++++++++--------- 4 files changed, 250 insertions(+), 250 deletions(-) diff --git a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg index d02896b6..73f04665 100644 --- a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg +++ b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg @@ -36,7 +36,7 @@ FREESTREAM_PRESSURE= 101325.0 % Free-stream temperature (288.15 K by default) FREESTREAM_TEMPERATURE= 288.15 -% -------------------------- CL & CM DRIVER DEFINITION ------------------------% +% -------------------------- CL DRIVER DEFINITION -----------------------------% % % Activate fixed lift mode (specify a CL instead of AoA, NO/YES) FIXED_CL_MODE= YES diff --git a/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg b/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg index 8f934667..0df8e02f 100644 --- a/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg +++ b/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg @@ -42,7 +42,7 @@ REYNOLDS_NUMBER= 6.5E6 % Reynolds length (1 m by default) REYNOLDS_LENGTH= 1.0 -% -------------------------- CL & CM DRIVER DEFINITION ------------------------% +% -------------------------- CL DRIVER DEFINITION -----------------------------% % % Activate fixed lift mode (specify a CL instead of AoA, NO/YES) FIXED_CL_MODE= YES diff --git a/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md b/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md index 82c5cb8f..e3f06b7d 100755 --- a/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md +++ b/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012.md @@ -133,7 +133,7 @@ The `DEFINITION_DV` is the list of design variables. For the airfoil problem, we It is quite common to introduce angle of attack as a design variable (with a given Cl). In that case, you should add to the config file the following extra information: ``` -% -------------------------- CL & CM DRIVER DEFINITION ------------------------% +% -------------------------- CL DRIVER DEFINITION -----------------------------% % % Activate fixed lift mode (specify a CL instead of AoA, NO/YES) FIXED_CL_MODE= YES diff --git a/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md b/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md index fdcc2aba..1e1d1dab 100755 --- a/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md +++ b/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md @@ -1,247 +1,247 @@ ---- -title: Constrained shape design of a transonic inviscid wing at a cte. CL -permalink: /tutorials/Inviscid_3D_Constrained_ONERAM6/ ---- - -![Opt. ONERA Orig](../../Inviscid_3D_Constrained_ONERAM6/images/onera_opt_history.png) - -## Goals - -Upon completing this tutorial, the user will be familiar with performing an optimal shape design of a 3D geometry. The initial geometry chosen for the tutorial is a ONERA M6 wing at transonic speed in inviscid fluid and constant Cl (common setting in aeronautical problems). The following SU2 tools will be showcased in this tutorial: -- **SU2_CFD** - performs the direct flow simulations. -- **SU2_CFD_AD** - performs the adjoint flow simulations. -- **SU2_DOT_AD** - projects the adjoint surface sensitivities into the design space to obtain the gradient. -- **SU2_DEF** - deforms the geometry and mesh with changes in the design variables during the shape optimization process. -- **SU2_GEO** - evaluates the thickness of the specified wing stations and their gradients. -- **shape_optimization.py** - automates the entire shape design process by executing the SU2 tools and optimizer. - -## Resources - -The resources for this tutorial can be found in the directory [Inviscid_3D_Constrained_ONERAM6](https://github.com/su2code/Tutorials/tree/master/Inviscid_3D_Constrained_ONERAM6) in the [tutorials repository](https://github.com/su2code/Tutorials/tree/master/). You will need the configuration file ([inv_ONERAM6_adv.cfg](../../Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg)) and the mesh file ([mesh_ONERAM6_inv_FFD.su2](../../Inviscid_3D_Constrained_ONERAM6/mesh_ONERAM6_inv_FFD.su2)). - -Note that the mesh file already contains information about the definition of the Free Form Deformation (FFD) used for the definition of 3D design variables, but we will discuss how this is created below. - -## Tutorial - -The following tutorial will walk you through the steps required when performing 3D shape design using SU2, including the FFD tools. It is assumed that you have already obtained and compiled SU2_CFD, SU2_DOT, SU2_CFD_AD, SU2_DOT_AD, SU2_GEO and SU2_DEF. The design loop is driven by the shape_optimization.py script, and thus Python along with the NumPy and SciPy Python modules are required for this tutorial. If you have yet to complete these requirements, please see the Download and Installation pages (including the AD part). - -### Problem Setup - -The goal of this wing design problem is to minimize the coefficient of drag by changing the shape while imposing lift and wing section thickness constraints. As design variables, we will use a free-form deformation approach. In this approach, a lattice of control points making up a bounding box are placed around the geometry, and the movement of these control points smoothly deforms the surface shape of the geometry inside. We begin with a 3D fixed-wing geometry (initially the ONERA M6) at transonic speed in air (inviscid). The flow conditions are the same as for the previous ONERA M6 tutorial. - -![Opt. ONERA Grid](../../Inviscid_3D_Constrained_ONERAM6/images/onera_grid.png) -Figure (1): View of the initial surface computational mesh. - -### Mesh Description - -The mesh consists of a far-field boundary divided in three surfaces (XNORMAL_FACES, ZNORMAL_FACES, YNORMAL_FACES), an Euler wall (flow tangency) divided into three surfaces (UPPER_SIDE, LOWER_SIDE, TIP), and a symmetry plane (SYMMETRY_FACE). The baseline mesh is the same as for the previous ONERA M6 tutorial. The surface mesh can be seen in Figure (1). - -![Opt. ONERA FFD](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd.png) -Figure (2): View of the initial FFD box around the ONERA M6 wing, including the control points (spheres). - -### Setting a constant Cl mode - -In aeronautical application is common to design at a constant Cl instead of at constant Angle of Attack (AoA). In this case, the AoA is introduced as a design variable to achieve a particular Cl value. SU2 can directly use AoA as design variable but, that method requires to solve an adjoint equation for the Cl constraint. The preferred strategy is to run the direct solver in cte. Cl mode and the adjoint solver will compute the appropriate derivative for that mode. The basic setting for running at a constant Cl mode is described below: -``` -% -------------------------- CL & CM DRIVER DEFINITION ------------------------% -% -% Activate fixed lift mode (specify a CL instead of AoA, NO/YES) -FIXED_CL_MODE= YES -% -% Target coefficient of lift for fixed lift mode (0.80 by default) -TARGET_CL= 0.286 -% -% Estimation of dCL/dAlpha (0.2 per degree by default) -DCL_DALPHA= 0.1 -% -% Maximum number of iterations between AoA updates -UPDATE_AOA_ITER_LIMIT= 150 - -``` -In this particular problem we are setting a value for the lift coefficient equal to 0.286. - - -### Setting up a Free-Form Deformation Box - -The mesh file that is provided for this test case already contains the FFD information. However, if you are interested in repeating this process for your own design cases, it is necessary to calculate the position of the control points and the parametric coordinates. The description below describes how to set up FFD boxes for deformation. - -The design variables are defined using the FFD methodology. We will customize a set an options that specifically target FFD box creation: - -``` -% -------------------- FREE-FORM DEFORMATION PARAMETERS -----------------------% -% -% Tolerance of the Free-Form Deformation point inversion -FFD_TOLERANCE= 1E-10 -% -% Maximum number of iterations in the Free-Form Deformation point inversion -FFD_ITERATIONS= 500 -% -% FFD box definition: 3D case (FFD_BoxTag, X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, X4, Y4, Z4, -% X5, Y5, Z5, X6, Y6, Z6, X7, Y7, Z7, X8, Y8, Z8) -% 2D case (FFD_BoxTag, X1, Y1, 0.0, X2, Y2, 0.0, X3, Y3, 0.0, X4, Y4, 0.0, -% 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) -FFD_DEFINITION= (WING, -0.0403, 0, -0.04836, 0.8463,0, -0.04836, 1.209, 1.2896, -0.04836, 0.6851, 1.2896, -0.04836, -0.0403, 0, 0.04836, 0.8463, 0, 0.04836, 1.209, 1.2896, 0.04836, 0.6851, 1.2896, 0.04836) -% -% FFD box degree: 3D case (x_degree, y_degree, z_degree) -% 2D case (x_degree, y_degree, 0) -FFD_DEGREE= (10, 8, 1) -% -% Surface continuity at the intersection with the FFD (1ST_DERIVATIVE, 2ND_DERIVATIVE) -FFD_CONTINUITY= 2ND_DERIVATIVE -``` - -As the current implementation requires each FFD box to be a quadrilaterally-faced hexahedron (6 faces, 12 edges, 8 vertices), we can simply specify the 8 corner points of the box and the polynomial degree we would like to represent along each coordinate direction (x,y,z) in order to create the complete lattice of control points. It is convenient to think of the FFD box as a small structured mesh block with (i,j,k) indices for the control points, and note that the number of control points in each direction is the specified polynomial degree plus one. - -In the example above, we are creating a box with control point dimensions 11, 9, and 2 in the x-, y-, and z-directions, respectively, for a total of 198 available control points. In the `FFD_DEFINITION` option, we give a name to the box ("WING"), and then list out the x, y, and z coordinates of each corner point. The order is important, and you can use the example above to match the convention. The degree is then specified in the `FFD_DEGREE` option. A view of the box with the control points numbered is in Figure (3). Note that the numbering in the figure is 1-based just for visualization, but within SU2, the control points have 0-based indexing. For example, the (1,1,1) control point in the figure is control point (0,0,0) within SU2. This is critical for specifying the design variables in the config file. - -![Opt. ONERA FFD](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd_points.png) -Figure (3): View of the control point identifying indices, which increase in value along the positive coordinate directions. Note that the numbering here is 1-based just for visualization, but within SU2, the control points have 0-based indexing. - -Lastly, the FFD capabilities within SU2 also feature a nifty technique to automatically ensure that you do not obtain any jumps or kinks in your deformed geometry. You can control this by requesting continuity in the 1st or 2nd derivative of the surface with the `FFD_CONTINUITY` option. In short, the code will automatically detect when a face of the FFD box intersects the geometry, and it will hold fixed the control points on that face (`1ST_DERIVATIVE`) or the points on the face as well as one slice of adjacent control points (`2ND_DERIVATIVE`). **Note that these control points will be held fixed during design cycles even if you specify them in your design variable list**. - -Now that the FFD box has been defined using the options, follow these steps at a terminal command line to generate a **new** mesh that contains the FFD box: - 1. Move to the directory containing the config file (inv_ONERAM6_adv.cfg) and the mesh file (mesh_ONERAM6_inv_FFD.su2). Make sure that the SU2 tools were compiled, installed, and that their install location was added to your path. - 2. Check that DV_KIND= FFD_SETTING in the configuration file. - 3. Execute SU2_DEF by entering "SU2_DEF inv_ONERAM6_adv.cfg" at the command line. This can also be executed in parallel (e.g. $mpirun -n 10 SU2_DEF inv_ONERAM6_adv.cfg). - 4. After completing the FFD mapping process, a mesh file named "mesh_out.su2" (by default) is now in the directory. Rename that file to "mesh_ONERAM6_inv_FFD.su2". Note that this new mesh file contains all the details of the FFD method. - -With this preprocessing, the position of the control points and the parametric coordinates have been calculated. The preprocessing only needs to be performed once, and afterward, the new (x,y,z) coordinates of the geometry surface due to control point displacements can be quickly evaluated from the mapping. This information is stored in a native format at the bottom of the SU2 mesh file. You will use this new mesh for the design process. If you find that your particular case stalls or throws errors during the creation of the box, the `FFD_TOLERANCE` and `FFD_ITERATIONS` parameters can be adjusted to achieve convergence of the algorithm. - -### Evaluating the Geometry - -In this particular problem the objective is to introduce a set of geometrical constraints. The first step is to check that SU2 is able to compute the correct geometrical quantities via executing SU2_GEO. The important information for SU2_GEO configuration file is provided below - -``` -% ----------------------- GEOMETRY EVALUATION PARAMETERS ----------------------% -% -% Marker(s) of the surface where geometrical based function will be evaluated -GEO_MARKER= ( UPPER_SIDE, LOWER_SIDE, TIP ) -% -% Description of the geometry to be analyzed (AIRFOIL, WING, FUSELAGE) -GEO_DESCRIPTION= WING -% -% Coordinate of the stations to be analyzed -GEO_LOCATION_STATIONS= (0.0, 0.2, 0.4, 0.6, 0.8) -% -% Geometrical bounds (Y coordinate) for the wing geometry analysis or -% fuselage evaluation (X coordinate) -GEO_BOUNDS= (0, 0.8) -% -% Plot loads and Cp distributions on each airfoil section -GEO_PLOT_STATIONS= YES -% -% Number of section cuts to make when calculating wing geometry -GEO_NUMBER_STATIONS= 25 -% -% Geometrical evaluation mode (FUNCTION, GRADIENT) -GEO_MODE= FUNCTION -``` - -On other words, we need to specify where the wing stations are located to apply the thickness constraints. In this config file, 5 thickness constraints can be applied during design defined in `GEO_LOCATION_STATIONS`. The thicknesses and their gradients are computed using the SU2_GEO module. As you can see, we need to specify the names of the markers that make up the geometry of interest in `GEO_MARKER` the kind of geometry that SU2_GEO is slicing `GEO_DESCRIPTION` and the physical bounds for the wing (Y coordinate). By using `GEO_PLOT_STATIONS` SU2_CFD will plot the Cp at each section and a spanload distribution plot. - -With this setting it is now appropriate to execute SU2_GEO by typing "SU2_GEO inv_ONERAM6_adv.cfg" at the command line to obtain a baseline measurement of the wing thickness at the 5 stations. Remember that SU2_GEO can also be executed in parallel (e.g. $mpirun -n 10 SU2_GEO inv_ONERAM6_adv.cfg). The following information came from the SU2_GEO screen output: - -``` -Wing volume: 0.0260712 m^3. Wing min. thickness: 0.0553114 m. Wing max. thickness: 0.0784087 m. -Wing min. chord: 0.5688 m. Wing max. chord: 0.805999 m. Wing min. LE radius: 78.156 1/m. Wing max. LE radius: 117.586 1/m. -Wing min. ToC: 0.0971893. Wing max. ToC: 0.0974553. Wing delta ToC: 0.0271893. Wing max. twist: 0.016874 deg. -Wing max. curvature: 0.332163 1/m. Wing max. dihedral: 0.362135 deg. - --------------------- Objective function evaluation ---------------------- - -Station 1. YCoord: 1e-16 m, Area: 0.0443805 m^2, Thickness: 0.0784087 m, -Chord: 0.805999 m, LE radius: 78.156 1/m, ToC: 0.0972814, Twist angle: 0 deg. -Station 2. YCoord: 0.2 m, Area: 0.0380789 m^2, Thickness: 0.0726176 m, -Chord: 0.7467 m, LE radius: 90.7731 1/m, ToC: 0.0972514, Twist angle: 0 deg. -Station 3. YCoord: 0.4 m, Area: 0.0322669 m^2, Thickness: 0.0668227 m, -Chord: 0.6874 m, LE radius: 100.28 1/m, ToC: 0.0972109, Twist angle: 0 deg. -Station 4. YCoord: 0.6 m, Area: 0.0269361 m^2, Thickness: 0.0610663 m, -Chord: 0.626609 m, LE radius: 104.201 1/m, ToC: 0.0974553, Twist angle: 0.016874 deg. -Station 5. YCoord: 0.8 m, Area: 0.0220888 m^2, Thickness: 0.0553114 m, -Chord: 0.5688 m, LE radius: 117.586 1/m, ToC: 0.0972423, Twist angle: 0 deg. -``` - -Furthermore, SU2_GEO has created two interesting files with geometrical information: `wing_description.dat` and `wing_slices.dat` that can be used to fully understand the wing geometry. - - -### Defining the Optimization Problem - -Several of the key configuration file options are highlighted here. Since we are using the same flow problem from the previous tutorials, we will focus on the new design parameter options: -``` -% --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------% -% -% Optimization objective function with scaling factor -% ex= Objective * Scale -OPT_OBJECTIVE= DRAG -% -% Optimization constraint functions with scaling factors, separated by semicolons -% ex= (Objective = Value ) * Scale, use '>','<','=' -OPT_CONSTRAINT= (STATION1_THICKNESS > 0.077) * 0.001; (STATION2_THICKNESS > 0.072) * 0.001; (STATION3_THICKNESS > 0.066) * 0.001; (STATION4_THICKNESS > 0.060) * 0.001; (STATION5_THICKNESS > 0.054) * 0.001 -% -% Factor to reduce the norm of the gradient (affects the objective function and gradient in the python scripts) -% In general, a norm of the gradient ~1E-6 is desired. -OPT_GRADIENT_FACTOR= 1E-5 -% -% Factor to relax or accelerate the optimizer convergence (affects the line search in SU2_DEF) -% In general, surface deformations of 0.01'' or 0.0001m are desirable -OPT_RELAX_FACTOR= 1E3 -% -% Maximum number of iterations -OPT_ITERATIONS= 100 -% -% Requested accuracy -OPT_ACCURACY= 1E-10 -% -% Upper bound for each design variable -OPT_BOUND_UPPER= 0.3 -% -% Lower bound for each design variable -OPT_BOUND_LOWER= -0.3 -% -% Optimization design variables, separated by semicolons -% ex= FFD_CONTROL_POINT ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) -DEFINITION_DV= ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 1, 0, 0.0, 0.0, 1.0 ); ... -``` - -Here, we define the objective function for the optimization as drag with thickness constraints along 5 sections of the wing. The `DEFINITION_DV` is the list of design variables, note that this is a simulation/optimization at a cte. Cl and the angle of attack is a design variable. For this problem, we want to minimize the drag by changing the position of the control points of the control box. To do so, we list the set of FFD control points that we would like to use as variables. Each design variable is separated by a semicolon. The first value in the parentheses is the variable type, which is 11 for an FFD control point movement. The second value is the scale of the variable (typically left as 1.0). The name between the vertical bars is the marker tag(s) where the variable deformations will be applied. The final seven values in the parentheses are the particular information about the deformation: identification of the FFD tag, the i, j, and k index of the control point, and the allowed x, y, and z movement direction of the control point. Note that other types of design variables have their own specific input format. For this example, we have a long list of design variables that are not all listed above. You can quickly generate a list of FFD variables in the necessary format using the **set_ffd_design_var.py** script that is shipped with the other Python utilities with the source code. -``` -$ python set_ffd_design_var.py -i 10 -j 8 -k 1 -b WING -m 'UPPER_SIDE, LOWER_SIDE, TIP' -``` - -The selection of `OPT_GRADIENT_FACTOR` and `OPT_RELAX_FACTOR` has a particular impact on the optimization. The `OPT_GRADIENT_FACTOR` is used to obtain a gradient norm (GNORM column in the shape_optimization.py screen output) of the order of 1E-6. On the other hand, `OPT_RELAX_FACTOR` is used to aid the optimizer in taking a physically appropriate first step (i.e., not too small or too large), the easiest way to check the initial step is by looking at `Max Diff:` value in `DSN_002/DEFORM/log_Deform.out`, in fact that value is the maximum difference between the baseline geometry and the deformed geometry in the first step of the optimization. - -In this particular optimization problem it is also important to adjust the scale of the `OPT_CONSTRAINT` this scale factor is an effective method to control how much the violated constraint is going to change the objective function gradient (push factor). The selection and adjustment of these three parameters is important to fully exploit the possibilities of the Python gradient based optimizers. - - -### Running SU2 - -A discrete adjoint methodology for obtaining surface sensitivities is implemented for several equation sets within SU2. After solving the direct flow problem, the adjoint problem is also solved. The adjoint method offers an efficient approach for calculating the gradient of an objective function with respect to a large set of design variables. This leads directly to a gradient-based optimization framework. - -With each design iteration, the direct and adjoint solutions are used to compute the objective function and gradient, and the optimizer drives the shape changes with this information in order to minimize the objective. Each flow constraint requires the solution of an additional adjoint problem to compute its gradient (lift in this case). Three other SU2 tools are used in the design process here: SU2_DOT to compute the gradient from the adjoint surface sensitivities and input design space, SU2_GEO to compute wing section thicknesses and their gradients, and SU2_DEF to deform the computational mesh between design cycles. To run this case, follow these steps at a terminal command line: - 1. Execute the shape optimization script by entering - - ``` - $ shape_optimization.py -g DISCRETE_ADJOINT -f inv_ONERAM6_adv.cfg - ``` - - at the command line, add `-n 12` in case you want to run the optimization in parallel (12 cores). Again, note that Python, NumPy, and SciPy are all required to run the script. - - 2. The python script will drive the optimization process by executing flow solutions, adjoint solutions, gradient projection, geometry evaluations, and mesh deformation in order to drive the design toward an optimum. The optimization process will cease when certain tolerances set within the SciPy optimizer are met. Note that is is possible to start the optimization from a pre-converged solution (direct and adjoint problem), in that case the following change should be done in the configuration file: `RESTART_SOL= YES`. - 3. Solution files containing the flow and surface data will be written for each flow solution and adjoint solution and can be found in the DESIGNS directory that is created. The file named history_project.plt (or history_project.csv for ParaView) will contain the functional values of interest resulting from each evaluation during the optimization. The major iterations and function evaluations for the SLSQP optimizer will be written to the console during execution. - -### Results - -The following are representative results for this transonic shape design example with the ONERA M6 geometry as a baseline. We successfully reduce the drag while satisfying the constraints. - -![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_pressure_original.png) -Figure (4): Pressure contours showing the typical "lambda" shock on the upper surface of the initial geometry. - -![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_pressure_final.png) -Figure (5): Pressure contours on the surface of the final wing design (reduced shocks). - -![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd_final.png) -Figure (6): View of the initial (black) and final (blue) FFD control point positions. - -![Opt. ONERA History](../../Inviscid_3D_Constrained_ONERAM6/images/onera_opt_history.png) -Figure (7): Optimization history. The drag is reduced and the lift constraint is easily met. - +--- +title: Constrained shape design of a transonic inviscid wing at a cte. CL +permalink: /tutorials/Inviscid_3D_Constrained_ONERAM6/ +--- + +![Opt. ONERA Orig](../../Inviscid_3D_Constrained_ONERAM6/images/onera_opt_history.png) + +## Goals + +Upon completing this tutorial, the user will be familiar with performing an optimal shape design of a 3D geometry. The initial geometry chosen for the tutorial is a ONERA M6 wing at transonic speed in inviscid fluid and constant Cl (common setting in aeronautical problems). The following SU2 tools will be showcased in this tutorial: +- **SU2_CFD** - performs the direct flow simulations. +- **SU2_CFD_AD** - performs the adjoint flow simulations. +- **SU2_DOT_AD** - projects the adjoint surface sensitivities into the design space to obtain the gradient. +- **SU2_DEF** - deforms the geometry and mesh with changes in the design variables during the shape optimization process. +- **SU2_GEO** - evaluates the thickness of the specified wing stations and their gradients. +- **shape_optimization.py** - automates the entire shape design process by executing the SU2 tools and optimizer. + +## Resources + +The resources for this tutorial can be found in the directory [Inviscid_3D_Constrained_ONERAM6](https://github.com/su2code/Tutorials/tree/master/Inviscid_3D_Constrained_ONERAM6) in the [tutorials repository](https://github.com/su2code/Tutorials/tree/master/). You will need the configuration file ([inv_ONERAM6_adv.cfg](../../Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg)) and the mesh file ([mesh_ONERAM6_inv_FFD.su2](../../Inviscid_3D_Constrained_ONERAM6/mesh_ONERAM6_inv_FFD.su2)). + +Note that the mesh file already contains information about the definition of the Free Form Deformation (FFD) used for the definition of 3D design variables, but we will discuss how this is created below. + +## Tutorial + +The following tutorial will walk you through the steps required when performing 3D shape design using SU2, including the FFD tools. It is assumed that you have already obtained and compiled SU2_CFD, SU2_DOT, SU2_CFD_AD, SU2_DOT_AD, SU2_GEO and SU2_DEF. The design loop is driven by the shape_optimization.py script, and thus Python along with the NumPy and SciPy Python modules are required for this tutorial. If you have yet to complete these requirements, please see the Download and Installation pages (including the AD part). + +### Problem Setup + +The goal of this wing design problem is to minimize the coefficient of drag by changing the shape while imposing lift and wing section thickness constraints. As design variables, we will use a free-form deformation approach. In this approach, a lattice of control points making up a bounding box are placed around the geometry, and the movement of these control points smoothly deforms the surface shape of the geometry inside. We begin with a 3D fixed-wing geometry (initially the ONERA M6) at transonic speed in air (inviscid). The flow conditions are the same as for the previous ONERA M6 tutorial. + +![Opt. ONERA Grid](../../Inviscid_3D_Constrained_ONERAM6/images/onera_grid.png) +Figure (1): View of the initial surface computational mesh. + +### Mesh Description + +The mesh consists of a far-field boundary divided in three surfaces (XNORMAL_FACES, ZNORMAL_FACES, YNORMAL_FACES), an Euler wall (flow tangency) divided into three surfaces (UPPER_SIDE, LOWER_SIDE, TIP), and a symmetry plane (SYMMETRY_FACE). The baseline mesh is the same as for the previous ONERA M6 tutorial. The surface mesh can be seen in Figure (1). + +![Opt. ONERA FFD](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd.png) +Figure (2): View of the initial FFD box around the ONERA M6 wing, including the control points (spheres). + +### Setting a constant Cl mode + +In aeronautical application is common to design at a constant Cl instead of at constant Angle of Attack (AoA). In this case, the AoA is introduced as a design variable to achieve a particular Cl value. SU2 can directly use AoA as design variable but, that method requires to solve an adjoint equation for the Cl constraint. The preferred strategy is to run the direct solver in cte. Cl mode and the adjoint solver will compute the appropriate derivative for that mode. The basic setting for running at a constant Cl mode is described below: +``` +% -------------------------- CL DRIVER DEFINITION ------------------------% +% +% Activate fixed lift mode (specify a CL instead of AoA, NO/YES) +FIXED_CL_MODE= YES +% +% Target coefficient of lift for fixed lift mode (0.80 by default) +TARGET_CL= 0.286 +% +% Estimation of dCL/dAlpha (0.2 per degree by default) +DCL_DALPHA= 0.1 +% +% Maximum number of iterations between AoA updates +UPDATE_AOA_ITER_LIMIT= 150 + +``` +In this particular problem we are setting a value for the lift coefficient equal to 0.286. The `FIXED_CL_MODE` works by updating the angle of attack (AoA) during the simulation run such that the resulting CL matches the `TARGET_CL` value. The `UPDATE_AOA_ITER_LIMIT` specifies the maximum number of iterations between two AoA updates. The AoA might update sooner if the solution converges (as defined by the convergence parameters) to the wrong CL. The level of CL convergence can be specified by the `CAUCHY_EPS` value which is defined in the Convergence Parameters. `DCL_DALPHA` is the proportional constant that is used to calculate the change in AoA when it updates (Change in AoA = (TARGET_CL - CURRENT_CL)/DCL_DALPHA). The `ITER_DCL_DALPHA` defines the number of iterations that the run to calculate dCL/dAlpha at the end of the Fixed CL simulation. This calculated value is used by the adjoint to give more accurate gradients with respect to the objective function, when the optimization is run in Fixed CL mode. + + +### Setting up a Free-Form Deformation Box + +The mesh file that is provided for this test case already contains the FFD information. However, if you are interested in repeating this process for your own design cases, it is necessary to calculate the position of the control points and the parametric coordinates. The description below describes how to set up FFD boxes for deformation. + +The design variables are defined using the FFD methodology. We will customize a set an options that specifically target FFD box creation: + +``` +% -------------------- FREE-FORM DEFORMATION PARAMETERS -----------------------% +% +% Tolerance of the Free-Form Deformation point inversion +FFD_TOLERANCE= 1E-10 +% +% Maximum number of iterations in the Free-Form Deformation point inversion +FFD_ITERATIONS= 500 +% +% FFD box definition: 3D case (FFD_BoxTag, X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, X4, Y4, Z4, +% X5, Y5, Z5, X6, Y6, Z6, X7, Y7, Z7, X8, Y8, Z8) +% 2D case (FFD_BoxTag, X1, Y1, 0.0, X2, Y2, 0.0, X3, Y3, 0.0, X4, Y4, 0.0, +% 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) +FFD_DEFINITION= (WING, -0.0403, 0, -0.04836, 0.8463,0, -0.04836, 1.209, 1.2896, -0.04836, 0.6851, 1.2896, -0.04836, -0.0403, 0, 0.04836, 0.8463, 0, 0.04836, 1.209, 1.2896, 0.04836, 0.6851, 1.2896, 0.04836) +% +% FFD box degree: 3D case (x_degree, y_degree, z_degree) +% 2D case (x_degree, y_degree, 0) +FFD_DEGREE= (10, 8, 1) +% +% Surface continuity at the intersection with the FFD (1ST_DERIVATIVE, 2ND_DERIVATIVE) +FFD_CONTINUITY= 2ND_DERIVATIVE +``` + +As the current implementation requires each FFD box to be a quadrilaterally-faced hexahedron (6 faces, 12 edges, 8 vertices), we can simply specify the 8 corner points of the box and the polynomial degree we would like to represent along each coordinate direction (x,y,z) in order to create the complete lattice of control points. It is convenient to think of the FFD box as a small structured mesh block with (i,j,k) indices for the control points, and note that the number of control points in each direction is the specified polynomial degree plus one. + +In the example above, we are creating a box with control point dimensions 11, 9, and 2 in the x-, y-, and z-directions, respectively, for a total of 198 available control points. In the `FFD_DEFINITION` option, we give a name to the box ("WING"), and then list out the x, y, and z coordinates of each corner point. The order is important, and you can use the example above to match the convention. The degree is then specified in the `FFD_DEGREE` option. A view of the box with the control points numbered is in Figure (3). Note that the numbering in the figure is 1-based just for visualization, but within SU2, the control points have 0-based indexing. For example, the (1,1,1) control point in the figure is control point (0,0,0) within SU2. This is critical for specifying the design variables in the config file. + +![Opt. ONERA FFD](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd_points.png) +Figure (3): View of the control point identifying indices, which increase in value along the positive coordinate directions. Note that the numbering here is 1-based just for visualization, but within SU2, the control points have 0-based indexing. + +Lastly, the FFD capabilities within SU2 also feature a nifty technique to automatically ensure that you do not obtain any jumps or kinks in your deformed geometry. You can control this by requesting continuity in the 1st or 2nd derivative of the surface with the `FFD_CONTINUITY` option. In short, the code will automatically detect when a face of the FFD box intersects the geometry, and it will hold fixed the control points on that face (`1ST_DERIVATIVE`) or the points on the face as well as one slice of adjacent control points (`2ND_DERIVATIVE`). **Note that these control points will be held fixed during design cycles even if you specify them in your design variable list**. + +Now that the FFD box has been defined using the options, follow these steps at a terminal command line to generate a **new** mesh that contains the FFD box: + 1. Move to the directory containing the config file (inv_ONERAM6_adv.cfg) and the mesh file (mesh_ONERAM6_inv_FFD.su2). Make sure that the SU2 tools were compiled, installed, and that their install location was added to your path. + 2. Check that DV_KIND= FFD_SETTING in the configuration file. + 3. Execute SU2_DEF by entering "SU2_DEF inv_ONERAM6_adv.cfg" at the command line. This can also be executed in parallel (e.g. $mpirun -n 10 SU2_DEF inv_ONERAM6_adv.cfg). + 4. After completing the FFD mapping process, a mesh file named "mesh_out.su2" (by default) is now in the directory. Rename that file to "mesh_ONERAM6_inv_FFD.su2". Note that this new mesh file contains all the details of the FFD method. + +With this preprocessing, the position of the control points and the parametric coordinates have been calculated. The preprocessing only needs to be performed once, and afterward, the new (x,y,z) coordinates of the geometry surface due to control point displacements can be quickly evaluated from the mapping. This information is stored in a native format at the bottom of the SU2 mesh file. You will use this new mesh for the design process. If you find that your particular case stalls or throws errors during the creation of the box, the `FFD_TOLERANCE` and `FFD_ITERATIONS` parameters can be adjusted to achieve convergence of the algorithm. + +### Evaluating the Geometry + +In this particular problem the objective is to introduce a set of geometrical constraints. The first step is to check that SU2 is able to compute the correct geometrical quantities via executing SU2_GEO. The important information for SU2_GEO configuration file is provided below + +``` +% ----------------------- GEOMETRY EVALUATION PARAMETERS ----------------------% +% +% Marker(s) of the surface where geometrical based function will be evaluated +GEO_MARKER= ( UPPER_SIDE, LOWER_SIDE, TIP ) +% +% Description of the geometry to be analyzed (AIRFOIL, WING, FUSELAGE) +GEO_DESCRIPTION= WING +% +% Coordinate of the stations to be analyzed +GEO_LOCATION_STATIONS= (0.0, 0.2, 0.4, 0.6, 0.8) +% +% Geometrical bounds (Y coordinate) for the wing geometry analysis or +% fuselage evaluation (X coordinate) +GEO_BOUNDS= (0, 0.8) +% +% Plot loads and Cp distributions on each airfoil section +GEO_PLOT_STATIONS= YES +% +% Number of section cuts to make when calculating wing geometry +GEO_NUMBER_STATIONS= 25 +% +% Geometrical evaluation mode (FUNCTION, GRADIENT) +GEO_MODE= FUNCTION +``` + +On other words, we need to specify where the wing stations are located to apply the thickness constraints. In this config file, 5 thickness constraints can be applied during design defined in `GEO_LOCATION_STATIONS`. The thicknesses and their gradients are computed using the SU2_GEO module. As you can see, we need to specify the names of the markers that make up the geometry of interest in `GEO_MARKER` the kind of geometry that SU2_GEO is slicing `GEO_DESCRIPTION` and the physical bounds for the wing (Y coordinate). By using `GEO_PLOT_STATIONS` SU2_CFD will plot the Cp at each section and a spanload distribution plot. + +With this setting it is now appropriate to execute SU2_GEO by typing "SU2_GEO inv_ONERAM6_adv.cfg" at the command line to obtain a baseline measurement of the wing thickness at the 5 stations. Remember that SU2_GEO can also be executed in parallel (e.g. $mpirun -n 10 SU2_GEO inv_ONERAM6_adv.cfg). The following information came from the SU2_GEO screen output: + +``` +Wing volume: 0.0260712 m^3. Wing min. thickness: 0.0553114 m. Wing max. thickness: 0.0784087 m. +Wing min. chord: 0.5688 m. Wing max. chord: 0.805999 m. Wing min. LE radius: 78.156 1/m. Wing max. LE radius: 117.586 1/m. +Wing min. ToC: 0.0971893. Wing max. ToC: 0.0974553. Wing delta ToC: 0.0271893. Wing max. twist: 0.016874 deg. +Wing max. curvature: 0.332163 1/m. Wing max. dihedral: 0.362135 deg. + +-------------------- Objective function evaluation ---------------------- + +Station 1. YCoord: 1e-16 m, Area: 0.0443805 m^2, Thickness: 0.0784087 m, +Chord: 0.805999 m, LE radius: 78.156 1/m, ToC: 0.0972814, Twist angle: 0 deg. +Station 2. YCoord: 0.2 m, Area: 0.0380789 m^2, Thickness: 0.0726176 m, +Chord: 0.7467 m, LE radius: 90.7731 1/m, ToC: 0.0972514, Twist angle: 0 deg. +Station 3. YCoord: 0.4 m, Area: 0.0322669 m^2, Thickness: 0.0668227 m, +Chord: 0.6874 m, LE radius: 100.28 1/m, ToC: 0.0972109, Twist angle: 0 deg. +Station 4. YCoord: 0.6 m, Area: 0.0269361 m^2, Thickness: 0.0610663 m, +Chord: 0.626609 m, LE radius: 104.201 1/m, ToC: 0.0974553, Twist angle: 0.016874 deg. +Station 5. YCoord: 0.8 m, Area: 0.0220888 m^2, Thickness: 0.0553114 m, +Chord: 0.5688 m, LE radius: 117.586 1/m, ToC: 0.0972423, Twist angle: 0 deg. +``` + +Furthermore, SU2_GEO has created two interesting files with geometrical information: `wing_description.dat` and `wing_slices.dat` that can be used to fully understand the wing geometry. + + +### Defining the Optimization Problem + +Several of the key configuration file options are highlighted here. Since we are using the same flow problem from the previous tutorials, we will focus on the new design parameter options: +``` +% --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------% +% +% Optimization objective function with scaling factor +% ex= Objective * Scale +OPT_OBJECTIVE= DRAG +% +% Optimization constraint functions with scaling factors, separated by semicolons +% ex= (Objective = Value ) * Scale, use '>','<','=' +OPT_CONSTRAINT= (STATION1_THICKNESS > 0.077) * 0.001; (STATION2_THICKNESS > 0.072) * 0.001; (STATION3_THICKNESS > 0.066) * 0.001; (STATION4_THICKNESS > 0.060) * 0.001; (STATION5_THICKNESS > 0.054) * 0.001 +% +% Factor to reduce the norm of the gradient (affects the objective function and gradient in the python scripts) +% In general, a norm of the gradient ~1E-6 is desired. +OPT_GRADIENT_FACTOR= 1E-5 +% +% Factor to relax or accelerate the optimizer convergence (affects the line search in SU2_DEF) +% In general, surface deformations of 0.01'' or 0.0001m are desirable +OPT_RELAX_FACTOR= 1E3 +% +% Maximum number of iterations +OPT_ITERATIONS= 100 +% +% Requested accuracy +OPT_ACCURACY= 1E-10 +% +% Upper bound for each design variable +OPT_BOUND_UPPER= 0.3 +% +% Lower bound for each design variable +OPT_BOUND_LOWER= -0.3 +% +% Optimization design variables, separated by semicolons +% ex= FFD_CONTROL_POINT ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) +DEFINITION_DV= ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 1, 0, 0.0, 0.0, 1.0 ); ... +``` + +Here, we define the objective function for the optimization as drag with thickness constraints along 5 sections of the wing. The `DEFINITION_DV` is the list of design variables, note that this is a simulation/optimization at a cte. Cl and the angle of attack is a design variable. For this problem, we want to minimize the drag by changing the position of the control points of the control box. To do so, we list the set of FFD control points that we would like to use as variables. Each design variable is separated by a semicolon. The first value in the parentheses is the variable type, which is 11 for an FFD control point movement. The second value is the scale of the variable (typically left as 1.0). The name between the vertical bars is the marker tag(s) where the variable deformations will be applied. The final seven values in the parentheses are the particular information about the deformation: identification of the FFD tag, the i, j, and k index of the control point, and the allowed x, y, and z movement direction of the control point. Note that other types of design variables have their own specific input format. For this example, we have a long list of design variables that are not all listed above. You can quickly generate a list of FFD variables in the necessary format using the **set_ffd_design_var.py** script that is shipped with the other Python utilities with the source code. +``` +$ python set_ffd_design_var.py -i 10 -j 8 -k 1 -b WING -m 'UPPER_SIDE, LOWER_SIDE, TIP' +``` + +The selection of `OPT_GRADIENT_FACTOR` and `OPT_RELAX_FACTOR` has a particular impact on the optimization. The `OPT_GRADIENT_FACTOR` is used to obtain a gradient norm (GNORM column in the shape_optimization.py screen output) of the order of 1E-6. On the other hand, `OPT_RELAX_FACTOR` is used to aid the optimizer in taking a physically appropriate first step (i.e., not too small or too large), the easiest way to check the initial step is by looking at `Max Diff:` value in `DSN_002/DEFORM/log_Deform.out`, in fact that value is the maximum difference between the baseline geometry and the deformed geometry in the first step of the optimization. + +In this particular optimization problem it is also important to adjust the scale of the `OPT_CONSTRAINT` this scale factor is an effective method to control how much the violated constraint is going to change the objective function gradient (push factor). The selection and adjustment of these three parameters is important to fully exploit the possibilities of the Python gradient based optimizers. + + +### Running SU2 + +A discrete adjoint methodology for obtaining surface sensitivities is implemented for several equation sets within SU2. After solving the direct flow problem, the adjoint problem is also solved. The adjoint method offers an efficient approach for calculating the gradient of an objective function with respect to a large set of design variables. This leads directly to a gradient-based optimization framework. + +With each design iteration, the direct and adjoint solutions are used to compute the objective function and gradient, and the optimizer drives the shape changes with this information in order to minimize the objective. Each flow constraint requires the solution of an additional adjoint problem to compute its gradient (lift in this case). Three other SU2 tools are used in the design process here: SU2_DOT to compute the gradient from the adjoint surface sensitivities and input design space, SU2_GEO to compute wing section thicknesses and their gradients, and SU2_DEF to deform the computational mesh between design cycles. To run this case, follow these steps at a terminal command line: + 1. Execute the shape optimization script by entering + + ``` + $ shape_optimization.py -g DISCRETE_ADJOINT -f inv_ONERAM6_adv.cfg + ``` + + at the command line, add `-n 12` in case you want to run the optimization in parallel (12 cores). Again, note that Python, NumPy, and SciPy are all required to run the script. + + 2. The python script will drive the optimization process by executing flow solutions, adjoint solutions, gradient projection, geometry evaluations, and mesh deformation in order to drive the design toward an optimum. The optimization process will cease when certain tolerances set within the SciPy optimizer are met. Note that is is possible to start the optimization from a pre-converged solution (direct and adjoint problem), in that case the following change should be done in the configuration file: `RESTART_SOL= YES`. + 3. Solution files containing the flow and surface data will be written for each flow solution and adjoint solution and can be found in the DESIGNS directory that is created. The file named history_project.plt (or history_project.csv for ParaView) will contain the functional values of interest resulting from each evaluation during the optimization. The major iterations and function evaluations for the SLSQP optimizer will be written to the console during execution. + +### Results + +The following are representative results for this transonic shape design example with the ONERA M6 geometry as a baseline. We successfully reduce the drag while satisfying the constraints. + +![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_pressure_original.png) +Figure (4): Pressure contours showing the typical "lambda" shock on the upper surface of the initial geometry. + +![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_pressure_final.png) +Figure (5): Pressure contours on the surface of the final wing design (reduced shocks). + +![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd_final.png) +Figure (6): View of the initial (black) and final (blue) FFD control point positions. + +![Opt. ONERA History](../../Inviscid_3D_Constrained_ONERAM6/images/onera_opt_history.png) +Figure (7): Optimization history. The drag is reduced and the lift constraint is easily met. + From 555459569020b4fe176b29d9b884823ab70b9de3 Mon Sep 17 00:00:00 2001 From: Jayant Mukhopadhaya Date: Tue, 24 Sep 2019 09:24:46 -0700 Subject: [PATCH 8/9] removed ITER option --- Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg | 3 --- Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg | 3 --- 2 files changed, 6 deletions(-) diff --git a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg index 73f04665..0e1efee9 100644 --- a/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg +++ b/Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg @@ -106,9 +106,6 @@ CFL_NUMBER= 7.5 % % Number of total iterations EXT_ITER= 1500 -% -% Number of total iterations for adjoint simulation -ITER = 1500 % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % diff --git a/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg b/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg index 0df8e02f..38ffe164 100644 --- a/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg +++ b/Turbulent_2D_Constrained_RAE2822/turb_SA_RAE2822.cfg @@ -101,9 +101,6 @@ CFL_NUMBER= 10.0 % Number of total iterations for direct simulation EXT_ITER= 5000 % -% Number of total iterations for adjoint simulation -ITER = 5000 -% % Objective function in gradient evaluation (DRAG, LIFT, SIDEFORCE, MOMENT_X, % MOMENT_Y, MOMENT_Z, EFFICIENCY) OBJECTIVE_FUNCTION= DRAG From eb9a70da9e10b741c03c26ef08ec85be6bd9f520 Mon Sep 17 00:00:00 2001 From: Jayant Mukhopadhaya Date: Tue, 24 Sep 2019 09:29:20 -0700 Subject: [PATCH 9/9] changed options in tutorial page --- .../Inviscid_3D_Constrained_ONERAM6.md | 494 +++++++++--------- 1 file changed, 247 insertions(+), 247 deletions(-) diff --git a/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md b/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md index 1e1d1dab..2bf1e978 100755 --- a/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md +++ b/_tutorials/design_features/Inviscid_3D_Constrained_ONERAM6.md @@ -1,247 +1,247 @@ ---- -title: Constrained shape design of a transonic inviscid wing at a cte. CL -permalink: /tutorials/Inviscid_3D_Constrained_ONERAM6/ ---- - -![Opt. ONERA Orig](../../Inviscid_3D_Constrained_ONERAM6/images/onera_opt_history.png) - -## Goals - -Upon completing this tutorial, the user will be familiar with performing an optimal shape design of a 3D geometry. The initial geometry chosen for the tutorial is a ONERA M6 wing at transonic speed in inviscid fluid and constant Cl (common setting in aeronautical problems). The following SU2 tools will be showcased in this tutorial: -- **SU2_CFD** - performs the direct flow simulations. -- **SU2_CFD_AD** - performs the adjoint flow simulations. -- **SU2_DOT_AD** - projects the adjoint surface sensitivities into the design space to obtain the gradient. -- **SU2_DEF** - deforms the geometry and mesh with changes in the design variables during the shape optimization process. -- **SU2_GEO** - evaluates the thickness of the specified wing stations and their gradients. -- **shape_optimization.py** - automates the entire shape design process by executing the SU2 tools and optimizer. - -## Resources - -The resources for this tutorial can be found in the directory [Inviscid_3D_Constrained_ONERAM6](https://github.com/su2code/Tutorials/tree/master/Inviscid_3D_Constrained_ONERAM6) in the [tutorials repository](https://github.com/su2code/Tutorials/tree/master/). You will need the configuration file ([inv_ONERAM6_adv.cfg](../../Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg)) and the mesh file ([mesh_ONERAM6_inv_FFD.su2](../../Inviscid_3D_Constrained_ONERAM6/mesh_ONERAM6_inv_FFD.su2)). - -Note that the mesh file already contains information about the definition of the Free Form Deformation (FFD) used for the definition of 3D design variables, but we will discuss how this is created below. - -## Tutorial - -The following tutorial will walk you through the steps required when performing 3D shape design using SU2, including the FFD tools. It is assumed that you have already obtained and compiled SU2_CFD, SU2_DOT, SU2_CFD_AD, SU2_DOT_AD, SU2_GEO and SU2_DEF. The design loop is driven by the shape_optimization.py script, and thus Python along with the NumPy and SciPy Python modules are required for this tutorial. If you have yet to complete these requirements, please see the Download and Installation pages (including the AD part). - -### Problem Setup - -The goal of this wing design problem is to minimize the coefficient of drag by changing the shape while imposing lift and wing section thickness constraints. As design variables, we will use a free-form deformation approach. In this approach, a lattice of control points making up a bounding box are placed around the geometry, and the movement of these control points smoothly deforms the surface shape of the geometry inside. We begin with a 3D fixed-wing geometry (initially the ONERA M6) at transonic speed in air (inviscid). The flow conditions are the same as for the previous ONERA M6 tutorial. - -![Opt. ONERA Grid](../../Inviscid_3D_Constrained_ONERAM6/images/onera_grid.png) -Figure (1): View of the initial surface computational mesh. - -### Mesh Description - -The mesh consists of a far-field boundary divided in three surfaces (XNORMAL_FACES, ZNORMAL_FACES, YNORMAL_FACES), an Euler wall (flow tangency) divided into three surfaces (UPPER_SIDE, LOWER_SIDE, TIP), and a symmetry plane (SYMMETRY_FACE). The baseline mesh is the same as for the previous ONERA M6 tutorial. The surface mesh can be seen in Figure (1). - -![Opt. ONERA FFD](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd.png) -Figure (2): View of the initial FFD box around the ONERA M6 wing, including the control points (spheres). - -### Setting a constant Cl mode - -In aeronautical application is common to design at a constant Cl instead of at constant Angle of Attack (AoA). In this case, the AoA is introduced as a design variable to achieve a particular Cl value. SU2 can directly use AoA as design variable but, that method requires to solve an adjoint equation for the Cl constraint. The preferred strategy is to run the direct solver in cte. Cl mode and the adjoint solver will compute the appropriate derivative for that mode. The basic setting for running at a constant Cl mode is described below: -``` -% -------------------------- CL DRIVER DEFINITION ------------------------% -% -% Activate fixed lift mode (specify a CL instead of AoA, NO/YES) -FIXED_CL_MODE= YES -% -% Target coefficient of lift for fixed lift mode (0.80 by default) -TARGET_CL= 0.286 -% -% Estimation of dCL/dAlpha (0.2 per degree by default) -DCL_DALPHA= 0.1 -% -% Maximum number of iterations between AoA updates -UPDATE_AOA_ITER_LIMIT= 150 - -``` -In this particular problem we are setting a value for the lift coefficient equal to 0.286. The `FIXED_CL_MODE` works by updating the angle of attack (AoA) during the simulation run such that the resulting CL matches the `TARGET_CL` value. The `UPDATE_AOA_ITER_LIMIT` specifies the maximum number of iterations between two AoA updates. The AoA might update sooner if the solution converges (as defined by the convergence parameters) to the wrong CL. The level of CL convergence can be specified by the `CAUCHY_EPS` value which is defined in the Convergence Parameters. `DCL_DALPHA` is the proportional constant that is used to calculate the change in AoA when it updates (Change in AoA = (TARGET_CL - CURRENT_CL)/DCL_DALPHA). The `ITER_DCL_DALPHA` defines the number of iterations that the run to calculate dCL/dAlpha at the end of the Fixed CL simulation. This calculated value is used by the adjoint to give more accurate gradients with respect to the objective function, when the optimization is run in Fixed CL mode. - - -### Setting up a Free-Form Deformation Box - -The mesh file that is provided for this test case already contains the FFD information. However, if you are interested in repeating this process for your own design cases, it is necessary to calculate the position of the control points and the parametric coordinates. The description below describes how to set up FFD boxes for deformation. - -The design variables are defined using the FFD methodology. We will customize a set an options that specifically target FFD box creation: - -``` -% -------------------- FREE-FORM DEFORMATION PARAMETERS -----------------------% -% -% Tolerance of the Free-Form Deformation point inversion -FFD_TOLERANCE= 1E-10 -% -% Maximum number of iterations in the Free-Form Deformation point inversion -FFD_ITERATIONS= 500 -% -% FFD box definition: 3D case (FFD_BoxTag, X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, X4, Y4, Z4, -% X5, Y5, Z5, X6, Y6, Z6, X7, Y7, Z7, X8, Y8, Z8) -% 2D case (FFD_BoxTag, X1, Y1, 0.0, X2, Y2, 0.0, X3, Y3, 0.0, X4, Y4, 0.0, -% 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) -FFD_DEFINITION= (WING, -0.0403, 0, -0.04836, 0.8463,0, -0.04836, 1.209, 1.2896, -0.04836, 0.6851, 1.2896, -0.04836, -0.0403, 0, 0.04836, 0.8463, 0, 0.04836, 1.209, 1.2896, 0.04836, 0.6851, 1.2896, 0.04836) -% -% FFD box degree: 3D case (x_degree, y_degree, z_degree) -% 2D case (x_degree, y_degree, 0) -FFD_DEGREE= (10, 8, 1) -% -% Surface continuity at the intersection with the FFD (1ST_DERIVATIVE, 2ND_DERIVATIVE) -FFD_CONTINUITY= 2ND_DERIVATIVE -``` - -As the current implementation requires each FFD box to be a quadrilaterally-faced hexahedron (6 faces, 12 edges, 8 vertices), we can simply specify the 8 corner points of the box and the polynomial degree we would like to represent along each coordinate direction (x,y,z) in order to create the complete lattice of control points. It is convenient to think of the FFD box as a small structured mesh block with (i,j,k) indices for the control points, and note that the number of control points in each direction is the specified polynomial degree plus one. - -In the example above, we are creating a box with control point dimensions 11, 9, and 2 in the x-, y-, and z-directions, respectively, for a total of 198 available control points. In the `FFD_DEFINITION` option, we give a name to the box ("WING"), and then list out the x, y, and z coordinates of each corner point. The order is important, and you can use the example above to match the convention. The degree is then specified in the `FFD_DEGREE` option. A view of the box with the control points numbered is in Figure (3). Note that the numbering in the figure is 1-based just for visualization, but within SU2, the control points have 0-based indexing. For example, the (1,1,1) control point in the figure is control point (0,0,0) within SU2. This is critical for specifying the design variables in the config file. - -![Opt. ONERA FFD](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd_points.png) -Figure (3): View of the control point identifying indices, which increase in value along the positive coordinate directions. Note that the numbering here is 1-based just for visualization, but within SU2, the control points have 0-based indexing. - -Lastly, the FFD capabilities within SU2 also feature a nifty technique to automatically ensure that you do not obtain any jumps or kinks in your deformed geometry. You can control this by requesting continuity in the 1st or 2nd derivative of the surface with the `FFD_CONTINUITY` option. In short, the code will automatically detect when a face of the FFD box intersects the geometry, and it will hold fixed the control points on that face (`1ST_DERIVATIVE`) or the points on the face as well as one slice of adjacent control points (`2ND_DERIVATIVE`). **Note that these control points will be held fixed during design cycles even if you specify them in your design variable list**. - -Now that the FFD box has been defined using the options, follow these steps at a terminal command line to generate a **new** mesh that contains the FFD box: - 1. Move to the directory containing the config file (inv_ONERAM6_adv.cfg) and the mesh file (mesh_ONERAM6_inv_FFD.su2). Make sure that the SU2 tools were compiled, installed, and that their install location was added to your path. - 2. Check that DV_KIND= FFD_SETTING in the configuration file. - 3. Execute SU2_DEF by entering "SU2_DEF inv_ONERAM6_adv.cfg" at the command line. This can also be executed in parallel (e.g. $mpirun -n 10 SU2_DEF inv_ONERAM6_adv.cfg). - 4. After completing the FFD mapping process, a mesh file named "mesh_out.su2" (by default) is now in the directory. Rename that file to "mesh_ONERAM6_inv_FFD.su2". Note that this new mesh file contains all the details of the FFD method. - -With this preprocessing, the position of the control points and the parametric coordinates have been calculated. The preprocessing only needs to be performed once, and afterward, the new (x,y,z) coordinates of the geometry surface due to control point displacements can be quickly evaluated from the mapping. This information is stored in a native format at the bottom of the SU2 mesh file. You will use this new mesh for the design process. If you find that your particular case stalls or throws errors during the creation of the box, the `FFD_TOLERANCE` and `FFD_ITERATIONS` parameters can be adjusted to achieve convergence of the algorithm. - -### Evaluating the Geometry - -In this particular problem the objective is to introduce a set of geometrical constraints. The first step is to check that SU2 is able to compute the correct geometrical quantities via executing SU2_GEO. The important information for SU2_GEO configuration file is provided below - -``` -% ----------------------- GEOMETRY EVALUATION PARAMETERS ----------------------% -% -% Marker(s) of the surface where geometrical based function will be evaluated -GEO_MARKER= ( UPPER_SIDE, LOWER_SIDE, TIP ) -% -% Description of the geometry to be analyzed (AIRFOIL, WING, FUSELAGE) -GEO_DESCRIPTION= WING -% -% Coordinate of the stations to be analyzed -GEO_LOCATION_STATIONS= (0.0, 0.2, 0.4, 0.6, 0.8) -% -% Geometrical bounds (Y coordinate) for the wing geometry analysis or -% fuselage evaluation (X coordinate) -GEO_BOUNDS= (0, 0.8) -% -% Plot loads and Cp distributions on each airfoil section -GEO_PLOT_STATIONS= YES -% -% Number of section cuts to make when calculating wing geometry -GEO_NUMBER_STATIONS= 25 -% -% Geometrical evaluation mode (FUNCTION, GRADIENT) -GEO_MODE= FUNCTION -``` - -On other words, we need to specify where the wing stations are located to apply the thickness constraints. In this config file, 5 thickness constraints can be applied during design defined in `GEO_LOCATION_STATIONS`. The thicknesses and their gradients are computed using the SU2_GEO module. As you can see, we need to specify the names of the markers that make up the geometry of interest in `GEO_MARKER` the kind of geometry that SU2_GEO is slicing `GEO_DESCRIPTION` and the physical bounds for the wing (Y coordinate). By using `GEO_PLOT_STATIONS` SU2_CFD will plot the Cp at each section and a spanload distribution plot. - -With this setting it is now appropriate to execute SU2_GEO by typing "SU2_GEO inv_ONERAM6_adv.cfg" at the command line to obtain a baseline measurement of the wing thickness at the 5 stations. Remember that SU2_GEO can also be executed in parallel (e.g. $mpirun -n 10 SU2_GEO inv_ONERAM6_adv.cfg). The following information came from the SU2_GEO screen output: - -``` -Wing volume: 0.0260712 m^3. Wing min. thickness: 0.0553114 m. Wing max. thickness: 0.0784087 m. -Wing min. chord: 0.5688 m. Wing max. chord: 0.805999 m. Wing min. LE radius: 78.156 1/m. Wing max. LE radius: 117.586 1/m. -Wing min. ToC: 0.0971893. Wing max. ToC: 0.0974553. Wing delta ToC: 0.0271893. Wing max. twist: 0.016874 deg. -Wing max. curvature: 0.332163 1/m. Wing max. dihedral: 0.362135 deg. - --------------------- Objective function evaluation ---------------------- - -Station 1. YCoord: 1e-16 m, Area: 0.0443805 m^2, Thickness: 0.0784087 m, -Chord: 0.805999 m, LE radius: 78.156 1/m, ToC: 0.0972814, Twist angle: 0 deg. -Station 2. YCoord: 0.2 m, Area: 0.0380789 m^2, Thickness: 0.0726176 m, -Chord: 0.7467 m, LE radius: 90.7731 1/m, ToC: 0.0972514, Twist angle: 0 deg. -Station 3. YCoord: 0.4 m, Area: 0.0322669 m^2, Thickness: 0.0668227 m, -Chord: 0.6874 m, LE radius: 100.28 1/m, ToC: 0.0972109, Twist angle: 0 deg. -Station 4. YCoord: 0.6 m, Area: 0.0269361 m^2, Thickness: 0.0610663 m, -Chord: 0.626609 m, LE radius: 104.201 1/m, ToC: 0.0974553, Twist angle: 0.016874 deg. -Station 5. YCoord: 0.8 m, Area: 0.0220888 m^2, Thickness: 0.0553114 m, -Chord: 0.5688 m, LE radius: 117.586 1/m, ToC: 0.0972423, Twist angle: 0 deg. -``` - -Furthermore, SU2_GEO has created two interesting files with geometrical information: `wing_description.dat` and `wing_slices.dat` that can be used to fully understand the wing geometry. - - -### Defining the Optimization Problem - -Several of the key configuration file options are highlighted here. Since we are using the same flow problem from the previous tutorials, we will focus on the new design parameter options: -``` -% --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------% -% -% Optimization objective function with scaling factor -% ex= Objective * Scale -OPT_OBJECTIVE= DRAG -% -% Optimization constraint functions with scaling factors, separated by semicolons -% ex= (Objective = Value ) * Scale, use '>','<','=' -OPT_CONSTRAINT= (STATION1_THICKNESS > 0.077) * 0.001; (STATION2_THICKNESS > 0.072) * 0.001; (STATION3_THICKNESS > 0.066) * 0.001; (STATION4_THICKNESS > 0.060) * 0.001; (STATION5_THICKNESS > 0.054) * 0.001 -% -% Factor to reduce the norm of the gradient (affects the objective function and gradient in the python scripts) -% In general, a norm of the gradient ~1E-6 is desired. -OPT_GRADIENT_FACTOR= 1E-5 -% -% Factor to relax or accelerate the optimizer convergence (affects the line search in SU2_DEF) -% In general, surface deformations of 0.01'' or 0.0001m are desirable -OPT_RELAX_FACTOR= 1E3 -% -% Maximum number of iterations -OPT_ITERATIONS= 100 -% -% Requested accuracy -OPT_ACCURACY= 1E-10 -% -% Upper bound for each design variable -OPT_BOUND_UPPER= 0.3 -% -% Lower bound for each design variable -OPT_BOUND_LOWER= -0.3 -% -% Optimization design variables, separated by semicolons -% ex= FFD_CONTROL_POINT ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) -DEFINITION_DV= ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 1, 0, 0.0, 0.0, 1.0 ); ... -``` - -Here, we define the objective function for the optimization as drag with thickness constraints along 5 sections of the wing. The `DEFINITION_DV` is the list of design variables, note that this is a simulation/optimization at a cte. Cl and the angle of attack is a design variable. For this problem, we want to minimize the drag by changing the position of the control points of the control box. To do so, we list the set of FFD control points that we would like to use as variables. Each design variable is separated by a semicolon. The first value in the parentheses is the variable type, which is 11 for an FFD control point movement. The second value is the scale of the variable (typically left as 1.0). The name between the vertical bars is the marker tag(s) where the variable deformations will be applied. The final seven values in the parentheses are the particular information about the deformation: identification of the FFD tag, the i, j, and k index of the control point, and the allowed x, y, and z movement direction of the control point. Note that other types of design variables have their own specific input format. For this example, we have a long list of design variables that are not all listed above. You can quickly generate a list of FFD variables in the necessary format using the **set_ffd_design_var.py** script that is shipped with the other Python utilities with the source code. -``` -$ python set_ffd_design_var.py -i 10 -j 8 -k 1 -b WING -m 'UPPER_SIDE, LOWER_SIDE, TIP' -``` - -The selection of `OPT_GRADIENT_FACTOR` and `OPT_RELAX_FACTOR` has a particular impact on the optimization. The `OPT_GRADIENT_FACTOR` is used to obtain a gradient norm (GNORM column in the shape_optimization.py screen output) of the order of 1E-6. On the other hand, `OPT_RELAX_FACTOR` is used to aid the optimizer in taking a physically appropriate first step (i.e., not too small or too large), the easiest way to check the initial step is by looking at `Max Diff:` value in `DSN_002/DEFORM/log_Deform.out`, in fact that value is the maximum difference between the baseline geometry and the deformed geometry in the first step of the optimization. - -In this particular optimization problem it is also important to adjust the scale of the `OPT_CONSTRAINT` this scale factor is an effective method to control how much the violated constraint is going to change the objective function gradient (push factor). The selection and adjustment of these three parameters is important to fully exploit the possibilities of the Python gradient based optimizers. - - -### Running SU2 - -A discrete adjoint methodology for obtaining surface sensitivities is implemented for several equation sets within SU2. After solving the direct flow problem, the adjoint problem is also solved. The adjoint method offers an efficient approach for calculating the gradient of an objective function with respect to a large set of design variables. This leads directly to a gradient-based optimization framework. - -With each design iteration, the direct and adjoint solutions are used to compute the objective function and gradient, and the optimizer drives the shape changes with this information in order to minimize the objective. Each flow constraint requires the solution of an additional adjoint problem to compute its gradient (lift in this case). Three other SU2 tools are used in the design process here: SU2_DOT to compute the gradient from the adjoint surface sensitivities and input design space, SU2_GEO to compute wing section thicknesses and their gradients, and SU2_DEF to deform the computational mesh between design cycles. To run this case, follow these steps at a terminal command line: - 1. Execute the shape optimization script by entering - - ``` - $ shape_optimization.py -g DISCRETE_ADJOINT -f inv_ONERAM6_adv.cfg - ``` - - at the command line, add `-n 12` in case you want to run the optimization in parallel (12 cores). Again, note that Python, NumPy, and SciPy are all required to run the script. - - 2. The python script will drive the optimization process by executing flow solutions, adjoint solutions, gradient projection, geometry evaluations, and mesh deformation in order to drive the design toward an optimum. The optimization process will cease when certain tolerances set within the SciPy optimizer are met. Note that is is possible to start the optimization from a pre-converged solution (direct and adjoint problem), in that case the following change should be done in the configuration file: `RESTART_SOL= YES`. - 3. Solution files containing the flow and surface data will be written for each flow solution and adjoint solution and can be found in the DESIGNS directory that is created. The file named history_project.plt (or history_project.csv for ParaView) will contain the functional values of interest resulting from each evaluation during the optimization. The major iterations and function evaluations for the SLSQP optimizer will be written to the console during execution. - -### Results - -The following are representative results for this transonic shape design example with the ONERA M6 geometry as a baseline. We successfully reduce the drag while satisfying the constraints. - -![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_pressure_original.png) -Figure (4): Pressure contours showing the typical "lambda" shock on the upper surface of the initial geometry. - -![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_pressure_final.png) -Figure (5): Pressure contours on the surface of the final wing design (reduced shocks). - -![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd_final.png) -Figure (6): View of the initial (black) and final (blue) FFD control point positions. - -![Opt. ONERA History](../../Inviscid_3D_Constrained_ONERAM6/images/onera_opt_history.png) -Figure (7): Optimization history. The drag is reduced and the lift constraint is easily met. - +--- +title: Constrained shape design of a transonic inviscid wing at a cte. CL +permalink: /tutorials/Inviscid_3D_Constrained_ONERAM6/ +--- + +![Opt. ONERA Orig](../../Inviscid_3D_Constrained_ONERAM6/images/onera_opt_history.png) + +## Goals + +Upon completing this tutorial, the user will be familiar with performing an optimal shape design of a 3D geometry. The initial geometry chosen for the tutorial is a ONERA M6 wing at transonic speed in inviscid fluid and constant Cl (common setting in aeronautical problems). The following SU2 tools will be showcased in this tutorial: +- **SU2_CFD** - performs the direct flow simulations. +- **SU2_CFD_AD** - performs the adjoint flow simulations. +- **SU2_DOT_AD** - projects the adjoint surface sensitivities into the design space to obtain the gradient. +- **SU2_DEF** - deforms the geometry and mesh with changes in the design variables during the shape optimization process. +- **SU2_GEO** - evaluates the thickness of the specified wing stations and their gradients. +- **shape_optimization.py** - automates the entire shape design process by executing the SU2 tools and optimizer. + +## Resources + +The resources for this tutorial can be found in the directory [Inviscid_3D_Constrained_ONERAM6](https://github.com/su2code/Tutorials/tree/master/Inviscid_3D_Constrained_ONERAM6) in the [tutorials repository](https://github.com/su2code/Tutorials/tree/master/). You will need the configuration file ([inv_ONERAM6_adv.cfg](../../Inviscid_3D_Constrained_ONERAM6/inv_ONERAM6_adv.cfg)) and the mesh file ([mesh_ONERAM6_inv_FFD.su2](../../Inviscid_3D_Constrained_ONERAM6/mesh_ONERAM6_inv_FFD.su2)). + +Note that the mesh file already contains information about the definition of the Free Form Deformation (FFD) used for the definition of 3D design variables, but we will discuss how this is created below. + +## Tutorial + +The following tutorial will walk you through the steps required when performing 3D shape design using SU2, including the FFD tools. It is assumed that you have already obtained and compiled SU2_CFD, SU2_DOT, SU2_CFD_AD, SU2_DOT_AD, SU2_GEO and SU2_DEF. The design loop is driven by the shape_optimization.py script, and thus Python along with the NumPy and SciPy Python modules are required for this tutorial. If you have yet to complete these requirements, please see the Download and Installation pages (including the AD part). + +### Problem Setup + +The goal of this wing design problem is to minimize the coefficient of drag by changing the shape while imposing lift and wing section thickness constraints. As design variables, we will use a free-form deformation approach. In this approach, a lattice of control points making up a bounding box are placed around the geometry, and the movement of these control points smoothly deforms the surface shape of the geometry inside. We begin with a 3D fixed-wing geometry (initially the ONERA M6) at transonic speed in air (inviscid). The flow conditions are the same as for the previous ONERA M6 tutorial. + +![Opt. ONERA Grid](../../Inviscid_3D_Constrained_ONERAM6/images/onera_grid.png) +Figure (1): View of the initial surface computational mesh. + +### Mesh Description + +The mesh consists of a far-field boundary divided in three surfaces (XNORMAL_FACES, ZNORMAL_FACES, YNORMAL_FACES), an Euler wall (flow tangency) divided into three surfaces (UPPER_SIDE, LOWER_SIDE, TIP), and a symmetry plane (SYMMETRY_FACE). The baseline mesh is the same as for the previous ONERA M6 tutorial. The surface mesh can be seen in Figure (1). + +![Opt. ONERA FFD](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd.png) +Figure (2): View of the initial FFD box around the ONERA M6 wing, including the control points (spheres). + +### Setting a constant Cl mode + +In aeronautical application is common to design at a constant Cl instead of at constant Angle of Attack (AoA). In this case, the AoA is introduced as a design variable to achieve a particular Cl value. SU2 can directly use AoA as design variable but, that method requires to solve an adjoint equation for the Cl constraint. The preferred strategy is to run the direct solver in cte. Cl mode and the adjoint solver will compute the appropriate derivative for that mode. The basic setting for running at a constant Cl mode is described below: +``` +% -------------------------- CL DRIVER DEFINITION -----------------------------% +% +% Activate fixed lift mode (specify a CL instead of AoA, NO/YES) +FIXED_CL_MODE= YES +% +% Target coefficient of lift for fixed lift mode (0.80 by default) +TARGET_CL= 0.286 +% +% Estimation of dCL/dAlpha (0.2 per degree by default) +DCL_DALPHA= 0.1 +% +% Maximum number of iterations between AoA updates +UPDATE_AOA_ITER_LIMIT= 150 + +``` +In this particular problem we are setting a value for the lift coefficient equal to 0.286. The `FIXED_CL_MODE` works by updating the angle of attack (AoA) during the simulation run such that the resulting CL matches the `TARGET_CL` value. The `UPDATE_AOA_ITER_LIMIT` specifies the maximum number of iterations between two AoA updates. The AoA might update sooner if the solution converges (as defined by the convergence parameters) to the wrong CL. The level of CL convergence can be specified by the `CAUCHY_EPS` value which is defined in the Convergence Parameters. `DCL_DALPHA` is the proportional constant that is used to calculate the change in AoA when it updates (Change in AoA = (TARGET_CL - CURRENT_CL)/DCL_DALPHA). The `ITER_DCL_DALPHA` defines the number of iterations that the run to calculate dCL/dAlpha at the end of the Fixed CL simulation. This calculated value is used by the adjoint to give more accurate gradients with respect to the objective function, when the optimization is run in Fixed CL mode. + + +### Setting up a Free-Form Deformation Box + +The mesh file that is provided for this test case already contains the FFD information. However, if you are interested in repeating this process for your own design cases, it is necessary to calculate the position of the control points and the parametric coordinates. The description below describes how to set up FFD boxes for deformation. + +The design variables are defined using the FFD methodology. We will customize a set an options that specifically target FFD box creation: + +``` +% -------------------- FREE-FORM DEFORMATION PARAMETERS -----------------------% +% +% Tolerance of the Free-Form Deformation point inversion +FFD_TOLERANCE= 1E-10 +% +% Maximum number of iterations in the Free-Form Deformation point inversion +FFD_ITERATIONS= 500 +% +% FFD box definition: 3D case (FFD_BoxTag, X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, X4, Y4, Z4, +% X5, Y5, Z5, X6, Y6, Z6, X7, Y7, Z7, X8, Y8, Z8) +% 2D case (FFD_BoxTag, X1, Y1, 0.0, X2, Y2, 0.0, X3, Y3, 0.0, X4, Y4, 0.0, +% 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) +FFD_DEFINITION= (WING, -0.0403, 0, -0.04836, 0.8463,0, -0.04836, 1.209, 1.2896, -0.04836, 0.6851, 1.2896, -0.04836, -0.0403, 0, 0.04836, 0.8463, 0, 0.04836, 1.209, 1.2896, 0.04836, 0.6851, 1.2896, 0.04836) +% +% FFD box degree: 3D case (x_degree, y_degree, z_degree) +% 2D case (x_degree, y_degree, 0) +FFD_DEGREE= (10, 8, 1) +% +% Surface continuity at the intersection with the FFD (1ST_DERIVATIVE, 2ND_DERIVATIVE) +FFD_CONTINUITY= 2ND_DERIVATIVE +``` + +As the current implementation requires each FFD box to be a quadrilaterally-faced hexahedron (6 faces, 12 edges, 8 vertices), we can simply specify the 8 corner points of the box and the polynomial degree we would like to represent along each coordinate direction (x,y,z) in order to create the complete lattice of control points. It is convenient to think of the FFD box as a small structured mesh block with (i,j,k) indices for the control points, and note that the number of control points in each direction is the specified polynomial degree plus one. + +In the example above, we are creating a box with control point dimensions 11, 9, and 2 in the x-, y-, and z-directions, respectively, for a total of 198 available control points. In the `FFD_DEFINITION` option, we give a name to the box ("WING"), and then list out the x, y, and z coordinates of each corner point. The order is important, and you can use the example above to match the convention. The degree is then specified in the `FFD_DEGREE` option. A view of the box with the control points numbered is in Figure (3). Note that the numbering in the figure is 1-based just for visualization, but within SU2, the control points have 0-based indexing. For example, the (1,1,1) control point in the figure is control point (0,0,0) within SU2. This is critical for specifying the design variables in the config file. + +![Opt. ONERA FFD](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd_points.png) +Figure (3): View of the control point identifying indices, which increase in value along the positive coordinate directions. Note that the numbering here is 1-based just for visualization, but within SU2, the control points have 0-based indexing. + +Lastly, the FFD capabilities within SU2 also feature a nifty technique to automatically ensure that you do not obtain any jumps or kinks in your deformed geometry. You can control this by requesting continuity in the 1st or 2nd derivative of the surface with the `FFD_CONTINUITY` option. In short, the code will automatically detect when a face of the FFD box intersects the geometry, and it will hold fixed the control points on that face (`1ST_DERIVATIVE`) or the points on the face as well as one slice of adjacent control points (`2ND_DERIVATIVE`). **Note that these control points will be held fixed during design cycles even if you specify them in your design variable list**. + +Now that the FFD box has been defined using the options, follow these steps at a terminal command line to generate a **new** mesh that contains the FFD box: + 1. Move to the directory containing the config file (inv_ONERAM6_adv.cfg) and the mesh file (mesh_ONERAM6_inv_FFD.su2). Make sure that the SU2 tools were compiled, installed, and that their install location was added to your path. + 2. Check that DV_KIND= FFD_SETTING in the configuration file. + 3. Execute SU2_DEF by entering "SU2_DEF inv_ONERAM6_adv.cfg" at the command line. This can also be executed in parallel (e.g. $mpirun -n 10 SU2_DEF inv_ONERAM6_adv.cfg). + 4. After completing the FFD mapping process, a mesh file named "mesh_out.su2" (by default) is now in the directory. Rename that file to "mesh_ONERAM6_inv_FFD.su2". Note that this new mesh file contains all the details of the FFD method. + +With this preprocessing, the position of the control points and the parametric coordinates have been calculated. The preprocessing only needs to be performed once, and afterward, the new (x,y,z) coordinates of the geometry surface due to control point displacements can be quickly evaluated from the mapping. This information is stored in a native format at the bottom of the SU2 mesh file. You will use this new mesh for the design process. If you find that your particular case stalls or throws errors during the creation of the box, the `FFD_TOLERANCE` and `FFD_ITERATIONS` parameters can be adjusted to achieve convergence of the algorithm. + +### Evaluating the Geometry + +In this particular problem the objective is to introduce a set of geometrical constraints. The first step is to check that SU2 is able to compute the correct geometrical quantities via executing SU2_GEO. The important information for SU2_GEO configuration file is provided below + +``` +% ----------------------- GEOMETRY EVALUATION PARAMETERS ----------------------% +% +% Marker(s) of the surface where geometrical based function will be evaluated +GEO_MARKER= ( UPPER_SIDE, LOWER_SIDE, TIP ) +% +% Description of the geometry to be analyzed (AIRFOIL, WING, FUSELAGE) +GEO_DESCRIPTION= WING +% +% Coordinate of the stations to be analyzed +GEO_LOCATION_STATIONS= (0.0, 0.2, 0.4, 0.6, 0.8) +% +% Geometrical bounds (Y coordinate) for the wing geometry analysis or +% fuselage evaluation (X coordinate) +GEO_BOUNDS= (0, 0.8) +% +% Plot loads and Cp distributions on each airfoil section +GEO_PLOT_STATIONS= YES +% +% Number of section cuts to make when calculating wing geometry +GEO_NUMBER_STATIONS= 25 +% +% Geometrical evaluation mode (FUNCTION, GRADIENT) +GEO_MODE= FUNCTION +``` + +On other words, we need to specify where the wing stations are located to apply the thickness constraints. In this config file, 5 thickness constraints can be applied during design defined in `GEO_LOCATION_STATIONS`. The thicknesses and their gradients are computed using the SU2_GEO module. As you can see, we need to specify the names of the markers that make up the geometry of interest in `GEO_MARKER` the kind of geometry that SU2_GEO is slicing `GEO_DESCRIPTION` and the physical bounds for the wing (Y coordinate). By using `GEO_PLOT_STATIONS` SU2_CFD will plot the Cp at each section and a spanload distribution plot. + +With this setting it is now appropriate to execute SU2_GEO by typing "SU2_GEO inv_ONERAM6_adv.cfg" at the command line to obtain a baseline measurement of the wing thickness at the 5 stations. Remember that SU2_GEO can also be executed in parallel (e.g. $mpirun -n 10 SU2_GEO inv_ONERAM6_adv.cfg). The following information came from the SU2_GEO screen output: + +``` +Wing volume: 0.0260712 m^3. Wing min. thickness: 0.0553114 m. Wing max. thickness: 0.0784087 m. +Wing min. chord: 0.5688 m. Wing max. chord: 0.805999 m. Wing min. LE radius: 78.156 1/m. Wing max. LE radius: 117.586 1/m. +Wing min. ToC: 0.0971893. Wing max. ToC: 0.0974553. Wing delta ToC: 0.0271893. Wing max. twist: 0.016874 deg. +Wing max. curvature: 0.332163 1/m. Wing max. dihedral: 0.362135 deg. + +-------------------- Objective function evaluation ---------------------- + +Station 1. YCoord: 1e-16 m, Area: 0.0443805 m^2, Thickness: 0.0784087 m, +Chord: 0.805999 m, LE radius: 78.156 1/m, ToC: 0.0972814, Twist angle: 0 deg. +Station 2. YCoord: 0.2 m, Area: 0.0380789 m^2, Thickness: 0.0726176 m, +Chord: 0.7467 m, LE radius: 90.7731 1/m, ToC: 0.0972514, Twist angle: 0 deg. +Station 3. YCoord: 0.4 m, Area: 0.0322669 m^2, Thickness: 0.0668227 m, +Chord: 0.6874 m, LE radius: 100.28 1/m, ToC: 0.0972109, Twist angle: 0 deg. +Station 4. YCoord: 0.6 m, Area: 0.0269361 m^2, Thickness: 0.0610663 m, +Chord: 0.626609 m, LE radius: 104.201 1/m, ToC: 0.0974553, Twist angle: 0.016874 deg. +Station 5. YCoord: 0.8 m, Area: 0.0220888 m^2, Thickness: 0.0553114 m, +Chord: 0.5688 m, LE radius: 117.586 1/m, ToC: 0.0972423, Twist angle: 0 deg. +``` + +Furthermore, SU2_GEO has created two interesting files with geometrical information: `wing_description.dat` and `wing_slices.dat` that can be used to fully understand the wing geometry. + + +### Defining the Optimization Problem + +Several of the key configuration file options are highlighted here. Since we are using the same flow problem from the previous tutorials, we will focus on the new design parameter options: +``` +% --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------% +% +% Optimization objective function with scaling factor +% ex= Objective * Scale +OPT_OBJECTIVE= DRAG +% +% Optimization constraint functions with scaling factors, separated by semicolons +% ex= (Objective = Value ) * Scale, use '>','<','=' +OPT_CONSTRAINT= (STATION1_THICKNESS > 0.077) * 0.001; (STATION2_THICKNESS > 0.072) * 0.001; (STATION3_THICKNESS > 0.066) * 0.001; (STATION4_THICKNESS > 0.060) * 0.001; (STATION5_THICKNESS > 0.054) * 0.001 +% +% Factor to reduce the norm of the gradient (affects the objective function and gradient in the python scripts) +% In general, a norm of the gradient ~1E-6 is desired. +OPT_GRADIENT_FACTOR= 1E-5 +% +% Factor to relax or accelerate the optimizer convergence (affects the line search in SU2_DEF) +% In general, surface deformations of 0.01'' or 0.0001m are desirable +OPT_RELAX_FACTOR= 1E3 +% +% Maximum number of iterations +OPT_ITERATIONS= 100 +% +% Requested accuracy +OPT_ACCURACY= 1E-10 +% +% Upper bound for each design variable +OPT_BOUND_UPPER= 0.3 +% +% Lower bound for each design variable +OPT_BOUND_LOWER= -0.3 +% +% Optimization design variables, separated by semicolons +% ex= FFD_CONTROL_POINT ( 11, Scale | Mark. List | FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov ) +DEFINITION_DV= ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 0, 1, 0, 0.0, 0.0, 1.0 ); ( 11, 1.0 | UPPER_SIDE, LOWER_SIDE, TIP | WING, 1, 1, 0, 0.0, 0.0, 1.0 ); ... +``` + +Here, we define the objective function for the optimization as drag with thickness constraints along 5 sections of the wing. The `DEFINITION_DV` is the list of design variables, note that this is a simulation/optimization at a cte. Cl and the angle of attack is a design variable. For this problem, we want to minimize the drag by changing the position of the control points of the control box. To do so, we list the set of FFD control points that we would like to use as variables. Each design variable is separated by a semicolon. The first value in the parentheses is the variable type, which is 11 for an FFD control point movement. The second value is the scale of the variable (typically left as 1.0). The name between the vertical bars is the marker tag(s) where the variable deformations will be applied. The final seven values in the parentheses are the particular information about the deformation: identification of the FFD tag, the i, j, and k index of the control point, and the allowed x, y, and z movement direction of the control point. Note that other types of design variables have their own specific input format. For this example, we have a long list of design variables that are not all listed above. You can quickly generate a list of FFD variables in the necessary format using the **set_ffd_design_var.py** script that is shipped with the other Python utilities with the source code. +``` +$ python set_ffd_design_var.py -i 10 -j 8 -k 1 -b WING -m 'UPPER_SIDE, LOWER_SIDE, TIP' +``` + +The selection of `OPT_GRADIENT_FACTOR` and `OPT_RELAX_FACTOR` has a particular impact on the optimization. The `OPT_GRADIENT_FACTOR` is used to obtain a gradient norm (GNORM column in the shape_optimization.py screen output) of the order of 1E-6. On the other hand, `OPT_RELAX_FACTOR` is used to aid the optimizer in taking a physically appropriate first step (i.e., not too small or too large), the easiest way to check the initial step is by looking at `Max Diff:` value in `DSN_002/DEFORM/log_Deform.out`, in fact that value is the maximum difference between the baseline geometry and the deformed geometry in the first step of the optimization. + +In this particular optimization problem it is also important to adjust the scale of the `OPT_CONSTRAINT` this scale factor is an effective method to control how much the violated constraint is going to change the objective function gradient (push factor). The selection and adjustment of these three parameters is important to fully exploit the possibilities of the Python gradient based optimizers. + + +### Running SU2 + +A discrete adjoint methodology for obtaining surface sensitivities is implemented for several equation sets within SU2. After solving the direct flow problem, the adjoint problem is also solved. The adjoint method offers an efficient approach for calculating the gradient of an objective function with respect to a large set of design variables. This leads directly to a gradient-based optimization framework. + +With each design iteration, the direct and adjoint solutions are used to compute the objective function and gradient, and the optimizer drives the shape changes with this information in order to minimize the objective. Each flow constraint requires the solution of an additional adjoint problem to compute its gradient (lift in this case). Three other SU2 tools are used in the design process here: SU2_DOT to compute the gradient from the adjoint surface sensitivities and input design space, SU2_GEO to compute wing section thicknesses and their gradients, and SU2_DEF to deform the computational mesh between design cycles. To run this case, follow these steps at a terminal command line: + 1. Execute the shape optimization script by entering + + ``` + $ shape_optimization.py -g DISCRETE_ADJOINT -f inv_ONERAM6_adv.cfg + ``` + + at the command line, add `-n 12` in case you want to run the optimization in parallel (12 cores). Again, note that Python, NumPy, and SciPy are all required to run the script. + + 2. The python script will drive the optimization process by executing flow solutions, adjoint solutions, gradient projection, geometry evaluations, and mesh deformation in order to drive the design toward an optimum. The optimization process will cease when certain tolerances set within the SciPy optimizer are met. Note that is is possible to start the optimization from a pre-converged solution (direct and adjoint problem), in that case the following change should be done in the configuration file: `RESTART_SOL= YES`. + 3. Solution files containing the flow and surface data will be written for each flow solution and adjoint solution and can be found in the DESIGNS directory that is created. The file named history_project.plt (or history_project.csv for ParaView) will contain the functional values of interest resulting from each evaluation during the optimization. The major iterations and function evaluations for the SLSQP optimizer will be written to the console during execution. + +### Results + +The following are representative results for this transonic shape design example with the ONERA M6 geometry as a baseline. We successfully reduce the drag while satisfying the constraints. + +![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_pressure_original.png) +Figure (4): Pressure contours showing the typical "lambda" shock on the upper surface of the initial geometry. + +![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_pressure_final.png) +Figure (5): Pressure contours on the surface of the final wing design (reduced shocks). + +![Opt. ONERA Pressure](../../Inviscid_3D_Constrained_ONERAM6/images/onera_ffd_final.png) +Figure (6): View of the initial (black) and final (blue) FFD control point positions. + +![Opt. ONERA History](../../Inviscid_3D_Constrained_ONERAM6/images/onera_opt_history.png) +Figure (7): Optimization history. The drag is reduced and the lift constraint is easily met. +