Modeling Twist Wave Propagation and Bursting in Vortex Dynamics Using Fourier Neural Operators (FNOs)
This repository contains implementations of Fourier Neural Operators (FNOs) and a numerical solver to model the evolution of vorticity in a straight vortex tube. The goal is to compare the accuracy and efficiency of FNOs against traditional numerical methods and determine whether neural operators can predict vortex evolution faster while maintaining accuracy.
The FNO model is trained to predict the evolution of the vorticity field and energy dynamics in the axisymmetric r-z plane.
- Numerical Solver: Uses a remeshed vortex method to solve the Navier–Stokes equations
- Fourier Neural Operator (FNO): Learns a mesh-invariant mapping from vorticity fields to future states
- Speedup Comparison: The FNO is up to 267× faster than traditional solvers
- Energy Evolution Modeling: Predicts the evolution of energy over time
- GIF Visualization: Compare numerical vs. FNO-predicted vorticity evolution
|
|-- generate_fno_predictions.py # Generate predictions using FNO model
|-- main.py # Numerical solver
|-- train_fno.py # Train the Fourier Neural Operator
|-- analyze_results.py # Compare numerical and FNO performance
|-- requirements.txt # Python dependencies
|-- README.md # This documentation
Ensure you have Python 3.x installed. Install dependencies using:
pip install -r requirements.txt
Run the numerical solver:
python main.py
Train the Fourier Neural Operator:
python train_fno.py
Generate FNO predictions:
python generate_fno_predictions.py
Analyze model performance:
python analyze_results.py
The dataset is generated using a remeshed vortex method to solve the incompressible Navier–Stokes equations in vorticity–velocity formulation:
where:
-
$\boldsymbol{\omega} = \nabla \times \mathbf{u}$ is the vorticity field -
$\mathbf{u}$ is the velocity field obtained by solving:$\nabla^2 \mathbf{u} = -\nabla \times \boldsymbol{\omega}$ -
$\nu$ is the kinematic viscosity
The initial vorticity field for a straight vortex tube with an axially varying core size is given by:
where
- Different perturbation profiles include sinusoidal, cosine, Gaussian, and none
- The remeshed vortex method evolves the vorticity field over time using fourth-order Runge–Kutta (RK4) integration
- Snapshots of the vorticity field are saved at fixed time intervals (every 0.5s)
The Fourier Neural Operator (FNO) is an advanced neural network designed to learn mappings between infinite-dimensional function spaces. Unlike CNNs, which perform local convolutions, the FNO learns global dependencies using the Fourier transform.
Given an input function
The FNO model consists of the following components:
-
Lifting Layer
Maps the input function to a high-dimensional latent space:$v_0(r,z) = P(u(r,z,t))$ where$P$ is a pointwise fully connected layer. -
Fourier Layers
The core of the model consists of$T$ Fourier layers, each applying:$v_{t+1}(r,z) = \sigma \left( W v_t(r,z) + \mathcal{F}^{-1} \left( R \cdot \mathcal{F} ( v_t(r,z) ) \right) \right)$ -
$\mathcal{F}$ and$\mathcal{F}^{-1}$ are the Fourier and inverse Fourier transforms -
$R$ is a learnable weight tensor applied to the lowest$n_{\text{modes}}$ Fourier coefficients -
$W$ is a pointwise linear transformation
-
-
Projection Layer
Projects the output of the last Fourier layer back to the physical space:$\hat{u}(r,z,t+\Delta t) = Q(v_T(r,z))$ where$Q$ is a fully connected layer.
The full learned operator is: $\mathcal{G}\theta ( u(r,z,t) ) = Q \circ \left[ \sigma \left( W v_t(r,z) + \mathcal{F}^{-1} \left( R \cdot \mathcal{F} ( v_t(r,z) ) \right) \right) \right]{t=0}^{T-1} \circ P(u(r,z,t))$
- Resolution Invariance: Can predict at different grid resolutions
- Global Convolution: Captures long-range dependencies in the vorticity field
- Computational Speed: Faster than solving PDEs numerically
Below is a GIF showing the vorticity evolution over time, comparing numerical and FNO predictions.

To evaluate accuracy, we use:
-
Mean Squared Error (MSE):
$\text{MSE} = \frac{1}{N} \sum_{i=1}^{N} \left( u_{\text{true}} - u_{\text{FNO}} \right)^2$ -
Structural Similarity Index (SSIM):
Measures perceptual similarity between the numerical and FNO outputs.
- Numerical Solver: 216.69s per simulation
- FNO Inference: 0.81s per simulation (267× faster!)
- The FNO model successfully predicts vortex evolution with high accuracy
- It achieves a 267× speedup over the numerical solver
- The trained model can generalize to unseen initial conditions
Future Work: Extend to higher Reynolds numbers, include more complex vortex interactions, and explore hybrid ML-PDE solvers.