SurfplanAdapter is a Python toolkit designed to process kite design files from SurfPlan and prepare them for aerodynamic and structural analysis. The tool extracts geometric data, parametrizes airfoil profiles using a leading-edge inflatable (LEI) model, and generates configuration files compatible with the Vortex-Step-Method (VSM) for aerodynamic simulations.
Key capabilities include:
- Surfplan file parsing: Extract wing geometry, airfoil profiles, and bridle line data from .txt exports
- Parametric airfoil generation: Fit LEI airfoil parameters using the Masure regression model
- YAML configuration generation: Create VSM-compatible aerodynamic and structural geometry files
- Visualization tools: Compare parametric vs CAD-sliced airfoils and visualize 3D geometry
- Mass properties calculation: Compute center of gravity and inertia tensors
The typical workflow consists of:
-
Export from SurfPlan: Export your kite design as a .txt file along with airfoil profile .dat files
-
Process Surfplan files: Run
scripts/process_surfplan_files.pyto:- Extract wing geometry and rib data
- Parse bridle line connections
- Fit parametric airfoil models to CAD profiles
- Generate
config_kite.yaml,aero_geometry.yaml, andstruc_geometry.yaml - Create comparison plots and 3D visualizations
-
Calculate mass properties: Use
scripts/calculate_cg_and_inertia.pyto:- Compute center of gravity location
- Calculate inertia tensor
- Visualize mass distribution
-
Run aerodynamic analysis: Use the generated YAML files with VSM for aerodynamic simulations
SurfplanAdapter/
├── data/ # Input Surfplan files and airfoil profiles
│ ├── TUDELFT_V3_KITE/ # Example: TU Delft V3 kite design
│ │ ├── TUDELFT_V3_KITE.txt # Surfplan export
│ │ └── profiles/ # CAD-sliced airfoil .dat files
│ ├── default_kite/
│ └── V9_60J-Inertia/
├── processed_data/ # Output directory for processed geometry
│ └── TUDELFT_V3_KITE/
│ ├── config_kite.yaml # Combined configuration
│ ├── aero_geometry.yaml # Aerodynamic geometry (for VSM)
│ ├── struc_geometry.yaml # Structural geometry (for FEM/PSS)
│ ├── profiles/ # Parametric airfoil profiles
│ └── *.pdf # Visualization outputs
├── results/ # Analysis results and plots
├── scripts/ # Main workflow scripts
│ ├── process_surfplan_files.py # Main processing pipeline
│ ├── calculate_cg_and_inertia.py
│ └── run_vsm.py
├── src/SurfplanAdapter/ # Core modules
│ ├── process_wing/ # Wing geometry extraction
│ ├── process_bridle_lines/ # Bridle line parsing
│ ├── find_airfoil_parameters/ # Parametric airfoil fitting
│ ├── generate_yaml/ # YAML file generation
│ ├── plotting.py # Visualization utilities
│ └── calculate_cg_and_inertia.py
└── docs/ # Documentation
- process_wing: Extracts rib positions, chord lengths, twist angles, and airfoil profiles from Surfplan files
- process_bridle_lines: Parses bridle line data with node ID mapping and connection management
- find_airfoil_parameters: Fits 6-parameter LEI model (t, η, κ, δ, λ, φ) to airfoil profiles
- generate_yaml: Creates configuration files for aerodynamic and structural solvers
- plotting: 3D visualization and comparison plots
-
Clone the repository:
git clone https://github.com/jellepoland/SurfplanAdapter.git
-
Navigate to the repository folder:
cd SurfplanAdapter -
Create a virtual environment:
Linux or Mac:
python3 -m venv venv
Windows:
python -m venv venv
-
Activate the virtual environment:
Linux or Mac:
source venv/bin/activateWindows:
.\venv\Scripts\activate
-
Install the required dependencies:
For users:
pip install .For developers:
pip install -e .[dev]
-
To deactivate the virtual environment:
deactivate
from pathlib import Path
from scripts.process_surfplan_files import main
# Process the TU Delft V3 kite example
main(kite_name="TUDELFT_V3_KITE", airfoil_type="masure_regression")This will:
- Read
data/TUDELFT_V3_KITE/TUDELFT_V3_KITE.txt - Extract geometry and fit airfoil parameters
- Generate YAML files in
processed_data/TUDELFT_V3_KITE/ - Create visualization plots
from scripts.calculate_cg_and_inertia import main
main(
kite_name="TUDELFT_V3_KITE",
total_wing_mass=10.0, # kg
canopy_kg_p_sqm=0.05, # kg/m²
le_to_strut_mass_ratio=0.7,
sensor_mass=0.5, # kg
)Core dependencies (see pyproject.toml for complete list):
- numpy: Numerical computations and array operations
- matplotlib: Plotting and visualization
- pyyaml: YAML file handling
- scipy: Scientific computing utilities
Optional dependencies:
- VSM (Vortex-Step-Method): For aerodynamic analysis
- pytest: For running tests (dev)
The tool uses a 6-parameter model for leading-edge inflatable (LEI) airfoils, based on the work of K.R.G. Masure:
- t: Leading edge tube diameter (normalized by chord)
- η: Chordwise camber position (0 to 1)
- κ: Maximum camber height (normalized by chord)
- δ: Trailing edge reflex angle (degrees)
- λ: Trailing edge camber tension (0 to 1)
- φ: Leading edge curvature tension (0 to 1)
These parameters are automatically fitted to CAD-sliced profiles from Surfplan.
# 1. Export your kite design from SurfPlan
# - Export as .txt file
# - Export airfoil profiles as .dat files
# 2. Place files in data directory
mkdir -p data/my_kite/profiles
cp my_kite.txt data/my_kite/
cp prof_*.dat data/my_kite/profiles/
# 3. Process the design
cd scripts
python process_surfplan_files.py
# (Modify kite_name="my_kite" in the script)
# 4. Results will be in processed_data/my_kite/The processing pipeline automatically generates:
- 3d_airfoil_plot.png: 3D view of all wing sections
- airfoils_in_aero_geometry.pdf: Comparison of parametric vs CAD profiles
- struc_geometry visualization: Network plot of structural connections
Please report issues and create pull requests using:
https://github.com/jellepoland/SurfplanAdapter
We welcome contributions! Here's how:
- Create an issue on GitHub describing the bug/feature
- Create a branch from the issue
git checkout -b issue_number-description
- Implement your changes
- Run tests to verify nothing broke
pytest
- Commit with descriptive message
git commit -m "#<issue_number> <description>" - Push to GitHub
git push origin issue_number-description
- Create a pull request targeting
mainbranch - After merge, close the issue
If you use this project in your research, please cite:
@software{surfplanadapter2025,
author = {Poland, Jelle and Mooijman, Tom and Tan, Corentin},
title = {SurfplanAdapter},
year = {2025},
url = {https://github.com/jellepoland/SurfplanAdapter}
}Citation details can also be found in CITATION.cff.
This project is licensed under the MIT License - see the LICENSE file for details.
Technische Universiteit Delft hereby disclaims all copyright interest in the package written by the Author(s).
Prof.dr. H.G.C. (Henri) Werij, Dean of Aerospace Engineering
Copyright (c) 2024-2025 Jelle Poland (TU Delft)
Copyright (c) 2024 Tom Mooijman (Kitepower)
Copyright (c) 2024 Corentin Tan (BeyondTheSea)