sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.36k stars 644 forks source link

Resistance can affect the signal phase #957

Open nvnv-sunny opened 3 months ago

nvnv-sunny commented 3 months ago

A resistor in series with an AC source, when the resistor's terminals are adjusted, can cause the signal to be inverted by 180 degrees. This may lead to confusion for users when simulating related circuits. s

pfalstad commented 3 months ago

How did you create the resistors? It matters if you drag left to right, or right to left. the positive terminal should be placed first, and then drag to the negative terminal. If you do it wrong, you can use right click then "Swap Terminals"

nvnv-sunny commented 3 months ago

I understand what you mean, but this phenomenon does not exist in real circuits. I don't fully understand the operating principles of this system, but I suggest that it might be helpful to indicate the direction of current on the component graphics,Includes other components.This way, users will know which direction of current the oscilloscope is capturing signals from, avoiding the current situation that leads to erroneous simulation results, especially for beginners who are just getting into circuits