Resonant spectral cascade in pulsatile flow triggered by arterial geometry
Overview
This Google Colab notebook contains the complete Python source code to reproduce the numerical simulations, data analysis, and figures presented in the manuscript, "Geometry Drives Spectral Cascades in Arterial Flow." It implements a split-step Fourier pseudospectral solver for a variable-coefficient fractional Korteweg-de Vries (fKdV) equation.
The notebook is structured to allow users to:
- Run a detailed, single-case simulation (
Wo=10) to explore time-dependent diagnostics and spatiotemporal plots (corresponding to Figures 2-6 in the manuscript). - Perform a comprehensive parameter sweep across a range of Womersley numbers (
Wo) to study the parametric dependence of the system's dynamics and reproduce the summary plots (Figures 7-9).
All required libraries (NumPy, SciPy, Matplotlib, pandas) are standard and pre-installed in the Google Colab environment, making it straightforward to run the code directly.
How to Use This Notebook
You can execute the entire notebook sequentially by selecting Runtime > Run all.
1. Detailed Single Simulation
- The cells up to Section 4 perform the long-duration simulation for a single
Wo=10case. - Executing these cells will reproduce the time-evolution plots showing wave energy (
Iโ), growth rate (G), spectral ratio (R), modal energy, waveform snapshots, and spatiotemporal evolution.
2. Full Parameter Sweep
- The cells from Section 5 onwards execute the full parameter sweep across
Wo = [2, 5, 10, 15, 20]. - This section is computationally intensive and may take a significant amount of time to complete.
- Executing these cells will reproduce the final summary plots showing instability metrics versus Womersley number.
Running on Hugging Face Spaces
This notebook can be easily run on Hugging Face Spaces. Simply upload the .ipynb file to your Space. The environment should have the necessary libraries pre-installed.
Note: The full parameter sweep is computationally intensive. For interactive demos on Hugging Face Spaces, consider:
- Using the detailed single simulation section (up to Section 4) as the primary interactive part.
- Providing pre-computed results for the parameter sweep, or allowing users to select a smaller subset of
Wovalues for faster execution.
Citation
If you use this code in your research, please cite the original manuscript:
K. M. Saqr, "Geometry Drives Spectral Cascades in Arterial Flow," https://doi.org/10.57967/hf/6983 (2025).
Contact
For any questions regarding the code or the manuscript, please contact: Dr. Khalid M. Saqr (k.saqr@aast.edu)