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

Large flux change when the bar magnet transitions between inside and outside the pickup coil #166

Closed pixelzoom closed 1 month ago

pixelzoom commented 1 month ago

Related to #156 (the new flux model)...

@kathy-phet reported on 5/7/24: In the Pickup Coil screen, the light bulb flashes when the bar magnet transitions between inside and outside the coil (overlapping the sample points), because the flux changes by ~3x. For example, see the 2 states shown below.

We suspect that this is caused by the relevatively strong Bx values just outside the ends of the magnet being given too much weight in the flux computation, because they are using the full cross-section of the coil area. @kathy-phet needs to think about this more. And I need to investigate transitionSmoothingScaleProperty, which has not been recalibrated for our new flux values (and which I do not think is going to resolve the issue.)

screenshot_3275 screenshot_3277
pixelzoom commented 1 month ago

I discussed this with @ariel-phet yesterday. He believes that this is correct behavior, reasoning using the screenshot below that he annotated with field lines (in pink). As the magnet moves inside the coil, there will be a significant flux change as more of the field lines loop back away from the pole. He also referenced the experiment of dropping a bar magnet through a coil, and seeing it "flash" as it enters and exits the coil.

@kathy-phet Have you had time to think about this?

FEL-screenshot-GitHub-156
pixelzoom commented 1 month ago

Design meeting 5/20/24 @arouinfar @kathy-phet @pixelzoom

@kathy-phet does not agree with @ariel-phet's assessment, we do have a problem.

I'll try changing the model so that the area cross-section is the magnet thickness if the magnet intersects the horizontal plane of the sample point, as shown below.

Note to self: See PickupCoil getSamplePointAreaDimensions.

screenshot_3313
pixelzoom commented 1 month ago

Before making the change described in https://github.com/phetsims/faradays-electromagnetic-lab/issues/166#issuecomment-2120881479, I published 1.0.0-dev.28 to use as a before/after reference.

pixelzoom commented 1 month ago

In https://github.com/phetsims/faradays-electromagnetic-lab/commit/07620a83b5014f33dd3a5828e16858026d73807c, I've implemented the change we discussed in this morning's design meeting, as described in https://github.com/phetsims/faradays-electromagnetic-lab/issues/166#issuecomment-2120881479. I also did a rough recalibration, since this changed the max EMF significantly.

I'm still seeing a little bit of light bulb flash when the bar magnet transitions between inside and outside the coil, but nothing like the huge flux change that we were seeing previously.

@kathy-phet @arouinfar please test drive in main or https://phet-dev.colorado.edu/html/faradays-electromagnetic-lab/1.0.0-dev.29/phet/faradays-electromagnetic-lab_all_phet.html?dev

kathy-phet commented 1 month ago

@pixelzoom - The bar magnet and pickup coil seems much better behaved.

The electromagnet and pick-up coil still seems problematic, and its because of how strong the magnetic field is just external to the electromagnet. Let me check with Mike Dubson around this behavior. What I am seeing is that the strong Bx just outside the electromagnet combined with the larger areas is leading to full cancelation of the flux and even a negative flux. However a negative total flux is unphysical, since some of the B-field goes around outside of the pickup coil.

So I need to ask Mike about the electromagnet model. image

pixelzoom commented 1 month ago

Meeting with Mike Dubson, @kathy-phet @arouinfar @pixelzoom

The B-field strength just outside the electromagnet was too large, resulting in the pickup coil having negative flux. Mike suggested adding a constant "fudge factor" to decrease the B-field strength, which we did in https://github.com/phetsims/faradays-electromagnetic-lab/commit/a7a918c32c388eb51babd4c9ed266be638872654. The end result is that, outside the electromagnet coil, we are now multiplying Bx and By by 0.8 (the fudge factor).

This also resolves #164.

The other commits above are some cleanup and documentation in Electromagnet getLocalFieldVectorOutside, to make it clear why we've added the fudge factor.

Since @kathy-phet had to leave the meeting before we resolved this, I'll assign this issue to her for confirmation. If it looks OK, feel free to close.

kathy-phet commented 1 month ago

The electromagnet plus pickup coil behavior is looking good to me - qualitatively giving what I would expect and the flux numbers (at least qualitatively) also seem OK. Nothing non-physical.

kathy-phet commented 1 month ago

I'm going to open a new issue around the special case of the generator screen, where the magnet is spinning. The rule of "choose this area width when the bar is in your y-value" is causing odd behavior on this screen specifically.

pixelzoom commented 1 month ago

Thanks for opening https://github.com/phetsims/faradays-electromagnetic-lab/issues/170. I've addressed it.

@kathy-phet is this issue ready to close?

pixelzoom commented 1 month ago

@kathy-phet says this can be closed.