1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Education app demonstrating 2nd law of thermodynamics

  1. Aug 2, 2015 #1

    bcrowell

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I recently posted about a browser-based educational app that graphs the position, velocity, and acceleration of the mouse's vertical motion. In the same spirit, I've written an app that demonstrates the statistical basis of the second law of thermodynamics by simulating the free expansion of a gas: http://www.lightandmatter.com/entropy
     
  2. jcsd
  3. Aug 2, 2015 #2

    Bystander

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Not unlike watching an aquarium --- almost hypnotic.
     
  4. Aug 3, 2015 #3

    Andy Resnick

    User Avatar
    Science Advisor
    Education Advisor
    2016 Award

    I understand this is an elementary presentation, but free expansion can be isentropic, isothermal, or somewhere in between:

    http://www.engineeringtoolbox.com/compression-expansion-gases-d_605.html

    It's not clear which you are trying to simulate.

    Another point- while not stated, I suspect your 'atoms' are all indistinguishable; thus you can't easily resolve Gibbs' paradox:

    http://bayes.wustl.edu/etj/articles/gibbs.paradox.pdf
     
  5. Aug 3, 2015 #4

    bcrowell

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Thanks for your comments, Andy. If you watch the simulation, I think it should be clear that it's simulating what are essentially perfectly elastic billiard balls, so the expansion is isothermal. Although I hadn't stated it explicitly in the documentation, I think you can tell that it's simulating an ideal gas, and the free expansion of an ideal gas is isothermal.

    Gibbs' paradox is interesting. However, I don't see its relevance here, since it deals with a different situation than the one I'm simulating.
     
  6. Aug 4, 2015 #5
    In the free adiabatic expansion of a gas, Q=W=0, so ΔU is zero. This also means that, if the gas is an ideal gas, ΔT is also zero. So, for an ideal gas, free expansion in a closed container is both adiabatic and isothermal. Of course, for a real gas, there will be a temperature change.

    I regard free adiabatic expansion of a gas in a closed container as the closed-system analog of the Joule-Thompson effect for adiabatic flow of a gas through a valve or porous plug. In the case of free expansion in a closed container, one is interested in the effect of the pressure (or volume) change on temperature at constant internal energy. In Joule-Thompson, one is interested in the effect of the pressure change on the temperature at constant enthalpy.

    Chet
     
  7. Aug 5, 2015 #6

    bcrowell

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I've done some more work on the simulation and worked out several different demonstrations that I intend to use in lecture. I thought others might be interested to see them.

    http://www.lightandmatter.com/entropy?wait

    The basic demo of free expansion and the second law. Click the Start button to see the demonstration run. (This is the reason for the "wait" option in this url and the others below; in a lecture, it gives time to say something to the class before everything starts moving.) On the graphs you can see the system reaching equilibrium and fluctuating away from equilibrium. By increasing the number of particles you can see that the fluctuations get smaller in relative terms. If you hit the "Reverse velocities" button you can see the system move back to its initial state, violating the second law.

    http://www.lightandmatter.com/entropy?flock,wait

    The particles are all initially concentrated in one region of space and moving in the same direction. Because this particular version of the system is not ergodic, thermal equilibrium is never reached. Although the flock spreads out spatially due to collisions, it remains confined to a small portion of the phase space in terms of momentum. This doesn't violate the second law, since the second law doesn't demand that the entropy increase at any nonzero rate.

    http://www.lightandmatter.com/entropy?gy=2,flock,wait

    Adding gravity in the y direction breaks part of the system's unrealistically perfect symmetry and causes the y momentum to equilibrate.

    http://www.lightandmatter.com/entropy?gx=3,gy=2,flock,wait

    Adding an x component to gravity makes all the degrees of freedom equilibrate.

    http://www.lightandmatter.com/entropy?island,flock,wait

    Another way of getting rid of the non-ergodic behavior is to add a circular island in the middle of the box. This is known as Sinai's billiards. The island acts as a diverging lens.

    http://www.lightandmatter.com/entropy?temps,n=300,wait

    The whole box is uniformly filled with particles, but with unequal temperatures on the two sides

    http://www.lightandmatter.com/entropy?temps,n=300,wait,mark

    By adding ",mark" to any of these URLs, you can cause one of the particles to be marked in red. This allows you to look at ideas like diffusion and the mean free path.

    Various other options are described in the documentation: https://github.com/bcrowell/entropy/blob/master/README.md
     
  8. Aug 12, 2015 #7

    jasonRF

    User Avatar
    Science Advisor
    Gold Member

    These are great simulations - certainly a lot of fun to watch and could be useful for students at many levels. I especially like the versions with the marked ball that let us see a random walk in action. The item on your to-do list would be fun to see; along the same lines, plots of mean velocity and temperature may be interesting for all the sims.

    jason
     
  9. Aug 17, 2015 #8

    Andy Resnick

    User Avatar
    Science Advisor
    Education Advisor
    2016 Award

    Like!

    Just back from vacation, so I haven't fully explored these yet. But I do like the 'reverse velocities'- it is known that indeed, viscous flow can be reversible under certain circumstances- dye can be 'unwound', for example:

     
  10. Aug 17, 2015 #9

    bcrowell

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Cool video, Andy! (I love how he obviously miscounts and asks his helpers to confirm his miscount, which they do -- and then at the end they tell him that he miscounted.)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Education app demonstrating 2nd law of thermodynamics
Loading...