phetsims / pendulum-lab

"Pendulum Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 10 forks source link

Energy Conservation Violated #82

Closed phet-steele closed 8 years ago

phet-steele commented 9 years ago

At the smallest length, the total energy bar does not stay constant but instead fluctuates up and down.

  1. Go to the Energy screen.
  2. Slide the length down to 0.1m.
  3. Set the pendulum swinging (90 degrees works well).
  4. Enable the energy graph and zoom in until the total energy bar is shown at a reasonable scale.

Ruler is there for reference:

pendla2

This is in no way consistent for me. Sometimes thermal energy is made somehow (friction is never turned on) and the thermal energy fluctuates instead, and other times nothing wrong appears to be happening. Tested on Win 8.1 FF and Chrome.

Troubleshooting information: Name: Pendulum Lab URL: http://www.colorado.edu/physics/phet/dev/html/pendulum-lab/1.0.0-dev.4/pendulum-lab_en.html Version: 1.0.0-dev.4 2015-06-04 17:46:07 UTC Features missing: touch User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0 Language: en-US Window: 1366x633 Pixel Ratio: 1/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 Vendor: Mozilla (Mozilla) Vertex: attribs: 16 varying: 28 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {"comment":"# pendulum-lab 1.0.0-dev.4 Thu Jun 04 2015 11:46:00 GMT-0600 (MDT)","assert":{"sha":"903564a25a0f26acdbd334d3e104039864b405ef","branch":"master"},"axon":{"sha":"7de4a27be4b322b71c5f5046df193a03ccf0f161","branch":"master"},"babel":{"sha":"8725cd18114c1307057c465a0762a3cf8f1cb1b9","branch":"master"},"brand":{"sha":"b3362651f1d7eddb7f8697d02400472f97f9d140","branch":"master"},"chipper":{"sha":"c7d6ea5f9bef6e3882309af56ad409908dd28878","branch":"master"},"dot":{"sha":"a6a50c92c4cda5f8a3371d8c357ea565b7e7bd6c","branch":"master"},"joist":{"sha":"55fd6884039c5ef2f2145093c8530beab5490233","branch":"master"},"kite":{"sha":"b915f3b160744e4833d177dc38e74e4cbc912883","branch":"master"},"pendulum-lab":{"sha":"2b4cf70e4a8a88b37882b1643d44155a806508ab","branch":"master"},"phet-core":{"sha":"23834d107dc1cb368c00901c76927b712b9caa10","branch":"master"},"phetcommon":{"sha":"bb92c52cd90fdaa0c2a746fea82594afd439b4db","branch":"master"},"scenery":{"sha":"f09eddb7393946fcbedb63ebf6b88d1785c91bfc","branch":"master"},"scenery-phet":{"sha":"7ffc5a1a36e0afe36d035d0367078b3558fd157f","branch":"master"},"sherpa":{"sha":"ae2168a85ceb4094c23cd47ba5fe8145375448eb","branch":"master"},"sun":{"sha":"c9087fbb0cdd83f79452330fec3b83f809e2c0d8","branch":"master"}}

phet-steele commented 9 years ago

Found a pretty extreme case after getting the masses to swing in rapid circles:

pendla5

phet-steele commented 9 years ago

The flash version is slightly different. There is a fluctuation, but it is only by a couple pixels and not nearly as exacerbated as the HTML5 version. I would assume this is because there is no zoom in function for the energy graph in flash, and if there was it might look like the above videos.

phet-steele commented 9 years ago

Also, the minimum length allowable in flash is only 0.5m which helps prevent some extreme cases at small lengths.

ariel-phet commented 9 years ago

Hopefully will be fixed with a new minimum length

jonathanolson commented 8 years ago

Model rewrite has fixed this. Energy conservation is generally accurate for the first 11 significant digits. Old model used single Euler step, new model uses 10 4-th order Runge Kutta steps.