Aerodynamic Analysis & Wing Design Tool for RC Aircraft
A comprehensive Python application for analyzing airfoils, scoring them based on mission requirements, and designing optimal wing configurations for remote control aircraft.
- Airfoil Analysis: Uses NeuralFoil to analyze airfoils across ranges of angles of attack and Reynolds numbers
- Multi-Mission Scoring: Ranks airfoils based on payload, endurance, or trainer mission profiles
- Wing Design: Generates and evaluates wing configurations with different aspect ratios
- VLM Analysis: Performs Vortex Lattice Method analysis for accurate aerodynamic predictions
- Performance Filtering: Selects wings that meet MTOW (Maximum Takeoff Weight) requirements
- Interactive UI: Beautiful Streamlit interface for easy parameter configuration and visualization
- Comprehensive Plots: Visualizes CL, CD, L/D ratios, moment coefficients, and comparisons
Wing parameter decide/
├── app.py # Main Streamlit UI application
├── config.py # Configuration and constants
├── utils.py # Utility functions
├── airfoil_analysis.py # Airfoil analysis module
├── scoring.py # Scoring and ranking module
├── wing_design.py # Wing design and VLM analysis
├── visualization.py # Plotting and visualization
├── requirements.txt # Python dependencies
├── README.md # This file
└── wing analyzer.py # Original monolithic script (legacy)
- Python 3.8 or higher
- pip package manager
-
Clone or navigate to the project folder:
cd "e:\Aeroclub\Wing parameter decide"
-
Install dependencies:
pip install -r requirements.txt
-
Prepare airfoil files:
- Place your
.datairfoil files in the designated folder - Default:
E:\Aeroclub\Airfoils_twst - Update path in
config.pyif different
- Place your
streamlit run app.pyThis will open the application in your default web browser.
-
Home Tab: Configure design parameters
- Set MTOW (Maximum Takeoff Weight)
- Set maximum wingspan constraint
- Choose design velocity
- Select mission type (payload/endurance/trainer)
-
Airfoil Analysis Tab: Analyze airfoils
- Click "Start Airfoil Analysis"
- Wait for NeuralFoil to analyze all airfoils
- View and download results
-
Ranking & Selection Tab: Score airfoils
- Review scoring weights for your mission
- Calculate rankings
- View top-ranked airfoils
- Download ranked results
-
Wing Design Tab: Generate wing configurations
- Generate configurations with different aspect ratios
- Optionally run VLM analysis (time-intensive)
- Filter wings meeting MTOW requirements
- Download suitable wing designs
-
Visualizations Tab: Create plots
- Single airfoil plots (CL, CD, L/D, CM vs alpha)
- Compare multiple airfoils at specific Reynolds numbers
- Export plots as needed
You can also import and use the modules in your own scripts:
from airfoil_analysis import AirfoilAnalyzer
from scoring import AirfoilScorer
from wing_design import WingDesigner, WingAnalyzer
from visualization import AirfoilPlotter
# Analyze airfoils
analyzer = AirfoilAnalyzer(folder="path/to/airfoils", velocity=13)
db = analyzer.analyze_all_airfoils("output.csv")
# Score and rank
scorer = AirfoilScorer(application="payload")
ranked = scorer.rank_airfoils(combined_df)
# Design wings
designer = WingDesigner(velocity=13, max_wingspan=1.8)
configs = designer.generate_wing_configurations(ranked)
# Visualize
plotter = AirfoilPlotter(db)
plotter.plot_cl_vs_alpha("airfoil_name")Edit config.py to customize:
- Analysis parameters: Alpha range, Reynolds range, NeuralFoil model size
- Design constraints: Default MTOW, wingspan limits, aspect ratios
- Scoring weights: Mission-specific criteria weights
- File paths: Input/output directories
- Physical constants: Air density, viscosity, etc.
Payload Mission (optimized for carrying capacity):
- MAX_CL/CD: 25%
- Optimum_CL: 30%
- CL_max: 20%
- Others: 25%
Endurance Mission (optimized for flight time):
- MAX_CL/CD: 40%
- Optimum_CD: 20%
- Optimum_CL: 15%
- Others: 25%
Trainer Mission (optimized for gentle handling):
- angle_diff: 35%
- CL_at_0_deg: 20%
- CL_max: 20%
- Others: 25%
The application generates several CSV files in the output folder:
neuralfoil_output.csv: Raw aerodynamic data for all airfoilsranked_airfoils.csv: Scored and ranked airfoilsfinal_wing_data.csv: Wing configurations with VLM resultssuitable_wings.csv: Wings meeting MTOW requirements
- Airfoil Loading: Reads
.datcoordinate files - Kulfan Transformation: Converts to parametric representation
- NeuralFoil Analysis: Predicts CL, CD, CM across operating envelope
- Feature Extraction: Identifies stall points, optimum L/D, zero-alpha performance
- Normalization: Scales features to [0,1] range
- Weighted Scoring: Applies mission-specific weights
- Wing Generation: Creates configurations within constraints
- VLM Analysis: Computes 3D aerodynamics (optional)
- Performance Filtering: Selects designs meeting requirements
- NeuralFoil: Machine learning-based airfoil aerodynamics prediction
- VLM (Vortex Lattice Method): Potential flow solver for finite wings
- Multi-criteria scoring: Weighted sum of normalized features
- aerosandbox: Aerodynamic analysis and VLM solver
- numpy: Numerical computations
- pandas: Data manipulation and analysis
- matplotlib: Plotting and visualization
- streamlit: Web-based user interface
- Verify the path in config.py or enter correct path in UI
- Ensure
.datfiles are present
- Increase max wingspan constraint
- Reduce MTOW requirement
- Try different aspect ratios
- Check if VLM analysis ran correctly
- Verify airfoil
.datfiles are valid - Check for corrupted airfoil geometry
- Ensure sufficient memory for large batches
- Reduce number of airfoils
- Decrease Reynolds number points in config.py
- Skip VLM analysis for quick estimates
- Use smaller NeuralFoil model size
This project is for educational and research purposes. Please cite AeroSandbox and NeuralFoil if used in publications.
Contributions are welcome! Areas for improvement:
- Add tapered wing support
- Include structural analysis
- Export to CAD formats
- Support for multi-segment wings
- Optimization algorithms
For questions or support related to this project, please refer to the AeroSandbox documentation:
- GitHub: https://github.com/peterdsharpe/AeroSandbox
- Documentation: https://peterdsharpe.github.io/AeroSandbox/
- AeroSandbox by Peter Sharpe - Aircraft design optimization framework
- NeuralFoil - Machine learning airfoil aerodynamics
- AEROCLUB NITTE - Original project development
Made with ❤️ for RC aircraft enthusiasts