sharpie7 / circuitjs1

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

Bug-Scope goes distorted #899

Open Noitarud opened 8 months ago

Noitarud commented 8 months ago

I use an older version and checked - it is worse with newer version. The circuit is made symmetrical except for the phase of AC. On the left side you see a V in the wire, version 1.5n goes distorted with V present, your present version goes distorted either way. I was actually expecting all twelve scopes on the right to read the same voltage, not sure if that is my error or if it is related to this bug (unequal in all four situations described).

$ 2 5.0E-4 0.18682459574322224 51 7.0 50 r 88 200 56 224 0 1000000.0 r 296 224 296 272 0 1000000.0 r 168 408 200 432 0 1000000.0 r 360 224 360 272 0 1000000.0 r 472 408 504 432 0 1000000.0 r 232 224 296 224 0 1000000.0 r 600 224 568 248 0 1000000.0 r 424 224 360 224 0 1000000.0 r 456 16 480 40 0 1000000.0 r 360 224 360 176 0 1000000.0 r 176 40 152 16 0 1000000.0 r 296 176 296 224 0 1000000.0 r 56 432 200 432 0 1000.0 r 200 432 504 432 0 1000.0 r 504 432 600 432 0 1000.0 r 600 16 456 16 0 1000.0 r 456 16 152 16 0 1000.0 r 152 16 56 16 0 1000.0 r 232 224 296 176 0 1000.0 r 296 176 360 176 0 1000.0 r 360 176 424 224 0 1000.0 r 424 224 360 272 0 1000.0 r 360 272 296 272 0 1000.0 r 296 272 232 224 0 1000.0 r 296 328 248 328 0 1.0E-9 r 456 224 408 328 0 1.0E-9 r 360 120 400 120 0 1.0E-9 r 200 224 248 120 0 1.0E-9 r 152 88 152 360 0 1.0E-9 r 424 88 328 88 0 1.0E-9 r 504 360 504 88 0 1.0E-9 r 232 360 368 360 0 1.0E-9 r 360 392 104 392 0 1.0E-9 r 552 224 552 392 0 1.0E-9 r 296 56 552 56 0 1.0E-9 r 104 224 104 56 0 1.0E-9 v 104 56 296 56 0 1 40.0 5.0 0.0 5.759586531581287 0.5 v 552 56 552 224 0 1 40.0 5.0 0.0 5.235987755982989 0.5 v 552 392 360 392 0 1 40.0 5.0 0.0 4.71238898038469 0.5 v 104 392 104 240 0 1 40.0 5.0 0.0 4.1887902047863905 0.5 v 368 360 504 360 0 1 40.0 5.0 0.0 3.6651914291880923 0.5 v 504 88 424 88 0 1 40.0 5.0 0.0 3.141592653589793 0.5 v 328 88 152 88 0 1 40.0 5.0 0.0 2.6179938779914944 0.5 v 152 360 232 360 0 1 40.0 5.0 0.0 2.0943951023931953 0.5 v 248 120 360 120 0 1 40.0 5.0 0.0 1.5707963267948966 0.5 v 400 120 456 224 0 1 40.0 5.0 0.0 1.0471975511965976 0.5 v 408 328 296 328 0 1 40.0 5.0 0.0 0.5235987755982988 0.5 v 248 328 200 224 0 1 40.0 5.0 0.0 0.0 0.5 w 296 272 296 328 0 w 360 272 360 392 0 w 424 88 424 224 0 w 600 224 552 224 0 w 360 176 360 120 0 w 504 432 504 360 0 w 296 176 296 56 0 w 232 224 232 360 0 w 56 224 104 224 0 g 88 200 104 200 0 g 480 40 480 56 0 g 568 248 552 248 0 g 472 408 472 392 0 g 168 408 168 392 0 g 296 224 312 224 0 w 600 16 600 224 0 g 176 40 176 56 0 w 456 224 456 16 0 w 600 224 600 432 0 w 200 432 200 224 0 w 56 16 56 224 0 w 56 432 56 224 0 w 152 88 152 16 0 g 360 224 344 224 0 w 104 240 56 224 0 o 3 1 0 35 1.25 9.765625E-5 0 -1 o 11 1 0 35 1.25 9.765625E-5 0 -1 o 12 1 0 35 5.0 0.00625 1 -1 o 13 1 0 35 2.5 0.003125 1 -1 o 14 1 0 35 2.5 0.003125 1 -1 o 15 1 0 35 5.0 0.003125 1 -1 o 16 1 0 35 2.5 0.003125 1 -1 o 17 1 0 35 2.5 0.003125 1 -1 o 18 1 0 35 2.5 0.003125 2 -1 o 19 1 0 35 2.5 0.0015625 2 -1 o 20 1 0 35 2.5 0.003125 2 -1 o 21 1 0 35 2.5 0.003125 2 -1 o 22 1 0 35 2.5 0.0015625 2 -1 o 23 1 0 35 2.5 0.003125 2 -1

Noitarud commented 8 months ago

Apparently my fault. It is seeing giga ampres and I have my phases in the wrong order. Maybe you could reopen if

Noitarud commented 8 months ago

Technically this is a bug: Distortion and earlier version did conditionally function correct.

(As for the other, it is possible that multiple circuits can complicate diagnosis when space limits force overlay)