phetsims / circuit-construction-kit-common

"Circuit Construction Kit: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
10 stars 10 forks source link

AC Source current sense is determined without regard for the "phase shift" controls #805

Closed samreid closed 1 year ago

samreid commented 2 years ago

From https://github.com/phetsims/circuit-construction-kit-common/issues/800#issuecomment-991212081, I said:

In testing a pair of AC voltage circuits, I observed the following:

Connecting at arbitrary time, they are in phase as desired:

image

Then, changing the phase puts them out of phase, as expected:

image

However, leaving the "phase shift" controls out of phase, then open and closing a switch puts them back in phase, because the sense determining algorithm doesn't look at the "phase shift" controls. Hopefully that is OK

image

samreid commented 2 years ago

@kathy-phet said:

@samreid - Can you make a new issue for this? So we can fix it when we do PhET-iO add. I think its fixable.

samreid commented 2 years ago

I’ll open an issue, but not sure how we will handle the case when they are 90 degrees out of phase.

arouinfar commented 1 year ago

I am unable to reproduce this in master. I created two identical circuits (see below) and introduced a phase shift in the bottom circuit. I tried several different combinations of opening/closing the two switches, and no matter what I did, the bottom circuit maintained the correct phase shift (90°). I repeated for other phase shift values, including introducing a shift in both sources, and the circuits maintained the correct relative phase.

image