{"id":49410432,"url":"https://github.com/Minard-Jules/Navier_Stokes_Spectral_Method","last_synced_at":"2026-06-01T01:00:47.467Z","repository":{"id":199189242,"uuid":"702188482","full_name":"Minard-Jules/Navier_Stokes_Spectral_Method","owner":"Minard-Jules","description":"Navier Stokes simulation with spectral method","archived":false,"fork":false,"pushed_at":"2025-06-17T15:41:49.000Z","size":99795,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T16:46:39.676Z","etag":null,"topics":["cfd","fftw","fpm","gtk-fortran","navier-stokes-equations"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Minard-Jules.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-08T18:43:59.000Z","updated_at":"2025-06-17T15:41:53.000Z","dependencies_parsed_at":"2025-06-07T15:32:58.536Z","dependency_job_id":null,"html_url":"https://github.com/Minard-Jules/Navier_Stokes_Spectral_Method","commit_stats":null,"previous_names":["minard-jules/navier_stokes_spectral_method"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Minard-Jules/Navier_Stokes_Spectral_Method","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Minard-Jules%2FNavier_Stokes_Spectral_Method","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Minard-Jules%2FNavier_Stokes_Spectral_Method/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Minard-Jules%2FNavier_Stokes_Spectral_Method/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Minard-Jules%2FNavier_Stokes_Spectral_Method/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Minard-Jules","download_url":"https://codeload.github.com/Minard-Jules/Navier_Stokes_Spectral_Method/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Minard-Jules%2FNavier_Stokes_Spectral_Method/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33755369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cfd","fftw","fpm","gtk-fortran","navier-stokes-equations"],"created_at":"2026-04-29T00:00:51.652Z","updated_at":"2026-06-01T01:00:47.452Z","avatar_url":"https://github.com/Minard-Jules.png","language":"Fortran","funding_links":[],"categories":["Academia and Research"],"sub_categories":["Physics"],"readme":"# Simulation of Navier-Stokes Equations by Pseudo-Spectral Method\r\n\r\n## Introduction\r\n\r\nThis project implements a numerical simulation of the 2D Navier-Stokes equations in the $\\omega-\\psi$ formulation using the pseudo-spectral method. This approach enables efficient resolution of fluid flows in the spectral domain (Fourier space).\r\n\r\n[Fr](docs/French/README.md) En\r\n\r\n### Main Features\r\n\r\n- 2D simulation of Navier-Stokes equations in the $\\omega-\\psi$ formulation\r\n- Use of the pseudo-spectral method (Fourier Transforms with FFTW)\r\n- GTK graphical interface for parameter control\r\n- Parallelization with OpenMP for better performance\r\n- Real-time visualization of results\r\n- Export of results to video via ffmpeg\r\n\r\n## Mathematical Formulation and Pseudo-Spectral Method\r\n\r\nA detailed demonstration of the $\\omega-\\psi$ formulation is available in [docs/English/demonstration_NS.md](docs/English/demonstration_NS.md). This formulation transforms the Navier-Stokes equations into a coupled system that is simpler to solve numerically.\r\n\r\nThe pseudo-spectral method combines the advantages of spectral methods and physical space methods:\r\n\r\n1. **Fourier Transforms**: Spatial derivatives are computed in spectral space, where they become simple multiplications.\r\n2. **Non-linear terms**: Computed in physical space to avoid costly convolutions.\r\n\r\nFor more details on the implementation, see [docs/English/Pseudo_Spectral_method.md](docs/English/Pseudo_Spectral_method.md).\r\n\r\n## Project Structure\r\n\r\n```\r\nnavier-stokes-spectral/\r\n├── app/                    # Main Fortran code\r\n├── src/                    # Fortran source code\r\n├── docs/                   # Documentation\r\n│   ├── French/             # Documentation in French\r\n│   └── English/            # Documentation in English\r\n├── data/                   # Folder for results\r\n└── fpm.toml                # Project configuration\r\n```\r\n\r\n## Types of Simulated Flows\r\n\r\nThe program allows simulation of three classic flow types in fluid mechanics:\r\n\r\n### 1. Co-rotating and Counter-rotating Vortex Simulation \r\n\r\nThis simulation shows the interaction of several vortices that can rotate in the same direction (co-rotating) or in opposite directions (counter-rotating). This phenomenon is particularly interesting in aerodynamics and meteorology.\r\n\r\n[More details](docs/English/vortex.md)\r\n\r\n### 2. Kelvin-Helmholtz Instability\r\n\r\nThis instability occurs at the interface between two fluids moving at different speeds. It manifests as the formation of characteristic vortices.\r\n\r\n[More details](docs/English/Kelvin_Helmholtz.md)\r\n\r\n### 3. Taylor-Green Vortex\r\n\r\nThis classic test case in fluid mechanics allows the study of the transition to turbulence.\r\n\r\n[More details](docs/English/Taylor_Green.md)\r\n\r\n## Prerequisites\r\n\r\nThe following dependencies are required:\r\n\r\n- [**Fortran Compiler**](https://fortran-lang.org/compilers/) (gfortran recommended)\r\n- [**GTK**](https://www.gtk.org/) (version 4.x)\r\n- [**fpm**](https://fpm.fortran-lang.org/) (version 0.9.0 or higher)\r\n- [**FFTW**](https://www.fftw.org/) (version 3.x)\r\n- [**ffmpeg**](https://ffmpeg.org/) (for video export)\r\n- [**OpenMP**](https://www.openmp.org/) (for parallelization)\r\n\r\n## Installation\r\n\r\n### Linux (Debian/Ubuntu)\r\n\r\n```bash\r\n# Install system dependencies\r\nsudo apt-get update\r\nsudo apt-get install gfortran libgtk-3-dev libfftw3-dev ffmpeg libomp-dev\r\n\r\n# Install fpm\r\ncurl -Lo fpm https://github.com/fortran-lang/fpm/releases/download/v0.11.0/fpm-0.11.0-linux-x86_64-gcc-12\r\nchmod +x fpm\r\nsudo mv fpm /usr/local/bin\r\n```\r\n\r\n### Windows (MSYS2)\r\n\r\n```bash\r\n# Install dependencies\r\npacman -Syu\r\npacman -S mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-gtk3 mingw-w64-x86_64-fftw mingw-w64-x86_64-ffmpeg\r\n\r\n# Install fpm\r\npacman -S git mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-fpm\r\n```\r\n\r\n### macOS (with Homebrew)\r\n\r\n```bash\r\n# Install dependencies\r\nbrew install gcc gtk+3 fftw ffmpeg libomp\r\n\r\n# Install fpm\r\nbrew tap fortran-lang/homebrew-fortran\r\nbrew install fpm\r\n```\r\n\r\n## Usage\r\n\r\n### Compilation and Execution\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/Minard-Jules/navier-stokes-spectral\r\ncd navier-stokes-spectral\r\n\r\n# Compile and run\r\nfpm run\r\n```\r\n\r\n### Simulation Configuration\r\n\r\n1. Open the graphical interface\r\n2. Set the parameters :\r\n   - Spatial resolution (Nx, Ny)\r\n   - Reynolds number\r\n   - Time step\r\n   - Simulation duration\r\n3. Select the type of flow\r\n4. Start the simulation\r\n\r\n## Visualization\r\n\r\n### Available Visualization Types\r\n\r\n- Velocity fields\r\n- Vorticity\r\n- Stream function\r\n\r\n### Colormap Options\r\n\r\n\u003cdiv style=\"display: flex; justify-content: space-around; margin: 20px 0;\"\u003e\r\n    \u003cdiv\u003e\r\n        \u003ch3 style=\"text-align: center;\"\u003eBlue Orange Colormap (divergent)\u003c/h3\u003e\r\n        \u003cvideo src=\"docs/video/2_vortex/vorticity_mag.mp4\" width=\"500\" height=\"500\" controls title=\"Visualization with Blue Orange (divergent) colormap\"\u003e\u003c/video\u003e\r\n    \u003c/div\u003e\r\n \u003c/div\u003e\r\n\r\n https://github.com/user-attachments/assets/a47447f4-31ed-460e-a302-e4a0b335e0c5\r\n\r\n\u003cdiv style=\"display: flex; justify-content: space-around; margin: 20px 0;\"\u003e\r\n    \u003cdiv\u003e\r\n        \u003ch3 style=\"text-align: center;\"\u003e'jet' Colormap\u003c/h3\u003e\r\n        \u003cvideo src=\"docs/video/2_vortex/vorticity_mag_jet.mp4\" width=\"500\" height=\"500\" controls title=\"Visualization with jet colormap\"\u003e\u003c/video\u003e\r\n    \u003c/div\u003e\r\n\u003c/div\u003e\r\n\r\nhttps://github.com/user-attachments/assets/4aed022a-e38d-4b91-830b-e7d64ec779b5\r\n\r\n### Exporting Results\r\n\r\nResults are automatically saved in the `data/` folder in the following formats :\r\n- Data files (.vtk)\r\n- Videos (.mp4)\r\n   \r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.\r\n\r\n## Credits\r\n\r\n* [**Minard Jules**](https://github.com/Minard-Jules): Creator and main maintainer of the project\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMinard-Jules%2FNavier_Stokes_Spectral_Method","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMinard-Jules%2FNavier_Stokes_Spectral_Method","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMinard-Jules%2FNavier_Stokes_Spectral_Method/lists"}