phetsims / capacitor-lab-basics

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

The state of the current arrows is not always preserved #289

Open arouinfar opened 3 years ago

arouinfar commented 3 years ago

Discovered during #249 and likely related to #285 and #288.

The state of the current arrows in the downstream sim does not always match the state in the upstream sim.

Example 1

  1. Open the sim in the state wrapper
  2. Pause sim, then charge the capacitor. Current arrows correctly appear in both the upstream and downstream sims.
  3. Move the switch to the light bulb. Current arrows appear only in the upstream sim:

Example 2

  1. Open the sim in the state wrapper
  2. Charge the capacitor
  3. Move switch to the light bulb and allow the capacitor to mostly discharge
  4. Move the switch back to the battery to recharge the capacitor. Current arrows appear in the upstream sim, but not in the downstream sim. At first I thought this could be related to the delay between upstream/downstream, but I notice the issue even when "Set State Rate" is at 50 ms. Screen Shot 2021-04-29 at 4 54 27 PM