Optimization#
pymead has the capability of performing aerodynamic and aeropropulsive shape optimization on airfoil systems
using a genetic algorithm (GA). Currently, the only algorithm available is the robust
U-NSGA-III algorithm (see here for details).
Any of the values available in the aerodynamic data output from the flow solver may be used in one ore more
mathematical expressions to define the objective function(s). The multi-point optimization feature allows for an
increase in robustness of design by considering one or more off-design conditions for the airfoil(s).
The following is a walk-through of each of the optimization-specific tabs in the Optimization Setup dialog. Information about the XFOIL, MSET, MSES, and MPLOT tabs can be found in Aerodynamic Analysis.
General Settings
General settings for the GA problem.
Option |
Description |
|---|---|
Save |
Save the current optimization settings to the currently cached save file |
Save Settings As… |
Save the current optimization settings to a new |
Load |
Load optimization settings from a |
Warm Start Active? |
Whether to start from a previously terminated optimization. If this box is checked, the Warm Start Generation and Warm Start Directory must both be specified |
Warm Start Generation |
Which generation to start from. Use |
Warm Start Directory |
The directory from which to load in the data for the partially completed optimization. This folder
should contain a number of files of the form |
Use Initial Settings? |
Whether to use the initial set of optimizations on warm start. Normally this box should be checked. Unchecking this box allows for a different number of offspring to be applied from the currently displayed optimization settings dialog to the warm start optimization. No other changes to settings will be applied. |
MEA File |
The geometry collection ( |
Batch Mode Active? |
Whether to run the list of optimization files provided in the “Batch Settings Files” option |
Batch Settings Files |
Runs a list of |
Genetic Algorithm
Parameters specific to the pymoo implementation of the genetic algorithm
Option |
Description |
|---|---|
CFD Tool |
The analysis tool to be used during the optimization run |
Objective Functions |
The aerodynamic functions to be minimized (separated by commas if there are more than one). Available
functions depend on the CFD tool selected and are referenced with a leading dollar sign ($). See
Available Objective/Constraint Functions for a list of available functions. Note that the functions must be indexed
if multipoint optimization is active. For example, for an even weighting of drag coefficient
across two multipoint stencil points, use |
Aerodynamic Constraints |
Similar to “Objective Functions.” Negative constraint values are feasible. As an example, use
|
Population Size |
Number of airfoils or airfoil systems required to be converged during each generation. This number should generally be increased with increasing number of design variables |
Number of Offspring |
The maximum number of airfoils or airfoil systems allowed to be analyzed during each generation. If this number is reached during a given generation, the optimization will terminate due to too many infeasible solutions. This number should generally be much larger than the population size to allow for some self-intersecting geometries or unconverged XFOIL/MSES solutions to occur before determining that the optimization should be terminated. Because the airfoil systems are generated lazily in the parallel-processing scheme (i.e., not generated before each generation begins), setting this value to a large number does not incur a significant computational time penalty. |
Max. Sampling Width |
The amount in bounds-normalized space that each design variable is allowed to be perturbed during
the sampling stage. For example, a design variable with bounds \([2.0,3.0]\) and an initial value
of \(2.3\) can be set to any value in the range \([2.2,2.4]\) if the maximum sampling width
is set to \(0.1\). This is done to avoid producing too many “poor” geometries during the sampling
stage, especially if the design variables are given wide bounds. For design variable sets with tight
bounds, this value should be set to a larger value (e.g., |
\(\eta\) (crossover) |
Crossover constant determining the width of the sampling distribution when performing the crossover step for each generation. Larger values allow for larger perturbations in design variable values. See this page for more details. |
\(\eta\) (mutation) |
Mutation constant determining the width of the sampling distribution when performing the random mutation step for each generation. Larger values allow for larger perturbations in design variable values. See this page for more details. |
Random Seed |
Psuedo-random number generator seed to use such that the same results are obtained every time the optimization is run with identical settings. |
Number of Processors |
Number of logical threads to be used for analyzing airfoil geometries in parallel. The maximum
number is that given by |
State Save Frequency |
How often to save the state of the optimization. If |
Opt. Root Directory |
The base location for the optimization folders. Most information will be stored in
|
Opt. Directory Name |
Sub-directory where the optimization data will be stored |
Temp. Analysis Dir. Name |
Name of the base directory for all XFOIL/MSES analysis data which gets overridden every generation |
Constraints/Termination
Settings for a variety of geometric constraints and algorithm termination settings. Note that at least one airfoil must be loaded into the GUI for the airfoil-specific constraints to display.
Option |
Description |
|---|---|
Minimum Thickness |
Minimum value of the maximum thickness for the airfoil measured perpendicular from the chord line. If the “Non-Dimensional” option is selected, the specified thickness value applies to a version of the airfoil scaled to a chord length of one unit. |
Min. Radius of Curvature |
Any location along the airfoil surfaces with a radius of curvature below this value will violate the constraint. If the “Non-Dimensional” option is selected, the specified minimum radius of curvature value applies to the radius of curvature distribution scaled by the airfoil chord. |
Thickness Distribution |
A |
Minimum Area |
Minimum allowable area enclosed by the airfoil (or \(A/c^2\) if the “Non-Dimensional” option is selected) |
Internal Geometry |
Polyline of \(x\)-\(y\) locations representing the convex hull of a geometry that must “fit”
inside of the airfoil. The file should be a 0.3 0.05
0.5 0.05
0.5 -0.05
0.3 -0.05
0.3 0.05
can be used to ensure that a rectangle with width \(0.2\), height \(0.1\), and center \((0.4,0.0)\) is enclosed by the airfoil. |
Function Tolerance |
Change in objective function value used to determine convergence |
Constraint Violation Tol. |
Change in constraint value used to determine feasibility |
Parameter Tolerance |
Change in design variable value used to determine convergence |
Num. Prev. Gens. to Check |
Size of the sliding window of generations used to compute convergence |
Maximum Generations |
If the optimization exceeds this number of genetic algorithm generations, the optimization will terminate regardless of whether convergence has been reached. |
Maximum Function Calls |
If the optimization calls XFOIL or MSES more than this many times, the optimization will terminate regardless of whether convergence has been reached. |
Multi-Point Optimization
Setup for a multi-point stencil
Option |
Description |
|---|---|
Multi-Point Active? |
Use this as a switch to turn multi-point optimization on or off. |
Multi-Point Stencil |
File whose structure is documented directly inside of the GUI |
Design Point Index |
Index, starting from |
Available Objective/Constraint Functions#
XFOIL#
$Cd(drag coefficient)$Cl(lift coefficient)$alf(angle of attack, degrees)$Cm(pitching moment coefficient)$Cdf(friction drag coefficient)$Cdp(pressure drag coefficient)
MSES#
Same as XFOIL, with the addition of
$Cdv(viscous drag coefficient, equivalent to$Cd - $Cdw - $Cdh)$Cdw(wave drag coefficient)$Cdh(actuator disk “drag” coefficient; generally negative if the actuator disk fan pressure ratio is greater than1.0)$CPK(mechanical flow power coefficient; only available if the “Output CPK” option is selected in the MPLOT settings)