_______               __                   _______
       |   |   |.---.-..----.|  |--..-----..----. |    |  |.-----..--.--.--..-----.
       |       ||  _  ||  __||    < |  -__||   _| |       ||  -__||  |  |  ||__ --|
       |___|___||___._||____||__|__||_____||__|   |__|____||_____||________||_____|
                                                             on Gopher (inofficial)
   URI Visit Hacker News on the Web
       
       
       COMMENT PAGE FOR:
   URI   Show HN: Interactive real-time chemistry and fluids: water electrolysis
   DIR   text version
       
       
        mrguyorama wrote 3 days ago:
        Why can this only use 13% of my ryzen 3600 processor? I thought the
        whole point of WASM was that it enabled high performance browser based
        stuff?
        
        Is this application really hard to parallelize?
       
          pkarnakov wrote 3 days ago:
          The application itself is easy to parallelize. And the production
          version does run in parallel ( [1] ) 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.
          
   URI    [1]: https://github.com/cselab/aphros
       
        argvargc wrote 3 days ago:
        Every setting on maximum and it becomes a kind of slow-moving horror
        movie.
        
        Every setting on minimum,  except mesh set to 128 - and it's a kind of
        poor-mans MS Paint. After preparing a nice image, set gravity to max
        and watch the splendor.
       
        dbsmith83 wrote 3 days ago:
        This reminds me a lot of a lava lamp
       
        HPsquared wrote 3 days ago:
        This is fantastic. It even shows something analogous to the change
        between nucleate boiling and film boiling.
        
        EDIT: Could this be adapted to a heat transfer simulation of boiling?
       
          pkarnakov wrote 3 days ago:
          Yes, I don't see why not. The model would not need electric current,
          and the concentration of dissolved gas would be replaced with
          temperature.
       
        s-macke wrote 3 days ago:
        Two-phase fluid flow with surface tension in the web. Fantastic! I
        tried it myself, but my simulations most of the time exploded .... I
        mean diverged.
        
        Keep up the good work! Presenting the research is a must and thanks to
        cross compilers and WebAssembly it was never so easy to even
        demonstrate your simulation code.
       
          pkarnakov wrote 3 days ago:
          Thank you!
       
        pkarnakov wrote 3 days ago:
        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.
       
          mushishi wrote 3 days ago:
          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.
       
            pkarnakov wrote 3 days ago:
            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.
       
              mushishi wrote 3 days ago:
              Thank you! I try to understand further:
              
              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.
              
              No need to answer if don't feel like it!
       
       
   DIR <- back to front page