phetsims / forces-and-motion-basics

"Forces and Motion: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/forces-and-motion-basics
GNU General Public License v3.0
7 stars 10 forks source link

Precision of friction force causes bad physics #197

Closed phet-steele closed 7 years ago

phet-steele commented 8 years ago

@samreid @ariel-phet Revealed through PhET-iO, and similar to phetsims/energy-skate-park-basics/issues/355, there is a precision issue outlined by the screenshots below.

This setup appears to show friction equaling applied force:

screen shot 2016-09-08 at 11 47 24 am

But in reality the absolute value of friction force is greater than the applied force (applied force is exactly 50N):

screen shot 2016-09-08 at 11 47 28 am

With this setup, and the speedometer shown, the moving object DOES slow down. Certainly a problem if the net force on the object appears to be 0.

samreid commented 8 years ago

@ariel-phet suggests rounding the applied force and friction force to the nearest 1, so the display values will match the model values.

Speed will still be shown as a decimal.

@ariel-phet says priority should be relatively high.

@jessegreenberg says he could work on it.

Thanks @jessegreenberg, let me know if you need help.

oliver-phet commented 8 years ago

Also assigning myself to communicate with user when things are fixed!

samreid commented 8 years ago

Discretizing the applied force slider is a good idea. Discretizing the friction slider will not work (because the friction force is computed based on it and other factors), and the friction force may need to be discretized in the model.

jessegreenberg commented 8 years ago

@samreid yes, that is true. The above commit handles this as described in https://github.com/phetsims/forces-and-motion-basics/issues/197#issuecomment-245725596. The applied force is rounded by the slider while the friction force is rounded after calculation in the model. The result is that the forces in the model are equal to what is shown in the view. I verified in an instance proxy.

In the maintenance release for this issue, we may also want to include #198.

phet-steele commented 7 years ago

This looks good, I let the sim run for ~10 mins with equivalent applied and friction forces and saw no change in speed. @oliver-phet this will be fixed when the sim is released. Keeping this open until then.

phet-steele commented 7 years ago

@oliver-phet, sim is deployed. Were you going to email the user who reported this issue?

oliver-phet commented 7 years ago

User has been notified, closing!