Click the green flag to start. This is a simulation of reverse osmosis. Look at the comments in the code for explanations and suggestions on how to modify this project. for more on reverse osmosis, look at https://science.howstuffworks.com/reverse-osmosis.htm and https://en.wikipedia.org/wiki/Reverse_osmosis
The dashed vertical line is a semipermeable membrane. The small purple molecules can get through. The big red ones can't. The purple molecules naturally move across the membrane in the direction that reduces the concentration of red molecules. This movement can be reversed by adding pressure.