{"id":15402160,"url":"https://github.com/liby99/mpm-rs","last_synced_at":"2025-04-16T02:33:44.272Z","repository":{"id":74146977,"uuid":"225492560","full_name":"Liby99/mpm-rs","owner":"Liby99","description":"Material Point Method for Soft Body/Fluid Physics Simulation in Rust","archived":false,"fork":false,"pushed_at":"2020-01-31T18:48:49.000Z","size":934,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T04:12:39.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Liby99.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":"2019-12-03T00:05:41.000Z","updated_at":"2025-02-22T20:39:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"57a9f967-2337-4d34-b570-c644659e4953","html_url":"https://github.com/Liby99/mpm-rs","commit_stats":{"total_commits":131,"total_committers":3,"mean_commits":"43.666666666666664","dds":0.4580152671755725,"last_synced_commit":"8d4ae104586ced37e5016f63ac496fc25d3e1398"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liby99%2Fmpm-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liby99%2Fmpm-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liby99%2Fmpm-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liby99%2Fmpm-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Liby99","download_url":"https://codeload.github.com/Liby99/mpm-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249184670,"owners_count":21226432,"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":[],"created_at":"2024-10-01T16:01:19.135Z","updated_at":"2025-04-16T02:33:44.246Z","avatar_url":"https://github.com/Liby99.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Material Point Method in Rust\n\nMPM algorithm implemented in Rust, empowered by [specs](https://specs.amethyst.rs).\n\n## Use as a Library\n\n``` rust\nuse mpm_rs::*;\nuse mpm_ply_dump::*;\n\nfn main() {\n\n  // Create a world\n  let mut world = WorldBuilder::new(Vector3f::new(1.0, 1.0, 1.0), 0.02)\n    .with_system(PlyDumpSystem::new(\"result\", 3)) // Dump to \"result\"\n    .build(); // Build the world\n\n  // Create a boundary to the world with a thickness of 0.06\n  world.put_boundary(0.06);\n\n  // Create a ball in the world\n  let center = Vector3f::new(0.5, 0.4, 0.5);\n  let radius = 0.1;\n  let mass = 10.0;\n  let num_particles = 10000;\n  let youngs_modulus = 10000.0;\n  let nu = 0.2;\n  world\n    .put_ball(center, radius, mass, num_particles)\n    .with(ParticleDeformation::new(youngs_modulus, nu));\n\n  // Run 500 steps\n  for _ in 0..500 {\n    world.step(); // Step once\n  }\n}\n```\n\n## Compile and Run Examples\n\nTo compile and run examples, do\n\n```\n$ cargo build --release\n$ cargo run --release --example mickey_mouse\n```\n\nHere we prefer `release` because it's so much faster than `debug`. `mickey_mouse` example\nwill output `.ply` files into the directory `result/mickey_mouse`. You can visualize the\nresult file using Houdini. You can check out more examples [here](examples/examples/).\n\nAs of an example simulation in a window visualized by [kiss3d](http://kiss3d.org), you can\nrun\n\n```\n$ cargo run --release --example multi_balls_viewer\n```\n\n## Folder structure\n\nA pure MPM simulation framework is implemented in [`core/`](core/).\n\nA `.msh` loader (tetrahedron mesh loader) is implemented here in [`lib/msh-rs`](lib/msh-rs/).\n\nA `.ply` file exporter is implemented here in [`lib/ply-dump`](lib/ply-dump/).\n\nA viewer is implemented here in [`lib/viewer`](lib/viewer).\n\nOther examples are located here: [`examples/examples`](examples/examples).\n\n## Behind the Hood\n\n`mpm-rs` is empowered by [specs](https://specs.amethyst.rs), an Entity-Component-System\nframework which suits best for doing all kinds of simulations. We structured the code base\nsuch that all the Lagrangian particles are individual entities in ECS, and the Eularian\ngrid for doing integral and differentiation as a single resource `Grid`. Having not a single\nstructure particle but \"Arrays-of-particle-properties\" empowers us to have various kinds of\nbehaviors of different particles to perform flawlessly across the system. Some particles\nmight have deformation gradient, some might have evolving $J_p$. The Specs ECS can\nautomatically work on them simultaneously while providing lightning speed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliby99%2Fmpm-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliby99%2Fmpm-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliby99%2Fmpm-rs/lists"}