phetsims / wave-interference

"Wave Interference" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
19 stars 5 forks source link

All particles change behavior when frequency changes #439

Closed KatieWoe closed 5 years ago

KatieWoe commented 5 years ago

Test device Dell and Jordan Operating System Win 10 and Mac 10.14 Browser Chrome Problem description For https://github.com/phetsims/QA/issues/405 (both) and published. When the frequency of the sound wave is changed, the particles that are currently part of older waves also drastically change their behavior, though there doesn't seem to be a reason for this. Steps to reproduce

  1. Go to a single sound wave scene
  2. Select the Both scene
  3. Set the frequency low and start the waves
  4. When the waves fill up the play area turn the frequency up quickly and observe the particles compared to the waves
  5. When the high frequency waves fill up the play area turn the frequency down quickly and observe the particles compared to the waves

Visuals https://drive.google.com/file/d/1WoGXkcdZ0nPN9EmBdKw03htttTYSOIHd/view?usp=sharing

Troubleshooting information:

!!!!! DO NOT EDIT !!!!! Name: ‪Waves Intro‬ URL: https://phet-dev.colorado.edu/html/waves-intro/1.0.0-rc.3/phet/waves-intro_all_phet.html Version: 1.0.0-rc.3 2019-08-13 22:16:34 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36 Language: en-US Window: 1536x722 Pixel Ratio: 2.5/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 4096 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}
arouinfar commented 5 years ago

Good find @KatieWoe. It looks the particles reset their positions when the frequency was cranked up. Here, the particles on the right side of the lattice exhibit the random background motion and no longer correspond to the wavefronts. @samreid can you investigate?

Screen Shot 2019-08-22 at 10 26 41 AM
samreid commented 5 years ago

In https://github.com/phetsims/wave-interference/issues/158#issuecomment-437366575 we decided to set up one set of sound particle force parameters at max frequency, another at min frequency and to interpolate in between. This value is updated instantaneously across the lattice, and I believe this is responsible for the effect we are seeing.

@arouinfar or @ariel-phet do you want to investigate this for RC.2 and/or for future versions? This issue is present in the published 1.0 version. Any ideas for how to address this?

arouinfar commented 5 years ago

Thanks @samreid.

It sounds like what we're seeing here is a limitation of the particle model. The particle model supports a single frequency, so changing the frequency will lead to misalignment between the particles and the wavefronts at the previous frequency(ies).

@ariel-phet is this something you'd be okay with deferring? This behavior certainly isn't ideal, but given the goals of the particle view, I think it's acceptable. I would also update the Teacher Tips to explain this limitation.

ariel-phet commented 5 years ago

@arouinfar I am fining deferring, the waves catch up pretty quickly. It is a bit odd, but really the main learning goal here (as you point out implicitly) is that dense particles (high pressure) correspond to crest in the wave view. Moderate speed changes to the frequency basically look fine.

@arouinfar I think you could put in the teacher tips and close as wontfix or defer, I will let you make that call.

arouinfar commented 5 years ago

The Teacher Tips have been updated, closing as wontfix.