chalkboard · fluid simulation

The pressure solver, cell by cell

Every interval, a fluid simulation solves for the one pressure field that leaves every cell exactly full once things move. This board runs a small solver implementation and stops wherever you like: one interval, one Newton step, one multigrid sweep, or one cell. yellow is what the step writes and blue, dashed is what it reads.

    Ready

      Cell

      Tap a cell to pin it. Tap it again to follow the solver.

      Jacobian row

      Newton max|R| after each iteration · this interval bold, earlier ones faint
      Linear solve ‖b − Jδ‖∞ / ‖b‖∞ for this Newton step · dashed: what each method would do on this same system

        Intervals

        Bars: Newton iterations per accepted interval. pink ticks: attempts thrown away and retried with half the time step.

        Solver lab

        Change what the solver does and watch what breaks. Takes effect from the next solve.