Novel distance-based masking and adaptive α-shape methods for CNN-ready reconstruction of arbitrary 2D CFD flow domains
Abstract
Interpolating scattered CFD datasets onto a uniform Cartesian grid can distort the true geometry, producing a convex-hull type envelope and activating nonphysical regions. This work presents a reconstruction framework that accurately recovers the true geometric boundaries of arbitrary computational domains before exporting CNN-ready fields. It introduces two novel strategies, distance-based masking and an adaptive α -shape formulation that normalizes α using local data resolution, and evaluates them against classical α -shape boundary recovery. A quantitative, topology-aware metric suite is introduced to assess retention, suppression of unsupported regions, overlap consistency, and connectivity. The novel distance-based method is robust across the geometries considered under the same threshold rule, with τ set to the minimum CFD grid spacing, and achieves 4.3 × − 19.3 × speedups over classical α -shapes. The adaptive α -shape remains stable when its control parameter is set to 1 and is 2.1 × − 3.9 × faster than the classical variant, which requires geometry-specific α tuning. A lightweight boundary inflation post-process using a minimal dilation further improves retention by up to 3.05 % with negligible unsupported activation ( ≤ 0.08 % ). Overall, the distance-based method is recommended as the default due to its accuracy, stability, minimal tuning, and low cost, while the adaptive α -shape is a strong alternative when grid-spacing information for threshold selection is unavailable. The proposed framework is intended as a preprocessing step for CNN-based CFD workflows. A companion web application operationalizes the workflow end-to-end, enabling 2D ASCII dataset upload, parameter tuning, mask and boundary generation, and export of CNN-ready outputs.
// Source
Authors: Mehran Sharifi, Gorka S. Larraona, Alejandro Rivas
Institutions: Universidad de Navarra