A production-ready Python pipeline that ingests nTop panel geometry exports and automatically generates comprehensive aerodynamic decks using AVL and XFOIL, with both human-readable reports and machine-readable output files for downstream 6-DOF simulation.
- Automated Pipeline: Load nTop CSV exports → Generate AVL input → Run analysis → Create aero deck
- Comprehensive Validation: Geometry validation with detailed error/warning reporting
- AVL Integration: Automated AVL execution with batch processing
- Verbose Logging: Beautiful, color-coded progress output
- Flexible Configuration: YAML-based configuration for all analysis parameters
- Production Ready: Type hints, comprehensive error handling, and extensive testing
# Clone the repository
git clone <repository-url>
cd ntop-aerodeck
# Install dependencies
pip install -e .
# Or install with development dependencies
pip install -e ".[dev]"- Python 3.9+
- AVL (for aerodynamic analysis)
- XFOIL (optional, for airfoil analysis - Phase 2)
Export your aircraft geometry from nTop with the following CSV files:
mass.csv- Mass properties (mass, CG, inertia tensor)LEpts.csv- Leading edge panel points (x, y, z)TEpts.csv- Trailing edge panel points (x, y, z)WINGLETpts.csv- (Optional) Winglet geometry pointsELEVONpts.csv- (Optional) Control surface hinge line points
# Full build (recommended) - runs AVL + XFOIL + generates loads
aerodeck build /path/to/ntop_export/data/ --verbose
# With custom load factor (default: 6g)
aerodeck build /path/to/ntop_export/data/ -g 4.0 --verbose
# Legacy generate command (AVL only)
aerodeck generate /path/to/ntop_export/
# With custom output directory
aerodeck generate /path/to/ntop_export/ --output-dir ./my_results
# Verbose mode
aerodeck generate /path/to/ntop_export/ -v
# With custom configuration
aerodeck generate /path/to/ntop_export/ --config config.yamlThe generator automatically creates both a JSON aerodeck and a PDF report.
# View the JSON aerodeck contents
aerodeck view ./results/{aircraft_name}_aerodeck.json
# Open the PDF report (automatically generated)
# Location: ./results/{aircraft_name}_aerodeck.pdf
# Or regenerate the report manually
aerodeck report ./results/{aircraft_name}_aerodeck.jsonRecommended command - Full pipeline that runs AVL analysis, XFOIL polar generation, and exports wing loads for FEA.
aerodeck build INPUT_DIR [OPTIONS]
Options:
-o, --output-dir PATH Output directory (default: ./results)
-g, --load-factor FLOAT Load factor for wing loads (default: 6.0)
-v, --verbose Enable verbose output
--aircraft-name TEXT Aircraft name for reportsExamples:
# Basic build
aerodeck build ./data/ --verbose
# Custom load factor (4g instead of 6g)
aerodeck build ./data/ -g 4.0 --verbose
# Specify output directory
aerodeck build ./data/ -o ./my_results --verboseOutput files:
results/{aircraft_name}_aerodeck.json- Full aerodynamic deckresults/{aircraft_name}_aerodeck_loads.csv- Spanwise wing loads for FEAresults/polars/*.csv- Cached XFOIL airfoil polars
Note: XFOIL polars are cached in results/polars/. Subsequent runs will skip polar generation if the CSV files already exist.
Generate aerodynamic deck from nTop geometry export (AVL only, no XFOIL).
aerodeck generate INPUT_DIR [OPTIONS]
Options:
-o, --output-dir PATH Output directory (default: ./results)
-c, --config PATH Configuration file (YAML)
-v, --verbose Enable verbose output
-q, --quiet Quiet mode (minimal output)
--validate-only Only validate geometry, do not run analysis
--aircraft-name TEXT Aircraft name for reports (default: "nTop Aircraft")Example:
aerodeck generate ./aircraft_001/ -v --aircraft-name "MyDrone_V1"Validate nTop geometry export without running analysis.
aerodeck validate INPUT_DIR [OPTIONS]
Options:
-v, --verbose Enable verbose outputExample:
aerodeck validate ./aircraft_001/Create a default configuration file.
aerodeck init-config OUTPUT_PATHExample:
aerodeck init-config my_config.yaml
# Edit my_config.yaml to customize parameters
aerodeck generate ./aircraft_001/ --config my_config.yamlView aerodynamic deck file contents.
aerodeck view DECK_FILEExample:
aerodeck view ./results/aerodeck_6dof.jsonGenerate a comprehensive PDF report from an existing aerodeck JSON file.
aerodeck report DECK_FILE [OPTIONS]
Options:
-o, --output PATH Output PDF file path (default: same location as JSON)Example:
# Generate report from aerodeck JSON
aerodeck report ./results/group3-nqx-rev1_aerodeck.json
# Specify custom output path
aerodeck report ./results/my_aerodeck.json -o ./reports/analysis_report.pdfWhat's in the report?
- Summary page with metadata, reference geometry, and mass properties
- Static stability derivatives (CL_α, Cm_α, Cn_β, etc.)
- Dynamic stability derivatives (CL_q, Cm_q, Cl_p, etc.)
- Roll-yaw coupling characteristics
- Dynamic modes analysis (Dutch roll, spiral, roll subsidence)
- Dutch roll speed sweep
- Elevon control effectiveness with trim requirements
- Elevon forces and hinge loading at 10° deflection
Create a configuration file to customize analysis parameters:
aerodeck init-config config.yaml# Analysis settings
analysis:
alpha_range: [-10, 20, 2] # [min, max, step] in degrees
beta_range: [-5, 5, 2]
mach_numbers: [0.1, 0.3, 0.5]
reynolds_numbers: [1.0e6, 2.0e6, 5.0e6]
controls:
elevon: [-30, 30, 10] # degrees
rudder: [-25, 25, 10]
# AVL settings
avl:
executable: "avl" # Path to AVL binary
max_iterations: 100
convergence_tolerance: 1e-6
# XFOIL settings
xfoil:
executable: "xfoil"
n_critical: 9
max_iterations: 200
viscous: true
# Output settings
output:
formats: ["json", "pdf", "html"]
save_intermediate: true
plot_style: "seaborn"
# Reference values (auto-computed if not specified)
reference:
area: null # m² - computed from geometry
span: null # m
chord: null # m (MAC)
# Validation thresholds
validation:
max_aspect_ratio: 30
min_aspect_ratio: 2
warn_cg_shift: 0.05Single row with mass properties:
| Column | Description | Units |
|---|---|---|
| mass | Total mass | kg |
| cg_x, cg_y, cg_z | Center of gravity | m |
| Ixx, Iyy, Izz | Principal moments of inertia | kg⋅m² |
| Ixy, Ixz, Iyz | Products of inertia (optional) | kg⋅m² |
Panel point coordinates (one point per row):
| Column | Description | Units |
|---|---|---|
| x | X coordinate | m |
| y | Y coordinate | m |
| z | Z coordinate | m |
Note: Leading edge and trailing edge files must have the same number of points.
Same format as panel points above.
After running aerodeck generate, you'll find these files in the output directory:
{aircraft_name}.avl- AVL input file (human-readable geometry definition){aircraft_name}.mass- AVL mass file (mass, CG, inertia tensor){aircraft_name}_aerodeck.json- Machine-readable aero deck for 6-DOF simulation{aircraft_name}_aerodeck.pdf- Comprehensive analysis report (auto-generated)avl_outputs/- Directory containing all AVL text output filespolars/- Directory containing XFOIL airfoil polars (CSV format)
The *_aerodeck.json file contains:
- Metadata: Aircraft name, generation date, version info
- Reference geometry: Wing area, span, chord, CG location
- Mass properties: Mass, moments of inertia, products of inertia
- Static stability: CL_α, Cm_α, Cn_β, neutral point
- Dynamic stability: CL_q, Cm_q, Cl_p, Cn_r, etc.
- Control surfaces: Control effectiveness (Cm_δe, Cl_δa, etc.)
- Airfoil polars: Lift, drag, and moment vs. alpha at various Reynolds numbers
The automatically generated PDF report includes:
- Summary page: Metadata, reference geometry, mass properties
- Static stability: Longitudinal and lateral-directional derivatives
- Dynamic stability: Pitch, roll, and yaw damping derivatives
- Roll-yaw coupling: Adverse yaw and proverse roll characteristics
- Dynamic modes: Dutch roll frequency/damping, spiral stability, roll time constant
- Control effectiveness: Pitch and roll control authority with trim requirements
- Elevon loading: Forces and hinge moments at various deflections
This project follows a 3-phase development plan:
- Project structure and packaging
- CSV geometry loader
- Geometry validation
- AVL input file generator
- AVL execution wrapper
- Verbose logging system
- Configuration management
- Basic CLI
- Unit tests
- XFOIL integration
- Run matrix generation
- Aero deck data structure
- 6-DOF output file writer
- Stability derivative extraction
- Integration tests
- PDF report generation
- HTML interactive reports
- 3D geometry visualization
- Comprehensive documentation
- Package distribution
- CI/CD pipeline
# Install development dependencies
pip install -e ".[dev]"
# Run tests with coverage
pytest
# Run specific test file
pytest tests/test_geometry_loader.py
# Run with verbose output
pytest -v# Format code
black aerodeck/
# Sort imports
isort aerodeck/
# Type checking
mypy aerodeck/
# Linting
flake8 aerodeck/ntop-aerodeck/
├── aerodeck/ # Main package
│ ├── geometry/ # Geometry loading and translation
│ │ ├── loader.py # CSV file loader
│ │ ├── validator.py # Geometry validation
│ │ └── avl_translator.py # AVL format converter
│ ├── analysis/ # Analysis modules
│ │ ├── avl_runner.py # AVL execution wrapper
│ │ └── xfoil_runner.py # XFOIL wrapper (Phase 2)
│ ├── output/ # Output generation
│ │ ├── report_generator.py # Reports (Phase 3)
│ │ └── deck_writer.py # Aero deck files
│ ├── utils/ # Utilities
│ │ ├── logger.py # Verbose logging
│ │ └── config.py # Configuration
│ └── cli.py # Command-line interface
├── tests/ # Test suite
├── examples/ # Example scripts
├── docs/ # Documentation
├── requirements.txt # Dependencies
├── pyproject.toml # Package configuration
└── README.md # This file
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run the test suite
- Submit a pull request
MIT License - see LICENSE file for details
Claude Code & Brad Rothenberg
- AVL by Mark Drela (MIT)
- XFOIL by Mark Drela (MIT)
For issues, questions, or feature requests, please open an issue on GitHub.
Status: Phase 1 Complete ✅ | Next: Phase 2 Development 🔄