NACA Airfoil Cross Field
Cross field smoothing on a triangulated airfoil domain
Configure the airfoil and domain, then explore the cross field. Click vertices to constrain/release them. Toggle boundary constraints with the checkboxes. Drag to pan, scroll to zoom.
Airfoil
Domain
Field
Quad
Display
Dirichlet energy per iteration
How it works
- Mesh generation: points are placed on the airfoil surface (cosine-spaced), the domain boundary, and a regular interior grid. Points inside the airfoil or outside the domain are rejected. Delaunator computes the Delaunay triangulation; triangles whose centroid falls inside the airfoil or outside the domain are removed.
- Cross field: each vertex carries an angle. The 4-RoSy Laplacian smoother averages
cos 4θ / sin 4θover mesh neighbors — the same representation used in frame field papers. - Constrain airfoil: pins airfoil-surface vertices to the local tangent direction.
- Constrain domain: pins far-field boundary vertices to the local tangent direction.
- Click to constrain: click any vertex to pin/release it at its current angle.
- Run smoother: executes the specified number of Jacobi iterations and records the Dirichlet energy at each step.
- Energy chart: shows E = Σedges (1 − cos 4(θi − θj)) per iteration. Red dot = initial energy, green dot = final. The curve should decay monotonically toward the smooth equilibrium.
- Iterations slider goes up to 2000 for observing long-tail convergence.
- Detect singularities: computes the Poincaré index (angle defect) around each triangle. Non-zero index means a singularity: +1 (3-valent, red) or -1 (5-valent, purple).
- Trace separatrices: from each singularity, traces streamlines outward along cross field arms. These are the red curves that form potential block partition boundaries.
- Build motorgraph: constructs a graph whose nodes are singularities and boundary intersection points, and whose edges are the separatrix arcs connecting them. This is the topological skeleton of the block decomposition.
- Extract blocks: walks the motorgraph to identify closed regions (blocks) and fills them with distinct colors. Each block is a candidate for structured (transfinite interpolation) meshing.
- Geometry changes (NACA code, AoA, domain, spacing) regenerate the mesh and reset the field. Click Run smoother again to re-solve.