phetsims / faradays-electromagnetic-lab

"Faraday's Electromagnetic Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 0 forks source link

No EMF when electromagnet is slightly above or below center of pickup coil with 100% loop area. #164

Closed pixelzoom closed 6 months ago

pixelzoom commented 6 months ago

Related to https://github.com/phetsims/faradays-electromagnetic-lab/issues/156 ...

On 5/1/24, @arouinfar and I discovered a problem that seems related to the new flux model. In the scenario shown in the screenshot below, the light bulb does not light, and the voltmeter needle does not move. This only happens when the pickup coil has 100% loop area (number of loops doesn't matter) and the electromagnet is slightly above or below the loop's center.

I thought this might be related to the lightsWhenCurrentChangesDirectionProperty, which for the Transformer prevents the light bulb from lighting when the AC power supply changes direction. In Transformer.ts:

        // AC Power Supply is cyclic, and current changes direction. We might 'step over' the zero points in the model,
        // so ensure that the light bulb will go through an 'off' state as the current direction changes. Note that it
        // is still appropriate for the light bulb to light when the current changes direction with the DC Power Supply.
        // See https://github.com/phetsims/faradays-electromagnetic-lab/issues/152.
        lightsWhenCurrentChangesDirectionProperty: new DerivedProperty( [ this.electromagnet.currentSourceProperty ],
          currentSource => currentSource instanceof DCPowerSupply )

Removing this seems to fix the problem for the light bulb. But it does not explain why the voltmeter is affected.

screenshot_3260
pixelzoom commented 6 months ago

I checked whether recent changes to the flux model in https://github.com/phetsims/faradays-electromagnetic-lab/issues/166#issuecomment-2121163805 might have cleared this up, but no -- the problem persists.

pixelzoom commented 6 months ago

With 2 loops and 100% loop area, 10V battery....

When electromagnet.positionProperty and pickupCoil.positionProperty are both at (500,375), flux is ~570816.

Moving electromagnet.positionProperty down 1 unit to (500,376) results in a huge drop in flux to -796 (negative!)

Moving electromagnet.positionProperty up 1 unit to (500,374) results in the same flux of -796.

Running a similar experiment with the AC power supply shows similar behavior.

I don't understand this drop in flux, or why it only occurs with 100% loop area.

pixelzoom commented 6 months ago

Discussing with @arouinfar, I hypothesized that this problem is manifesting because of a relationship between the diameters of the 2 coils.

electromagnet.coil.loopAreaProperty = 7854, loopRadiusProperty = 50.00005846084074, diameter = ~100.

With loop area is 100%, pickupCoil.coil.loopAreaProperty = 70685, loopRadiusProperty = 149.9991143470562, diameter = ~300.

So the pickup coil has ~3x the diameter of the electromagnet coil. When the electromagnet is exactly in the center of the pickup coil, the areas about and below the magnet cancel each other out.

pixelzoom commented 6 months ago

https://github.com/phetsims/faradays-electromagnetic-lab/commit/a7a918c32c388eb51babd4c9ed266be638872654 also fixes this problem, see description in https://github.com/phetsims/faradays-electromagnetic-lab/issues/166#issuecomment-2125799912. I can no longer reproduce using the steps in https://github.com/phetsims/faradays-electromagnetic-lab/issues/164#issuecomment-2123045790.

@arouinfar please confirm, close if OK.

arouinfar commented 6 months ago

I'm no longer able to reproduce the bug on main. Closing!