While potentially powerful, Genair can be a challenge to become familiar with. Often, for simple wings, scripts are the most straight forward way to generate the geometry and FFDs/axials.Â
A set of scripts for generating a segmented wing as well as setting up the FFD control system are available in the drive below, and their use is documented below. To run the scripts in Genair, once the iPython session is open and Genair has been started, the scripts can be run with
>> run -i <script_name>.py
This set of scripts builds a segmented wing and sets up the FFD geometry control system. The process is broken into three stages:
buildSection.py: This script reads an airfoil coordinate file (in Lednicer format) and fits it to create an airfoil object, 'sec'. If multiple sections are needed for the wing, this script should be run multiple times with a different airfoil file, and the resulting airfoil object uniquely named.
buildWing.py: This script builds the wing geometry, and then optionally creates the FFD/axials and does the FFD embedding. The wing geometry is defined in the "Input" section by its planform parameters, sections, etc. The resulting geometry is scaled by the MAC.
If "mode_axlffd = 1" such that the FFDs/axials are created, the Axials/FFDs input allows the user to specify how many axial and FFD control points there are, their order, etc. If "mode_embed = 1", then the geometry will be embedded inside the FFDs and the resulting patch.con.ffd file will be created. Before this option is used, the script readGrid.py must have been run to create the grid pickle.
readGrid.py: This script reads the grid.g, grid.con, grid.map, and patch.con files which will be needed by the buildWing.py scripts when embedded is requested. This script reads these files and stores the necessary information in a grid.p pickle to be read by buildWing.py.