Body-Anchored Coordinate Channels for Neural Surrogates of Interacting Wakes

When two bluff bodies sit one behind the other in a flow, or a group of robotic fish swims in formation, the physics is set by relative geometry. The distance between bodies, measured in body sizes, decides whether shed vortices merge, shear each other apart, or feed energy to the body downstream. Neural surrogates (fast learned stand-ins for fluid solvers) are trained on these systems, but they are trained and tested at a single spacing. They are also built from ordinary convolutions, which respond to a pattern the same way wherever it appears on the grid and so have no built-in notion of "how far am I from body 2." We propose to give the convolution that notion directly. Before each block, the network receives extra input channels that hold each grid cell's distance and bearing to every body. These channels move with the bodies as they vibrate. We then test whether a surrogate trained on a few spacings can predict the wake, the forces, and the optimal spacing of a configuration it has never seen.

The idea extends CoordConv, a convolution that is also fed fixed $x$ and $y$ coordinate channels. CoordConv started as a fix for the "coordinate transform problem" in vision (An intriguing failing of convolutional neural networks and the CoordConv solution). We keep its mechanism but change two things: where the coordinates are anchored and what is held out at test time. In CoordConv the coordinates are fixed to the image frame and a spatial quadrant is held out. Here the coordinates are anchored to moving bodies and a geometric regime, an unseen spacing, is held out. The question this answers matters for engineering. Spacing studies are where surrogates would save the most compute: the vortex-generator study needed LES plus wind-tunnel runs at four spacing ratios (Analysis of the Effect of Vortex Generator Spacing on Boundary Layer Flow Separation Control), and the swarm study needed one simulation per formation and spacing (Numerical Simulation and Analysis of Fish-Like Robots Swarm). Spacing is also exactly the axis along which current surrogates have never been tested.

Core Claim

A convolutional surrogate whose feature maps are augmented with per-body polar coordinate channels will generalize to unseen inter-body spacings far better than the same network given only domain-fixed Cartesian coordinates or a single combined distance-to-wall field. "Per-body" means the channels are recomputed every time step from each body's current center. In particular, it will recover the correct location of the spacing optimum when that optimum lies between training spacings.

For body $k$ with center $\mathbf{c}_k(t)$ and diameter $D$, each grid point $\mathbf{x}$ receives three channels:

$$\rho_k(\mathbf{x},t) = \log\frac{|\mathbf{x}-\mathbf{c}_k(t)|}{D}, \qquad \big(\cos\theta_k,\ \sin\theta_k\big), \quad \theta_k = \angle\big(\mathbf{x}-\mathbf{c}_k(t),\ \mathbf{U}_\infty\big),$$

Here $\theta_k$ is the bearing from body $k$ measured against the freestream direction $\mathbf{U}_\infty$. Bodies are ordered from upstream to downstream so the channels keep a consistent meaning across configurations.

The reasoning is as follows. In these channels, the near wake of each body looks the same at every spacing. A kernel can therefore learn "what a cylinder's shear layer does at $\rho \approx 0$, $\theta \approx \pm 90°$" once and reuse that feature for both bodies. What changes with spacing is only the joint pattern of $(\rho_1, \rho_2)$. Because it is a smooth function of spacing, the network can interpolate it rather than memorize it.

This is different from the closest existing work. A novel hybrid neural network of fluid-structure interaction prediction for two cylinders in tandem arrangement builds USFNO-FConvLSTM, a hybrid of a Fourier neural operator, convolutional LSTMs, and a U-Net, for tandem cylinders at spacing ratio 1.5 and $Re=200$. Its convolutions get no coordinate channels, and it is never evaluated at another spacing. Broadcasting Convolutional Network for Visual Relational Reasoning adds a radial channel, but only from a fixed image center, to reduce center bias. The research file notes that radial channels following moving centers have not been studied in the coordinate-aware convolution literature.

Research Program

The primary testbed is two elastically mounted cylinders in tandem at $Re=200$, the regime of the hybrid tandem-cylinder paper. We will generate it ourselves with an overset-mesh solver, spanning spacing ratios from close (the downstream cylinder sits inside the upstream shear layers) to wide (both cylinders shed independently). We will locate the regime transition in our own data rather than assume where it falls. Each run records velocity, pressure, cylinder displacements, and lift and drag histories. The flow is interpolated onto a uniform Cartesian grid for the convolutional models.

The surrogate is a U-Net with a convolutional LSTM bottleneck. It deliberately has the same structure as the convolutional half of USFNO-FConvLSTM, so that the coordinate channels are the only change. At each step the predicted cylinder displacements, which come from a structural model coupled to the predicted surface forces, update $\mathbf{c}_k(t)$, and the channels are recomputed. A body-occupancy mask is always supplied to every model so that no model is denied basic knowledge of where the bodies are.

The research file raises a concern that hard-coding coordinates in every layer causes overfitting to locations rather than learning transport. We test it directly by varying where the channels are injected: input only, encoder only, or every block. We also add a variant in which a learned per-channel gate can switch the coordinate pathway off, in the spirit of CoordConv's observation that unneeded coordinate weights can be driven to zero.

The second testbed is the 2D swarm setup at $Re=1000$ from Numerical Simulation and Analysis of Fish-Like Robots Swarm: tandem, phalanx, diamond, and rectangular formations, with spacings from $0.5L$ to $2.0L$, where $L$ is body length. Here the bodies deform, and their number varies with formation. Body-anchored channels are therefore stacked per body, in a fixed upstream-to-downstream and left-to-right order. This testbed checks whether the mechanism survives outside rigid cylinders. Its scientific target is concrete: that paper reports tandem efficiency peaking at $1.0L$ and rectangular efficiency peaking at $1.5L$.

We will use the CoordConv layer implementation from uber-research/CoordConv as the starting point for our layers. Metrics follow PDEBench: An Extensive Benchmark for Scientific Machine Learning, which argues that pixel-wise error alone misses physical consistency. Alongside relative $L_2$ error on velocity, pressure, and vorticity, we report boundary error, the error in a band of Fourier frequencies, and Strouhal-number and force-amplitude errors from the predicted lift and drag. All are reported on rollouts of increasing length.

Baselines

The naive reference is the same U-Net/ConvLSTM with no coordinate channels, relying on zero-padding and the occupancy mask to infer position. This is the configuration current tandem-cylinder surrogates use. On the evaluation suite of CFDONEval: A Comprehensive Evaluation of Operator-Learning Neural Network Models for Computational Fluid Dynamics, convolutional U-Nets of this kind "struggle to capture vortex rotation" in convection-dominated flow. Beating this baseline is necessary but not interesting on its own.

The strongest existing method on this exact physical problem is USFNO-FConvLSTM. Its authors report a minimum average mean relative error of 9.56% for pressure and 3.3% for velocity at spacing 1.5 and $Re=200$, and a 45.90% reduction in pressure mean absolute error relative to CNN and U-Net baselines. We will reimplement it, add the occupancy mask, and train it on exactly our training spacings. It gets the same number of gradient steps and a matched hyperparameter search of equal trial count, with parameter counts within 10% of our model. For context on obstacle flows, Towards General Neural Surrogate Solvers with Specialized Neural Accelerators reports 1.01% relative error for its self-modulating FNO against roughly 5.3% for FNO and 2.9% for U-Net. We therefore also run a plain FNO, as the Fourier-only reference. Our model beats USFNO-FConvLSTM if, on held-out spacings, it has lower pressure relative error and lower Strouhal error with non-overlapping seed intervals, while staying within noise on the training spacing.

An attention-based operator from the GFormer/OFormer family is the third baseline. CFDONEval found these models capture vortex phenomena where U-Nets fail. It gets standard 2D positional encodings plus the body mask, and the same data and budget. No reported result was found on Lacuna for these models on tandem cylinders or on CFDONEval's vortex tasks in numbers, so the comparison rests entirely on our runs.

The ablations that isolate the key ingredient are three, all inside our architecture. The first adds global Cartesian CoordConv channels $(x, y)$. The second adds a single signed-distance field to the nearest body surface. The third adds per-body channels that stay frozen at the bodies' mean positions instead of moving with them.

Why not just…?

Why not just append ordinary CoordConv $(x,y)$ channels? This is the obvious move, and we include it. Global coordinates tell a cell where it is on the grid, not where it is relative to the bodies. At an unseen spacing, the downstream cylinder occupies grid locations whose $(x,y)$ values were associated with free wake during training, so the network has to unlearn rather than reuse. If global CoordConv matches body-anchored channels on held-out spacings, the body-anchoring claim is false, and the held-out-spacing experiment is designed to show exactly this.

Why not just feed a signed-distance field to the nearest wall? This is the real threat. It is cheap, standard for geometry-dependent surrogates, and already relative to the bodies. Its weakness, in our hypothesis, is that taking the minimum over bodies erases which body a cell is near and in which direction it lies. Those are precisely the facts that separate the upstream shear layer from the downstream body's wake. A signed-distance field plus a body-index channel is a fair middle ground, and we add it as a further ablation. If it closes most of the gap, we will report that the gain comes from relative distance and not from bearing, and simplify the method accordingly.

Why not just use an attention operator, whose positional encodings already break translation invariance? CFDONEval reports that attention models excel on convection-dominated vortex flows. Their positional encodings, however, are absolute in the grid frame, so they face the same held-out-spacing problem as global CoordConv. They also pay quadratic memory in the number of grid points, which the broadcasting work quantifies as nearly 60 times slower than linear-cost alternatives in its relational setting. Whether attention nonetheless generalizes across spacings is an open empirical question that the comparison settles. If it wins, the natural follow-up is to feed it body-anchored encodings, and we will run that variant.

Why not just train on more spacings? Dense spacing sweeps are what the surrogate is supposed to replace. We will still measure the curve of held-out error against the number of training spacings for each model. The method is only worthwhile if it reaches a target error with clearly fewer simulations.

Proposed Experiments

The decisive experiment is a spacing split, the fluid analog of CoordConv's held-out quadrant. We train on a sparse set of tandem spacings, then test on interpolated spacings inside the training range and extrapolated spacings just beyond it. One held-out spacing is placed deliberately across the regime transition we locate in our data. We will count it a success if body-anchored channels cut held-out pressure and vorticity error relative to every baseline and ablation, while staying no worse at the trained spacings. That last condition guards against CoordConv's own ImageNet finding of a +0.04% change on translation-dominated tasks; a coordinate method should not hurt where it isn't needed.

The second check is dynamic. We compare moving channels against frozen ones on vibrating-cylinder rollouts, and score the predicted displacement amplitude and phase of the downstream cylinder. This isolates whether tracking moving centers matters, which is the specific gap the research file identifies.

The third check is scientific. On the swarm testbed, we hold out the $1.0L$ tandem and $1.5L$ rectangular runs, the reported efficiency peaks. We then ask whether a surrogate trained on the remaining spacings, with forces integrated into Froude efficiency, places each formation's optimum at the correct held-out spacing. We also check whether it ranks phalanx last, as the simulations do. Recovering an optimum the model never saw is the result that would make such surrogates usable for spacing design. Failing to recover it would be equally informative, because it would show that pointwise field accuracy does not translate into correct engineering decisions.