Data and code from: Dipteran flight diversity is shaped by aerodynamic constraints, scaling, and evolutionary trade-offs
Data files
Jun 15, 2026 version files 2.47 GB
-
Diptera_Aerodynamics.zip
294.30 KB
-
Diptera_BodyMass_fresh_vs_dry.csv
15.70 KB
-
Diptera_CFD.zip
231.48 MB
-
Diptera_Explorer.zip
692.98 MB
-
Diptera_Figure_Scripts.zip
40.54 KB
-
Diptera_Kinematics_Aerodynamics.csv
6.17 KB
-
Diptera_Kinematics_Coefficients_of_Variation.csv
1.28 KB
-
Diptera_Kinematics.zip
518.13 KB
-
Diptera_Morphology.csv
16.46 KB
-
Diptera_Morphology.zip
746.83 KB
-
Diptera_Photos.zip
1.49 GB
-
Diptera_ThoraxMass.csv
1.77 KB
-
Diptera_tree_family_level.RData
840 B
-
Diptera_tree_species_level.RData
3.26 KB
-
Diptera_Videos.zip
46.86 MB
-
README.md
11.07 KB
Oct 15, 2026 version files 2.47 GB
-
Diptera_Aerodynamics.zip
212.53 KB
-
Diptera_BodyMass_fresh_vs_dry.csv
15.70 KB
-
Diptera_CFD.zip
231.48 MB
-
Diptera_Explorer.zip
692.98 MB
-
Diptera_Figure_Scripts.zip
45.22 KB
-
Diptera_Kinematics_Aerodynamics.csv
6.37 KB
-
Diptera_Kinematics_Coefficients_of_Variation.csv
1.28 KB
-
Diptera_Kinematics.zip
499.98 KB
-
Diptera_Morphology.csv
16.46 KB
-
Diptera_Morphology.zip
746.83 KB
-
Diptera_Photos.zip
1.49 GB
-
Diptera_ThoraxMass.csv
1.77 KB
-
Diptera_tree_family_level.RData
840 B
-
Diptera_tree_species_level.RData
3.26 KB
-
Diptera_Videos.zip
46.86 MB
-
README.md
14.17 KB
Abstract
Flight has been a key innovation in insect evolution, yet the selective and mechanistic pressures shaping their flight motor systems remain poorly understood. Here, we present a comprehensive comparative analysis of flight in Diptera (true flies), integrating morphology, wingbeat kinematics, and aerodynamics within a phylogenetic framework. We quantified morphology in 133 species spanning the Dipteran phylogenetic and size range, and for a subset of 46 species we combined high-speed stereoscopic videography with computational fluid dynamics (CFD) to characterize wingbeat kinematics and aerodynamic performance, respectively. Our results reveal that morphology is strongly structured by phylogeny, whereas wingbeat kinematics are broadly conserved across Diptera, reflecting dominant aerodynamic constraints. Two early-diverged lineages, Culicomorpha (mosquitoes and midges) and Tipulomorpha (crane flies), exhibit strikingly divergent kinematics and aerodynamics, suggesting lineage-specific selective pressures. Combining these data with scaling analyses shows that maintaining in-flight weight support across the dipteran size range requires systematic allometric adjustments in wing morphology, wingbeat kinematics, and flight musculature. Smaller dipterans achieve weight support through relatively larger wings and higher wingbeat frequencies, whereas larger dipterans achieve the same aerodynamic requirement through increased investment in flight musculature to sustain the necessary mechanical power output. These size-dependent trait combinations highlight how different morphological and kinematic adaptations evolved in response to the shared physical requirements of hovering flight across Diptera. Mosquitoes and midges represent an extreme case, exhibiting a pronounced aerodynamic–acoustic trade-off with disproportionately large flight musculature and increased aerodynamic and acoustic power, consistent with selection favoring acoustic signaling during in-swarm mating. By integrating comparative morphology, kinematics, and aerodynamics across a major insect radiation, our study uncovers the interplay between physical scaling laws, aerodynamic constraints, and ecological pressures in shaping the evolution of animal flight. These findings provide a mechanistic framework for understanding how complex locomotor systems diversify under multiple selection pressures.
Dataset DOI: 10.5061/dryad.gxd25480s
Description of the data and file structure
Morphology, wingbeat kinematics, aerodynamics and phylogeny of the studied Diptera species.
Files and variables
File: Diptera_tree_species_level.RData
Description: Time-calibrated phylogenetic tree for the 133 Diptera species used in this study. The tree is pruned from Wiegmann & Yeates (2017) and formatted for use in comparative and phylogenetic analyses in R.
File: Diptera_tree_family_level.RData
Description: Time-calibrated phylogenetic tree for the 43 Diptera families studied. The tree is pruned from Wiegmann & Yeates (2017) and formatted for comparative and phylogenetic analyses in R.
File: Diptera_Morphology.csv
Description: Species-level mean morphological measurements for 133 Diptera species. Each row contains body and wing size, shape, and derived non-dimensional parameters.
Variables
- genus_species: species identifier (Genus_species format).
- suborder: suborder classification following Wiegmann & Yeates (2017).
- infraorder: infraorder classification following Wiegmann & Yeates (2017).
- family: family classification following Wiegmann & Yeates (2017).
- location: Sampling location (text description).
- flight kinematics: kinematics recorded (yes/no).
- body mass: Mean body mass. Units: mg.
- body length: Body length head-to-abdomen. Units: mm.
- body width: Maximum body width. Units: mm.
- body aspect-ratio: Ratio of body length to body width (non-dimensional).
- wing area: Area of one wing, S. Units: cm².
- wing span: Wingspan b, the distance between wing root and wing tip of one wing. Units: cm.
- wing mean chord: Mean chord length, c = S/b. Units: cm.
- wing aspect-ratio: Aspect ratio of the wing pair, (2b)²/(2S) = 2b²/S (non-dimensional). The single-wing aspect ratio b²/S used in the paper is half this value.
- wing second-radius-of-gyration: Second moment-based radius of gyration, r_2. Units: cm.
- wing normalized second-radius-of-gyration: Second radius of gyration divided by wing span (non-dimensional).
File: Diptera_Kinematics_Aerodynamics.csv
Description: Species-level mean flight kinematics and aerodynamic parameters for 46 Diptera species. Each row contains wingbeat kinematics, derived aerodynamic forces, and non-dimensional metrics obtained from experimental measurements and aerodynamic modelling.
Variables
- genus_species: species identifier (Genus_species format).
- Body mass: Mean body mass. Units: mg.
- Wingspan: Distance between wing root and tip. Units: mm.
- Wing aspect-ratio: Single-wing aspect ratio, AR = b²/S, with b the wingspan and S the area of one wing (non-dimensional).
- Wingspan-normalized second-radius-of-gyration: Second radius of gyration divided by wing span (non-dimensional).
- Wingstroke amplitude: Peak-to-peak stroke angle. Units: degrees.
- Wingbeat frequency: number of wingbeats per second. Units: Hz.
- Angle-of-attack: Mean aerodynamic angle of attack. Units: degrees.
- Reynolds number: Based on chord length and wing speed (non-dimensional).
- Strokeplane pitch angle: Angle of stroke plane relative to horizontal. Units: degrees.
- Lift coefficient: Wingbeat-average force coefficient normal to the velocity vector (non-dimensional).
- Drag coefficient: Wingbeat-average of the absolute force coefficient parallel to the velocity vector, mean|C_D| (non-dimensional).
- Relative drag: Drag-to-lift ratio, D* = C_D / C_L, computed from the Drag coefficient and Lift coefficient columns (non-dimensional).
- Wing-tangential force coefficient: Wingbeat-average of the signed force coefficient tangential to the wing surface, mean(C_T) (non-dimensional).
- Wing-normal force coefficient: Wingbeat-average of the absolute force coefficient normal to the wing surface, mean|C_N| (non-dimensional).
- relative tangential force : Relative tangential force, T* = mean|C_T| / mean|C_N|, computed over one wingbeat from the time series in Diptera_Aerodynamics.zip/Force_Coeff_Normal_Tangential (non-dimensional).
- Weight-normalized aerodynamic power: Aerodynamic power divided by body weight. Units: W/N.
- Wingspan-normalized drag moment arm: Span-normalized moment arm of the drag force (non-dimensional).
- Wing speed: Wing speed at the drag moment arm. Units: m/s.
- Aeroacoustic power: Estimated wingbeat-induced sound power, normalized by body weight. The sound power in W is obtained as value × 10⁴ × body weight (N), as done in Fig_8AB.R.
- Normalized aeroacoustic power: Non-dimensional sound power.
File: Diptera_ThoraxMass.csv
Description: Species-level mean body mass and thorax mass measurements for 24 Diptera species. Each row includes total body mass, relative thorax mass, and the phylogenetically closest species in the flight dataset.
Variables
- genus_species: species identifier (Genus_species format).
- family: family classification following Wiegmann & Yeates (2017).
- infraorder: infraorder classification following Wiegmann & Yeates (2017).
- Body mass: Mean body mass. Units: mg.
- Relative thorax mass: thorax mass as a percentage of total body mass. Units: %. Flight-muscle mass was estimated as 0.9 × thorax mass.
- closest species in flight dataset: phylogenetically closest species in the flight dataset.
File: Diptera_BodyMass_fresh_vs_dry.csv
Description: Paired fresh and dry body mass measurements for a subset of specimens. These data were used to estimate fresh body mass for specimens collected in French Guiana where only dry mass was available.
Variables
- specimen_ID: Unique identifier for each specimen.
- individual_ID: Identifier linking measurements from the same individual.
- capture_date: Date of specimen collection (DD.MM.YYYY).
- capture_place: Collection location (text description).
- GPS_coordinates (DDformat): Latitude and longitude in decimal degrees.
- fresh_mass_mg: Fresh body mass (mg). For specimens from French Guiana, fresh mass was not measured but estimated from dry mass: m_fresh = 4.107 m_dry − 0.961 (dry mass ≥ 0.3 mg) and m_fresh = 6.619 m_dry + 0.509 (dry mass < 0.3 mg), fitted on the Wageningen specimens.
- dry_mass_mg: Dried body mass (mg).
File: Diptera_Kinematics_Coefficients_of_Variation.csv
Description: Coefficients of variation (CV) for flight kinematics parameters, quantified within species (individual variation) and between species (interspecific variation).
Variables
- parameter: Name of the kinematic variable.
- variation_type: Type of variation: within_species or btw_species (between species).
- CV_value: Coefficient of variation, standard deviation divided by mean × 100. Units: %.
File: Diptera_Morphology.zip
Description: Average wing outlines for 133 Diptera species used in the morphometric analysis. Each .csv file contains the mean wing contour of a single species, represented as a sequence of planar coordinates describing the wing boundary. Coordinates are ordered along the wing outline in the morphometrics coordinate system.
Variables
- X: spanwise coordinates of the wing outline. Units: normalized length (non-dimensional).
- Y: chordwise coordinates of the wing outline. Units: normalized length (non-dimensional).
File: Diptera_Kinematics.zip
Description: Time-resolved wingbeat kinematics for 46 Diptera species. Each .csv file contains the average wingbeat cycle of a single species, expressed as a time-normalized sequence of kinematic variables derived from flight measurements. The wingbeat is represented over a normalized time variable from 0 to 1, corresponding to one full stroke cycle.
Variables
- ft: Normalized time within the wingbeat cycle (0–1; non-dimensional).
- Stroke: Wing stroke angle within the stroke plane (degrees).
- Rotation: Wing rotation angle along the spanwise axis (degrees).
- Deviation: Wing deviation angle out of the stroke plane (degrees).
- Wingbeat frequency: Number of wingbeats per second (Hz).
- Stroke plane angle: Pitch angle of the stroke plane relative to horizontal (degrees).
The time series have 101 samples per wingbeat (100 samples for ten species).
The archive also contains all_species.rds, an R array (100 time steps × 12 variables × 46 species) with the Fourier-fitted wingbeat kinematics used for Fig. 3C–F. Load it with readRDS(). Variables:
- wingbeat_cycle: time-step index (1–100).
- stroke_fitted, deviation_fitted, rotation_fitted: fitted wing angles (degrees).
- stroke_rate_fitted, deviation_rate_fitted, rotation_rate_fitted: angular rates (degrees/s).
- stroke_accel_fitted, deviation_accel_fitted, rotation_accel_fitted: angular accelerations (degrees/s²).
- angle_of_attack: angle of attack (degrees).
- abs_wing_speed: angular wing speed, the magnitude of the stroke and deviation rates (degrees/s).
For eleven species (Calliphora_vomitoria, Campiglossa_bidentis, Coproica_vagans, Eristalis_nemorum, Lestremia_cinerea, Lonchoptera_bifurcata, Megaselia_sp, Micromya_lucorum, Opomyza_germinationis, Smittia_paranudipennis, Tipulidae_sp), the stroke rate and stroke acceleration were computed analytically from a 4th-order Fourier fit of the stroke angle and the wingbeat frequency. For these species the deviation and rotation rates and accelerations, the angle of attack and the angular wing speed are not available (NA).
File: Diptera_Aerodynamics.zip
Description: Time-resolved aerodynamic force coefficients for 46 Diptera species. The archive contains two folders:
- Force_Coeff_Lift_Drag: lift and drag force coefficients
- Force_Coeff_Normal_Tangential: force coefficients resolved normal and tangential to the wing surface
The .csv files inside each folder contain the species-specific time-normalized sequence of aerodynamic force coefficients throughout the average wingbeat. All force coefficients are non-dimensional and derived from CFD simulations. The wingbeat is represented over a normalized time variable from 0 to 1, corresponding to one full stroke cycle.
Variables
- ft: Normalized time within the wingbeat cycle (0–1; non-dimensional).
- CL: Lift force coefficients normal to the wingbeat-induced velocity vector (non-dimensional).
- CD: Drag force coefficients parallel to the wingbeat-induced velocity vector (non-dimensional).
- CN: force coefficients normal to the wing surface (non-dimensional).
- CT: force coefficients tangential to the wing surface (non-dimensional).
The time series have 101 samples per wingbeat (100 samples for ten species in Force_Coeff_Lift_Drag and nine species in Force_Coeff_Normal_Tangential).
File: Diptera_Photos.zip
Description: Microscope photographs of representative specimens for each of the 133 Diptera species. For each species, the dataset includes images of the full insect and an isolated wing, used for morphological characterization of wing shape data.
File: Diptera_Videos.zip
Description: High-speed videos of representative flying specimens for all 46 Diptera species studied in flight. For each species, the dataset includes a full-frame recording and a cropped, panning video focused on the flying insect.
File: Diptera_CFD.zip
Description: Parameter files for the CFD simulation of all 46 Diptera species studied in flight. Each folder contains:
- CFD input files (*.ini), required to re-run the simulation with our open-source code WABBIT (https://github.com/adaptive-cfd/WABBIT).
- CFD output files (*.t ), containing aerodynamic forces, moments, power, and related quantities used in the analysis.
All CFD data are dimensionless, as normalized with wingspan, wingbeat frequency, and density of air.
File: Diptera_Explorer.zip
Description: Interactive tool that enables phylogeny‑aware filtering, subset visualization, and direct data export. Users can select any family or species, which will highlight the corresponding wingbeat kinematics, aerodynamics, and underlying media (representative image and high-speed video). The export function allows side‑by‑side comparison of any insects in the dataset and complete reproduction of all figure‑level analyses.
Execution and requirements:
- Windows: run Diptera_Explorer.exe, which opens the application in the default web browser (tested in Chrome).
- Linux: run Diptera_Explorer.linux (may require execution permission via chmod +x).
- The application runs locally and requires a modern web browser.
- No installation or internet connection is required.
File: Diptera_Figure_Scripts.zip
Description: Custom R code for reproducing the manuscript figures from the provided data.
Usage: extract all zip archives into folders with the same name as the archive (e.g. Diptera_Figure_Scripts/, Diptera_Kinematics/, Diptera_Aerodynamics/, Diptera_Morphology/), next to the csv and RData files. Each script is named after the figure panels it produces (e.g. Fig_3CDEF.R) and finds the data relative to its own location. Run a script with source(".../Diptera_Figure_Scripts/Fig_3CDEF.R") in R or RStudio, or with Rscript from the command line.
Required R packages: ape, caper, dplyr, geomorph, ggplot2, lmodel2, phytools, pracma, RColorBrewer, rstudioapi, tagcloud.
The scripts produce the data panels of the figures. Final layout, symbols, silhouettes and annotations were added outside R.
Code/software
- Data provided in CSV format can be loaded in most programming environments.
- The phylogenetic trees (.RData) can be loaded into R using: load(".../.RData").
- The R scripts can be executed in R using: source(".../*.R").
- CFD simulations can be reproduced using the open-source CFD code WABBIT (https://github.com/adaptive-cfd/WABBIT).
- The interactive tool runs locally via Diptera_Explorer.exe (Windows) or Diptera_Explorer.linux (Linux) and opens in a web browser; no installation or internet connection is required.
Changes after Jun 15, 2026:
Seven files were replaced:
- Diptera_Kinematics_Aerodynamics.csv
- Diptera_Morphology.csv, Diptera_ThoraxMass.csv
- Diptera_Aerodynamics.zip
- Diptera_Kinematics.zip
- Diptera_Figure_Scripts.zip
- README.md.
All other files are unchanged.
Diptera_Kinematics_Aerodynamics.csv: two columns were revised. Relative drag (D*) now contains the drag-to-lift ratio C_D/C_L, as defined and used in the paper. The previous version contained mean CFD drag normalized by body weight, which differs from C_D/C_L because the mean CFD lift is not exactly equal to body weight. Relative tangential force (T*) is now given at full precision (4 decimals), computed as mean|C_T| / mean|C_N| over the wingbeat from the time series in Force_Coeff_Normal_Tangential. The previous version was rounded to two decimals. For Tipulidae_sp the previous value (0.07) was mean C_T / mean|C_N| instead of mean|C_T| / mean|C_N| (now 0.118), consistent with the value used in the paper.
Diptera_Morphology.csv: the unit of the wing second radius of gyration in the header was corrected from m^2 to cm. No values were changed.
Diptera_ThoraxMass.csv: the infraorder of Campiglossa_bidentis was corrected from Cyclorrhapha to Tephritoidea, and two species names were corrected (Hermetia illucens to Hermetia_illucens, Haematapota_pluvialis to Haematopota_pluvialis). No values were changed.
Diptera_Aerodynamics.zip: Force_Coeff_Normal_Tangential/Tipulidae_sp.csv contained the unprocessed CFD output. It was replaced by the processed version, on the same 101-point wingbeat time base and C_T sign convention as the other species. Force_Coeff_Normal_Tangential/Raghio_scolopaceus.csv was renamed to Rhagio_scolopaceus.csv. A trailing row of missing values (NA) was removed from nine files in Force_Coeff_Normal_Tangential.
Diptera_Kinematics.zip: in Tipulidae_sp.csv the time axis ran from 0 to 3 for a single wingbeat. It now runs from 0 to 1, as for all other species, and the wingbeat frequency (47 Hz) and stroke plane angle (-1 deg) columns were added. The angle values are unchanged. In all_species.rds, the angular-rate and acceleration columns of eleven species contained a numerical spike at the start of the wingbeat. For these species the stroke rate and stroke acceleration were recomputed from the fitted stroke angle, and the deviation and rotation rates and accelerations, angle of attack and angular wing speed were set to NA.
Diptera_Figure_Scripts.zip: the scripts now run with the deposited data, from R, RStudio or Rscript. File names, column names, package loading and undefined objects were corrected. Four plotting errors were corrected: Fig. 1C now shows flight-muscle mass (0.9 x thorax mass), Fig. 3H shows C_T with the correct sign, Fig. 3I links the phylogeny to the correct species, and Fig. 3J uses the correct infraorder colours.
README.md: units of the morphology data were corrected (cm, cm²), and definitions were corrected or added for wing aspect ratio, relative drag, relative tangential force, the force coefficients, aeroacoustic power, relative thorax mass, the coefficients of variation and the estimated fresh mass of the French Guiana specimens. Descriptions of all_species.rds, the time-series sampling and the use of the figure scripts were added. Force_Coeff_Normal_Tangential is now described as resolved relative to the wing surface (previously: wing stroke plane).
