{"id":25945523,"url":"https://github.com/davidalgis/dfsph-2d","last_synced_at":"2026-06-07T11:32:15.173Z","repository":{"id":278351797,"uuid":"935334915","full_name":"davidAlgis/DFSPH-2D","owner":"davidAlgis","description":"A python implementation of a 2D DFSPH solver","archived":false,"fork":false,"pushed_at":"2025-05-02T14:12:44.000Z","size":24271,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-02T15:27:04.230Z","etag":null,"topics":["dfsph","fluids","fluidsim","smoothed-particle-hydrodynamics","sph"],"latest_commit_sha":null,"homepage":"","language":"Python","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/davidAlgis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-02-19T09:26:26.000Z","updated_at":"2025-05-02T14:12:47.000Z","dependencies_parsed_at":"2025-05-02T15:37:06.385Z","dependency_job_id":null,"html_url":"https://github.com/davidAlgis/DFSPH-2D","commit_stats":null,"previous_names":["davidalgis/dfsph-2d"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidAlgis/DFSPH-2D","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidAlgis%2FDFSPH-2D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidAlgis%2FDFSPH-2D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidAlgis%2FDFSPH-2D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidAlgis%2FDFSPH-2D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidAlgis","download_url":"https://codeload.github.com/davidAlgis/DFSPH-2D/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidAlgis%2FDFSPH-2D/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27451389,"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","status":"online","status_checked_at":"2025-12-02T02:00:06.387Z","response_time":54,"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":["dfsph","fluids","fluidsim","smoothed-particle-hydrodynamics","sph"],"created_at":"2025-03-04T09:17:54.319Z","updated_at":"2025-12-02T11:04:14.890Z","avatar_url":"https://github.com/davidAlgis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DFSPH-2D\n\nA Python implementation of a 2D divergence-free SPH (DFSPH) solver. This solver is based on the method described by Koschier and Bender (2017) for fast incompressible flow simulation.\n\n![](captures/dfsph_test.gif)\n\n\u003e [!WARNING]  \n\u003e The gif above feels like it's a real time computation. Unfortunately it's an acceleration of the capture of a simulation, which takes likes 2 minutes to be computed.\n\n## Installation\n\nEnsure you have Python 3.8+ installed. Then, install the package in editable mode using the provided `pyproject.toml`:\n\n```bash\npip install -e .\n```\n\n## Usage\n\nRun the simulation via the main entry point:\n\n```bash\npython main.py [options]\n```\n\nYou can customize parameters using the following options:\n\n- **-r, --support_radius**  \n  SPH support radius (default: 0.2742/2).\n\n- **-dt, --timestep**  \n  Time step for the simulation (default: 0.01).\n\n- **-s, --steps**  \n  Number of simulation steps (default: 1000). *(Used in headless mode.)*\n\n### Box \u0026 Grid Parameters\n\n- **--box_origin**  \n  Origin of the box for particle initialization (default: [-0.8, -0.8]).\n\n- **--box_size**  \n  Size of the box for particle initialization (default: [1.4, 1.4]).\n\n- **--grid_size**  \n  Grid dimensions as (width, height) (default: [2, 2]).\n\n- **--grid_origin**  \n  Position of the grid in simulation space (default: [-1, -1]).\n\n### Physical Parameters\n\n- **--rest_density**  \n  Rest density of the fluid (default: 1027.0).\n\n### Visualization\n\n- **-v, --visualize**  \n  Enable real-time visualization (default: enabled).\n\n### Export/Import\n\n- **-e, --export_results**  \n  File name to export particle data (default: empty).\n\n- **-i, --import_results**  \n  File name to import particle data for visualization (default: empty).\n\n- **-ii, --import_init**  \n  File name to import initial particle configuration (default: empty).\n\n## Reference\n\nKoschier, M., \u0026 Bender, J. (2017). *DFSPH: Fast Divergence-Free SPH for Incompressible Flows*. [Link to paper](https://doi.org/10.1109/TOG.2017.2709662)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidalgis%2Fdfsph-2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidalgis%2Fdfsph-2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidalgis%2Fdfsph-2d/lists"}