Project author here. The gallery is part of scientific software Aphros https://github.com/cselab/aphros for flow simulations. Examples in the gallery demonstrate what physical problems can be solved. The same configuration can be used on larger computers (including supercomputers). Intended for potential users of the software and those willing to learn some fluid mechanics.
This simulation is called a "Foaming waterfall". The waterfall captures air bubbles that rise to the surface and create foam. Similar effects are observed in oceans covered with foam generated by breaking waves.
Our paper [3] describes the algorithm and contains more applications of this software stack.
An online widget [4] shows the algorithm in two dimensions.
The application itself is easy to parallelize. And the production version does run in parallel (https://github.com/cselab/aphros) but relies on OpenMP and MPI. My first attempt to get C++11 threads running through WASM was not successful. Apparently, this feature is also disabled by default in some browsers because of the Spectre vulnerability.
May remind somebody of their school chemistry class. But this one includes more things: fluid flow, electric current, diffusion, and nucleation of bubbles. Reduced from a scientific code to run directly in your web browser.
I am too uninformed to understand what is happening.
But I like in principle this kinds of thing -- and that must have been some work to get working, so kudos!
Could you provide a short introduction what that does?
Wikipedia says that "Electrolysis of water is the process of using electricity to decompose water into oxygen and hydrogen gas" but what I see there seems to be the reverse: merging hydrogen and oxygen gas.
Sorry, I was too afraid of chemistry back in school and now I'm paying for it.
Initially, the container is filled with water (shown with white) and a layer of gas above (green). The reaction generates dissolved gases (red) on the electrodes. As soon as the concentration of dissolved gas reaches a critical value, it is converted into bubbles (green) that rise and merge with the existing layer of gas.
So there is two columns not connected to each other, so doesn't seem it is a circuit. But wait a minute, water conducts... So:
The left one is negatively charged, and it gives electrons to H20 which receives them and reacts by being converted to H2 gas and 2hydroxide.
The right column is positively charged and the 2hydroxide travels (diffuses?) through water as it is negatively charged, and statistically is more likely to go right because positive column attracts it? (I mean the electrical energy travels as waves but the actual molecules also, just slower?)
When 2hydroxide reaches the right end, it breaks into 1) electrons that the column receives happily 2) H20 3) O2 gas.
Something like that, perhaps. Interesting but frustrating to not get it fully.
We will probably add a geometry editor later.