xFoil Analysis Interface Module (AIM)
xFoil Analysis Interface Module (AIM)
|
This is a walkthrough for using xFoil AIM to analyze a single airfoil cross-section.
It is presumed that ESP and CAPS have been already installed, as well as xFoil.
Two scripts are used for this illustration:
In our example *.csm file setting up the CAPS fidelity is the first step. If multiple bodies exist in the *.csm file the tag, capsIntent, can be used to distinguish what type of analysis the body may be used for. In this example, the geometry model generated can be used for CFD analysis, as shown:
A typical geometry model can be created and interactively modified using design parameters. These design parameters are either design- or geometry- based. In this example, a single airfoil cross-section is created using the following design parameters.
After our design parameters are defined they are used to setup other local variables (analytically) for the wing.
Once all design and locale variables are defined, a single airfoil cross-section is created using the NACA series airfoils (following a scale).
The first step in the pyCAPS script is to import the required modules. For this example, the following modules are used,
In order to create a new capsProblem the pyCAPS module also needs to be imported; on Linux and OSX this is the pyCAPS.so file, while on Windows it is the pyCAPS.pyd file. For convenience, it is recommended that the path to this file is added to the environmental variable PYTHONPATH.
Similarly, local variables used throughout the script may be defined.
Once the required modules have been loaded, a capsProblem can be instantiated.
Using the loadCAPS() function, the desired geometry file is then loaded into the problem.
Any design parameters available in *.csm file are also available within the pyCAPS script. The following snippet changes the despmtr "camber" which will force a rebuild of the geometry that xFoil will now use.
When loading each analysis tools the desired capsIntent needs to be specified. Optionally this may be set at the problem level as follows to avoid redundancy.
Next the xFoil AIM needs to be loaded.
Once loaded analysis parameters specific to xFoil need to be set (see AIM Inputs). These parameters are automatically converted into xFoil specific format and transferred into the xFoil configuration file.
After all desired options are set aimPreAnalysis needs to be executed.
At this point the required files necessary run xFoil should have be created and placed in the specified analysis working directory. Next xFoil needs to executed such as through an OS system call like,
After xFoil is finished running aimPostAnalysis needs to be executed.
Finally, available AIM outputs (see AIM Outputs) may be retrieved, for example:
results in,
When finally finished with the script, the open CAPS problem should be closed.
Issuing the following command executes the script:
Below is a representative image obtained by plotting the data presented above: