{"id":20449646,"url":"https://github.com/emmanuelmess/collisionbasedgassimulator","last_synced_at":"2026-01-27T08:34:07.380Z","repository":{"id":258512466,"uuid":"871397852","full_name":"EmmanuelMess/CollisionBasedGasSimulator","owner":"EmmanuelMess","description":"Leveraging GPU with OpenCL to run a particle simulator","archived":false,"fork":false,"pushed_at":"2024-10-25T02:59:13.000Z","size":59227,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T02:09:12.677Z","etag":null,"topics":["c","gpu","opencl"],"latest_commit_sha":null,"homepage":"","language":"C","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/EmmanuelMess.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":"2024-10-11T22:07:11.000Z","updated_at":"2024-10-25T02:59:17.000Z","dependencies_parsed_at":"2024-11-15T10:43:35.639Z","dependency_job_id":"8e3576ab-cd23-4c3c-ad2f-2da76aed32c7","html_url":"https://github.com/EmmanuelMess/CollisionBasedGasSimulator","commit_stats":null,"previous_names":["emmanuelmess/collisionbasedgassimulator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EmmanuelMess/CollisionBasedGasSimulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmanuelMess%2FCollisionBasedGasSimulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmanuelMess%2FCollisionBasedGasSimulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmanuelMess%2FCollisionBasedGasSimulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmanuelMess%2FCollisionBasedGasSimulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmmanuelMess","download_url":"https://codeload.github.com/EmmanuelMess/CollisionBasedGasSimulator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmmanuelMess%2FCollisionBasedGasSimulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28809632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c","gpu","opencl"],"created_at":"2024-11-15T10:43:25.227Z","updated_at":"2026-01-27T08:34:07.362Z","avatar_url":"https://github.com/EmmanuelMess.png","language":"C","funding_links":["https://www.patreon.com/emmanuelmess"],"categories":[],"sub_categories":[],"readme":"# First-collision timestep gas simulator with OpenCL\nThis simulator computes all possible intersections, then checks which of those possible intersections is soonest to\noccur, and does some checks, the simulator then runs for time for enough time for the collision to occur. Once the \nintersection occurs, the whole process runs again.\n\nThe idea is that GPUs allow this to go very fast, by computing a lot of data in parallel (all segments and\nintersections), this method of simulation is very precise as intersections are computed analytically, not \nin steps.\n\n## Architecture\n\nThe general arch is in [architecture.md](architecture.md).\n\n# Gallery\n\n\u003cimg src=\"result.gif\"/\u003e\n\n# Compilation and running\n\nFirst compile with:\n\n```bash\ncd code\n./generate_kernels.sh\ncmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -G Ninja -S ./ -B ./cmake-build-debug\ncmake --build ./cmake-build-debug --target CollisionBasedGasSimulator -j 3\n```\n\nThen run with:\n\n```bash\n./cmake-build-debug/CollisionBasedGasSimulator\n```\n\n# Some refrences and thanks\n\n* [Colliding balls](https://garethrees.org/2009/02/17/physics/): An explanation for the basic idea, but without much implementation info.\n* [raylib](https://www.raylib.com/): All the drawing, and window management is done with raylib.\n* [First-collision timestep gas simulator with CUDA](https://github.com/EmmanuelMess/FirstCollisionTimestepRarefiedGasSimulator): My old implementation of this same algorithm for CUDA\n----\n\u003ca class=\"imgpatreon\" href=\"https://www.patreon.com/emmanuelmess\" target=\"_blank\"\u003e\n\u003cimg alt=\"Become a patreon\" src=\"https://user-images.githubusercontent.com/10991116/56376378-07065400-61de-11e9-9583-8ff2148aa41c.png\" width=150px\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmanuelmess%2Fcollisionbasedgassimulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femmanuelmess%2Fcollisionbasedgassimulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmanuelmess%2Fcollisionbasedgassimulator/lists"}