{"id":13544595,"url":"https://github.com/takah29/2d-fluid-simulator","last_synced_at":"2025-04-02T14:31:34.279Z","repository":{"id":37774953,"uuid":"479447441","full_name":"takah29/2d-fluid-simulator","owner":"takah29","description":"2D incompressible fluid solver implemented in Taichi.","archived":false,"fork":false,"pushed_at":"2024-05-10T19:44:18.000Z","size":39345,"stargazers_count":100,"open_issues_count":0,"forks_count":17,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-11-03T11:34:07.430Z","etag":null,"topics":["cfd","cfd-solvers","cip","fdm","finite-difference-method","fluid-dynamics","fluid-simulation","fluid-solver","navier-stokes","taichi","vorticity-confinement"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/takah29.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-04-08T15:39:23.000Z","updated_at":"2024-10-17T05:21:35.000Z","dependencies_parsed_at":"2023-12-15T20:11:04.357Z","dependency_job_id":"cfebba4f-d71e-467e-8f5a-0baf70c9269f","html_url":"https://github.com/takah29/2d-fluid-simulator","commit_stats":{"total_commits":146,"total_committers":3,"mean_commits":"48.666666666666664","dds":"0.013698630136986356","last_synced_commit":"2c28e0739cd6a2b88bd3f501ce388b3da9ec7aa4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takah29%2F2d-fluid-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takah29%2F2d-fluid-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takah29%2F2d-fluid-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takah29%2F2d-fluid-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takah29","download_url":"https://codeload.github.com/takah29/2d-fluid-simulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246832368,"owners_count":20841154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","cfd-solvers","cip","fdm","finite-difference-method","fluid-dynamics","fluid-simulation","fluid-solver","navier-stokes","taichi","vorticity-confinement"],"created_at":"2024-08-01T11:00:51.292Z","updated_at":"2025-04-02T14:31:29.255Z","avatar_url":"https://github.com/takah29.png","language":"Python","funding_links":[],"categories":["**Simulation**","Applications"],"sub_categories":["**Simulation**"],"readme":"# 2D Fluid Simulator\n\n![baundary_condition_2_dye](./images/bc2_res1600_cip_dye.jpg)\n![baundary_condition_2_norm](./images/bc2_res1600_cip_norm.jpg)\n\n## Features\n\n- Finite Difference Method (MAC Method)\n- Advection Scheme\n  - Upwind Differencing\n  - Kawamura-Kuwahara\n  - CIP (Constrained Interpolation Profile)\n- Flow Visualization\n  - Norm (Velocity) and Pressure\n  - Pressure\n  - Vorticity\n  - Dye\n- Vorticity Confinement\n\n## Requirements\n\n- Python 3.11\n- Taichi 1.7\n\nGeForce GTX 1080 or higher recommended.\n\n## Usage\n\n- Boundary Condition 1, ReynoldsNumber = 1000, dt = 0.0005, VorticityConfinement is Disable\n  ```bash\n  python main.py -re 1000 -dt 0.0005 -vc 0.0\n  ```\n  Press `V` key switches the flow visualization method.\n  `dt` is automatically determined even if not specified, but should be small for divergence.\n- Boundary Condition 2, resolution = 800\n  ```bash\n  python main.py -bc 2 -res 800\n  ```\n  Boundary conditions can be specified from 1 to 6\n- Boundary Condition 3, ReynoldsNumber = 10^8, resolution = 800, VorticityConfinement = 10\n  ```bash\n  python main.py -bc 3 -re 100000000 -res 800 -vc 10\n  ```\n- Help\n  ```bash\n  python main.py -h\n  ```\n- for CPU\n  ```bash\n  python main.py -dt 0.0005 -cpu\n  ```\n\n## Screenshots\n\n### Flow Visualization\n\n- Norm and Pressure\n  ![norm_and_pressure](./images/bc5_res800_cip_norm.jpg)\n- Pressure\n  ![pressure](./images/bc5_res800_cip_pressure.jpg)\n- Vorticity\n  ![vorticity](./images/bc5_res800_cip_vorticity.jpg)\n- Dye\n  ![dye](./images/bc5_res800_cip_dye.jpg)\n\n### Vorticity Confinement\n\n- Disable\n  ![no_vorticity_confinement](./images/bc3_res800_cip_dye_novc.jpg)\n- Enable\n  ![vorticity_confinement](./images/bc3_res800_cip_dye_vc.jpg)\n\n## References\n\n- [移流法](https://pbcglab.jp/cgi-bin/wiki/index.php?%E7%A7%BB%E6%B5%81%E6%B3%95)\n- [2 次元 CIP 法による移流項の計算](https://i-ric.org/yasu/nbook2/04_Chapt04.html#cip)\n- [GPU Gems Chapter 38. Fast Fluid Dynamics Simulation on the GPU\n  ](https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-triangles/chapter-38-fast-fluid-dynamics-simulation-gpu)\n- [Ronald Fedkiw, Jos Stam, Henrik Wann Jensen. Visual Simulation of Smoke.](https://web.stanford.edu/class/cs237d/smoke.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakah29%2F2d-fluid-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakah29%2F2d-fluid-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakah29%2F2d-fluid-simulator/lists"}