{"id":39584324,"url":"https://github.com/pablo-mayrgundter/euler-fluid-two","last_synced_at":"2026-01-18T07:34:48.856Z","repository":{"id":320746375,"uuid":"1083174246","full_name":"pablo-mayrgundter/euler-fluid-two","owner":"pablo-mayrgundter","description":"Euler Fluid Flow Simulation - 2D, for web","archived":false,"fork":false,"pushed_at":"2025-10-25T15:50:22.000Z","size":96,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-01T04:47:52.072Z","etag":null,"topics":["bolt","chatgpt","euler-fluid","navier-stokes","physics","typescript"],"latest_commit_sha":null,"homepage":"https://pablo-mayrgundter.github.io/euler-fluid-two/","language":"TypeScript","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/pablo-mayrgundter.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-25T13:47:52.000Z","updated_at":"2025-10-25T15:50:26.000Z","dependencies_parsed_at":"2025-10-25T17:28:21.508Z","dependency_job_id":null,"html_url":"https://github.com/pablo-mayrgundter/euler-fluid-two","commit_stats":null,"previous_names":["pablo-mayrgundter/euler-fluid-two"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pablo-mayrgundter/euler-fluid-two","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo-mayrgundter%2Feuler-fluid-two","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo-mayrgundter%2Feuler-fluid-two/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo-mayrgundter%2Feuler-fluid-two/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo-mayrgundter%2Feuler-fluid-two/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pablo-mayrgundter","download_url":"https://codeload.github.com/pablo-mayrgundter/euler-fluid-two/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo-mayrgundter%2Feuler-fluid-two/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28533169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["bolt","chatgpt","euler-fluid","navier-stokes","physics","typescript"],"created_at":"2026-01-18T07:34:48.731Z","updated_at":"2026-01-18T07:34:48.827Z","avatar_url":"https://github.com/pablo-mayrgundter.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌀 Euler Fluid Two\n\n### 2-D Interactive Euler Fluid Flow Simulation  \n**Author:** Pablo, ChatG 5 + Bolt 2\n**Origin:** Design + discussion migrated from Bolt prototype (Oct 2025)\n\n---\n\n## 🎯 Goal\n\nCreate a real-time, browser-based 2-D Euler fluid simulator that lets users **experiment with flow, forces, and turbulence formation**, and ultimately explore granular approximations and potential singular behaviors relevant to the **Navier–Stokes Millennium Problem**.\n\nThe project doubles as both:\n- an **intuitive visualization playground** for fluid dynamics, and  \n- a **computational testbed** for voxel-automata / fractal-forcing experiments.\n\n---\n\n## 🧩 Overview\n\n### Simulation model\n- Incompressible **Euler** equations (set viscosity ν → 0).  \n- Implemented on a **MAC grid** (staggered velocity, centered pressure).  \n- Time integration via semi-Lagrangian advection + projection loop (to be added).  \n- Stub version uses procedural advection for visual flow until solver is complete.\n\n### Visualization\n- 128×128 grid by default  \n- Switchable display modes: `Pressure`, `Velocity`, `Divergence`, `Vorticity`, `Speed`, `Gradient Magnitude`  \n- Colorization:  \n  - White = 0  \n  - Blue = −  \n  - Red = +  \n  - Symmetric logarithmic mapping for smooth scaling  \n- Optional overlays: streamlines, isobars, grid lines  \n- Vector field arrows colored by orientation (blue → red for left→right)\n\n---\n\n## 🧮 Core Simulation Parameters\n\n| Control | Description |\n|----------|--------------|\n| **Reynolds Number** | Sets viscosity ν = U_ref × L_ref / Re |\n| **Inflow Velocity** | Applied at left boundary; controls base flow speed |\n| **Inflow Profile** | `Uniform`, `Parabolic`, `Sinusoidal`, `Noisy` |\n| **Auto-CFL** | Adjust timestep dynamically based on max |u| |\n| **Force Cursor** | Interactive Gaussian body-force perturbation on left edge |\n| \u0026nbsp;\u0026nbsp;• Magnitude (`fPer`) | Peak force strength |\n| \u0026nbsp;\u0026nbsp;• Radius (`fRad`) | Force influence radius in grid cells |\n| \u0026nbsp;\u0026nbsp;• Sigma | Gaussian variance controlling smoothness |\n| \u0026nbsp;\u0026nbsp;• Direction | `Rightward`, `Upward`, `Swirl` |\n| **Boundary Conditions** | Left: inflow, Right: outflow (zero gradient), Top/Bottom: free-slip or no-slip |\n| **Demo Modes** | `Calm Inflow`, `Wavy Inlet`, `Noisy Inlet`, `Swirl Kick` |\n\n**Cursor Controls**\n- Move vertically along the left edge to place the perturbation.  \n- Press **spacebar** to lock/unlock a persistent force blob.  \n\n---\n\n## 🧰 Diagnostics\n\n| Quantity | Description |\n|-----------|--------------|\n| `dt` | Current timestep |\n| `CFL` | Courant number (maxSpeed × dt / dx) |\n| `Kinetic Energy` | ½⟨u² + v²⟩ |\n| `Enstrophy` | ½⟨ω²⟩ |\n| `Max Divergence` | Numerical divergence magnitude |\n| `Max Vorticity` | Maximum curl |\n| `FPS` | Frame rate |\n\nDisplayed live in the diagnostics panel.\n\n---\n\n## 🧠 Architecture Plan (for Codex workspace)\n\nSource layout:\n```\nsrc/\napp/\nApp.tsx\nui/Controls.tsx\nui/Diagnostics.tsx\nsim/\nconstants.ts\ntypes.ts\nstate.ts\nboundaries.ts\nforces.ts\nadvect_stub.ts\ndiagnostics.ts\nrender/\ncolormap.ts\nscalarCanvas.ts\nquiverCanvas.ts\nupdate.ts\nstyles.css\n```\n\n\n### Key responsibilities\n\n- **`forces.ts`** — builds Gaussian perturbation field; applies to faces  \n- **`advect_stub.ts`** — fake semi-Lagrangian or curl-noise transport for visuals  \n- **`diagnostics.ts`** — compute divergence, vorticity, speed, grad-mag + summary stats  \n- **`render/*`** — canvas color mapping + quiver overlay  \n- **`update.ts`** — orchestrates per-frame simulation step  \n- **`Controls.tsx`** — all UI sliders/dropdowns/toggles  \n- **`Diagnostics.tsx`** — read-only output display  \n\n---\n\n## 🔬 Numerical Core (planned)\n\nPer-frame loop for the full solver:\n\n1. Apply inflow boundary conditions  \n2. Add body forces (`applyForces`)  \n3. Advect velocity (`advectVelocity`)  \n4. Optionally diffuse (`viscousBlur`)  \n5. Project:  \n   - Solve Poisson ∇²p = (1/dt) ∇·u  \n   - Subtract pressure gradient → u′  \n6. Enforce boundaries again  \n7. Compute diagnostics + visualize\n\n---\n\n## 🧩 Rendering Details\n\n- **Scalar colorizer:**\n```\nx = sign(s) * log(1 + α|s|) / log(1 + α m)\n```\n\nwith `α ≈ 4`, `m = max(|s_min|, |s_max|)`.  \n- **Quiver:** subsample grid by user-selected density; length ∝ ‖u‖; hue by uₓ sign.\n\n---\n\n## 🧠 Experimental Goals\n\n- Observe laminar → turbulent transitions as Re ↑.  \n- Measure divergence, vorticity, and ∥∇u∥ growth under refinement.  \n- Integrate voxel-automata forcing (later phase) to explore scaling of dissipation vs. singularity.  \n- Build intuition for energy cascade, fractal forcing, and “finite-time blow-up” analogues.\n\n---\n\n## 🔗 Origins\n\nThis spec evolved from Bolt prototypes at:\n- [Live App (Bolt Host)](https://euler-fluid-two.bolt.host)  \n- [GitHub Repo](https://github.com/pablo-mayrgundter/euler-fluid-two)\n\n---\n\n## 🧱 Next Steps\n\n### Issues\nSee our [issues](https://github.com/pablo-mayrgundter/euler-fluid-two/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) list.\n\n### Feature Requests\n\nSee our [enhancements](https://github.com/pablo-mayrgundter/euler-fluid-two/issues?q=is%3Aissue%20state%3Aopen%20label%3Aenhancement) list.\n\n---\n\n*“We’ll start with smooth waves, then stir the edge of chaos.”*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablo-mayrgundter%2Feuler-fluid-two","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpablo-mayrgundter%2Feuler-fluid-two","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablo-mayrgundter%2Feuler-fluid-two/lists"}