phetsims / collision-lab

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

Infinite Energy?/Balls fly off at super high speeds #176

Closed DevonQui closed 3 years ago

DevonQui commented 4 years ago

Test device MacBook Pro

Operating System 10.15.1

Browser Safari

Problem description This is for https://github.com/phetsims/QA/issues/562 In the Explore 2D section of the simulation, I was able to produce a little bit over 500 million joules of kinetic energy within a minute or so after figuring out a system of decreasing and increasing the masses. This led to extremely high speeds which caused the program to slow down to the point of being unusable. In addition, it caused the balls to fly off the screen even with the reflecting border turned on.

Steps to reproduce

  1. Open up the simulation and click on the Explore 2D section of the simulation
  2. Increase ball count to 4 and turn on Kinetic Energy
  3. Put balls 1 and 2 to max size and balls 3 and 4 to minimum size
  4. Click play and allow the balls to interact until balls 3 and 4 reach a super high speed
  5. Immediately pause once the small balls (3 and 4) get to this point
  6. Then, switch the masses of the balls. Make 1/2 minimum size and 3/4 max size
  7. Repeat steps 4 through 6, switching the ball sizes of 1/2 and 3/4 each time
  8. After reaching even a few million joules, click play and observe

Visuals

Screen Shot 2020-10-15 at 11 40 19 AM Screen Shot 2020-10-15 at 11 37 07 AM

Link to video visual of the problem: https://drive.google.com/file/d/1pk3ASLI9uvSUU1ElR8ow4pMxIntUlugZ/view?usp=sharing //note at the end I'm unable to click the pause button so I had to close out of the simulation entirely

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Collision Lab‬ URL: https://phet-dev.colorado.edu/html/collision-lab/1.1.0-dev.10/phet/collision-lab_all_phet.html Version: 1.1.0-dev.10 2020-10-15 01:57:00 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Safari/605.1.15 Language: en-US Window: 1440x812 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.20) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 15 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 16) Max viewport: 8192x8192 OES_texture_float: true Dependencies JSON: {}

brooklynlash commented 4 years ago

Replicated on Windows 10 Chrome.

jonathanolson commented 3 years ago

Also part of https://github.com/phetsims/collision-lab/issues/178.

Advice on how to handle this would be appreciated (as far as sim behavior), as I was able to get things to go to a higher energy. It fairly quickly maxes out the allowed iterations in the model.

veillette commented 3 years ago

@DevonQui has found a good way to break the conservation of energy principle!!. In fairness though, it takes a fair amount of effort from the user (since the steps 4 for to 6 have to be repeated multiple times) to break the simulation. It also takes a deep (and devious!!) understanding of the simulation to be able to pump energy in the simulation in such a way.

For context, a similar approach can be used in Masses and Springs, Energy-Skate_Park as well as "Pendulum Lab to "pump" energy into the system by toggling the gravity slider from none to lots at appropriate times.

As an aside, two of these simulations have been published but you can pump them with a lot of energy. Personally, I would argue that most of our users do not have a sophisticated understanding of energy to be able to figure out how to pump energy into it and therefore it is not worth addressing.

jonathanolson commented 3 years ago

Design decision: do nothing, it's worked well in other sims in cases like this.