{
 "id": "unified-particle-physics",
 "title": "Unified particle physics",
 "aliases": [
  "FleX"
 ],
 "domain": "simulation",
 "subdomain": "particle/constraint solvers",
 "stage": "simulation",
 "realtime": "realtime",
 "platforms": [
  "cuda",
  "desktop-gpu"
 ],
 "year_introduced": 2014,
 "inputs": [
  "particles"
 ],
 "outputs": [
  "particles",
  "mesh"
 ],
 "style": "both",
 "dynamic": "dynamic",
 "summary": "Single GPU particle framework that simulates rigid bodies, cloth, soft bodies, fluids and gases together using PBD-style constraints and two-way coupling.",
 "how_it_works": "Every object is a set of particles. Rigid bodies and soft bodies use shape-matching clusters, cloth uses distance and bending constraints, fluids use position-based density constraints, and gases use a variant with an expansion term. All constraint types are solved in the same Jacobi-style loop on the GPU, with a shared uniform-grid neighbour search for collisions, so different phases (cloth versus fluid, rigid versus gas) interact through ordinary contact constraints with mass-ratio scaling. Averaging constraint corrections per particle and applying a relaxation factor keeps the Jacobi iteration stable. This design is the basis of the NVIDIA FleX library.",
 "when_to_use": "Choose it for scenes mixing liquids, cloth and solids with two-way coupling in one GPU solver. Prefer `xpbd` for a single-material solver with calibrated stiffness, `position-based-fluids` for fluids alone, and `sequential-impulses` for large rigid-body piles needing accurate stacking.",
 "cost": {
  "class": "medium",
  "notes": "GPU-bound by particle and contact count."
 },
 "failure_modes": [
  "Rigid bodies built of particles stack poorly and show surface bumpiness",
  "Jacobi iteration with large mass ratios converges slowly",
  "Fluids and gases have visibly artificial viscosity",
  "Particles must be sized uniformly for the neighbour grid, limiting detail"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1145/2601097.2601152",
   "type": "paper",
   "title": "Unified particle physics for real-time applications",
   "authors": [
    "Miles Macklin",
    "Matthias Müller",
    "Nuttapong Chentanez",
    "Tae-Yong Kim"
   ],
   "year": 2014,
   "venue": "ACM Transactions on Graphics",
   "url": "https://doi.org/10.1145/2601097.2601152",
   "ids": {
    "doi": "10.1145/2601097.2601152"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/2601097.2601152",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/2601097.2601152",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/2601097.2601152",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/2601097.2601152",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/2601097.2601152",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "macklin2014unified"
  },
  {
   "role": "implementation",
   "key": "gh:nvidiagameworks/flex",
   "type": "code",
   "title": "NVIDIAGameWorks/FleX",
   "description": "",
   "authors": [
    "NVIDIAGameWorks"
   ],
   "year": 2017,
   "venue": "GitHub",
   "url": "https://github.com/NVIDIAGameWorks/FleX",
   "ids": {
    "repo": "NVIDIAGameWorks/FleX"
   },
   "license": "NOASSERTION",
   "extra": {
    "stars": 818,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2021-04-15T01:36:31Z",
    "language": "C++",
    "homepage": null,
    "license_name": "Other"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/NVIDIAGameWorks/FleX",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/NVIDIAGameWorks/FleX",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/NVIDIAGameWorks/FleX",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/NVIDIAGameWorks/FleX",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/NVIDIAGameWorks/FleX",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/NVIDIAGameWorks/FleX",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "nvidiagameworks2017nvidiagameworksb"
  }
 ],
 "presets": [],
 "related": [
  "xpbd",
  "position-based-fluids",
  "shape-matching-deformation",
  "position-based-dynamics"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/simulation/unified-particle-physics.json"
 },
 "solves": [
  "want fluids, cloth and rigid bodies interacting in one solver",
  "two-way coupling between liquid and solids",
  "separate simulators don't interact properly",
  "mixed-material gpu simulation in real time"
 ],
 "authority": "Macklin et al., 2014",
 "url": "https://texelatlas.vercel.app/t/unified-particle-physics/",
 "execution_fidelity": "none",
 "fidelity_label": "No Live Specimen",
 "benchmark_eligible": false
}