pyGeo is a package for generating and manipulating geometry, particularly for applications involving shape optimization.
Shape optimization is a field of engineering that uses applied mathematics and computer simulation to find the best possible shape for an object, such as an aircraft or a ship. To do this, optimization software needs to perturb a baseline geometry into a new shape at each iteration. Users define design variables which map numeric inputs from the optimizer to changes in the geometry.
Examples of geometric design variables include:
Span, aspect ratio, and sweep in a wing design problem
Freeboard, deadrise, and beam for a ship design problem
Blade length, twist distribution, and airfoil shape modes for a wind turbine problem
The set of all geometric design variables and their effects on the baseline geometry is called a parameterization. Parameterizations are not unique, and choosing a good one is both an art and a science.
There are two primary approaches to geometry parameterization: generative and deformative. In pyGeo, we primarily use a free form deformation (FFD) approach, which belongs to the latter category. This approach does not require the parameterization of the baseline geometry (as is the case for a generative approach such as CAD) because we only parameterized the changes with respect to the unperturbed geometry
Some geometries that can be generated by a parameterization are not allowable for physical or other engineering reasons. For this reason, geometric constraints must often also be imposed (such as a minimum volume inside a car’s cabin, or a wing thickness).
pyGeo enables users to set up a variety of geometric parameterizations and geometric constraints.
It is particularly useful for gradient-based optimization because it provides accurate derivatives of geometry with respect to the design variables.
The package consists of the following high-level modules:
DVGeometry (short for “Design Variable Geometry”) parameterizes and modifies geometry (pointsets) in shape optimization problems, using the free-form deformation (FFD) method
DVGeometryMulti parameterizes multiple geometric components using multiple FFDs and handles design changes near component intersections
DVGeometryESP enables CAD-based geometry parameterization using Engineering Sketch Pad (ESP) software
DVGeometryVSP enables conceptual geometry parameterization using the Vehicle Sketch Pad (OpenVSP) software
DVConstraints allows users to constrain important geometric parameters during optimization (such as thicknesses and volumes)
pyGeo generates spline surfaces, either from geometry files or user-defined wing surfaces