Playground

The original MILAMIN was a package you downloaded and edited in MATLAB. This is the browser equivalent: define a model below – geometry, viscosities, boundary conditions, in plain JavaScript – press Run, and the full MilAMin pipeline meshes, assembles, factorizes and renders it locally. Nothing to install; start from a preset and change things.

idle

Pressure p

Maximum shear stress τ

The model API

A model is a JavaScript function body that ends with return { mesh, mu, bc }:

Helpers in scope: rect(x0, y0, x1, y1), circle(cx, cy, r, n), ellipse(cx, cy, rx, ry, n, angleDeg). The code runs in a Web Worker in your browser; Ctrl+Enter runs the model, Stop terminates a runaway one. What you write is kept in your browser: edits to your own model save as you type, while a preset or a shared link you start editing is held apart from it until you press “Save as my model”. The solver is the same MILAMIN pipeline as the million page: 7-node Crouzeix–Raviart triangles from Shewchuk’s Triangle, CHOLMOD’s supernodal Cholesky, Powell–Hestenes pressure recovery.

Limits: linear viscous Stokes only (no gravity body force, no time stepping yet), Dirichlet or free-slip conditions, and one solve per Run – the Folder app shows what a time-stepping loop on the same stack looks like.