Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior of field inside the bar magnet #165

Closed
pixelzoom opened this issue May 7, 2024 · 4 comments
Closed

Behavior of field inside the bar magnet #165

pixelzoom opened this issue May 7, 2024 · 4 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented May 7, 2024

Noticed while investigating quirks in #156 ...

I'm confused by the behavior of the B-field inside the bar magnet. My understanding is that a bar magnet is strongest at its poles, and weaker towards the center. Our sim (Java and HTML5) has the opposite behavior, which you can confirm using the Field Meter.

I investigated to see whether there's a programming bug. But the "internal B-field grid" that was generated using MathCAD clearly shows that the magnet is stronger towards the center, and gets weaker towards the poles. Is it possible that there was an error is how the MathCAD data was generated, and we never noticed?

BarMagnetFieldData.ts contains the MathCAD data. BX_INTERNAL and BY_INTERNAL are the xy components for the field inside the magnet, for one quadrant relative to the magnet's origin, with values in row-major order.

@arouinfar @kathy-phet @ariel-phet thoughts, confirmation, corrections,...?

@pixelzoom
Copy link
Contributor Author

pixelzoom commented May 7, 2024

bFieldOfHorizCylinderNumerical.pdf is the PDF version of the MathCAD model, provided by Mike Dubson during development of the Java version. It says:

Check: B at middle of right edge of magnet should be about 1/2 of B-field at center.

If I understand that correctly, then (for example) if the middle of the right edge is 200G, then the center should be ~100G. That is the opposite of how the sim is behaving. We should confirm with Mike Dubson, but I believe the values for the internal B-field are reversed.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented May 7, 2024

Check: B at middle of right edge of magnet should be about 1/2 of B-field at center.

If I understand that correctly ...

I clearly did not understand, and had it reversed. The statement matches the sim behavior. For example, if the center is 200G, then the middle of the right edge should be ~100G.

That may (?) be correct for a horizontal cylinder, which is what was modeled using MathCAD. But I'm still wondering if that's correct for a bar magnet.

@arouinfar
Copy link
Contributor

I believe the sim is behaving correctly. If you look at the field lines inside of a bar magnet, they are the most dense at the center, meaning the field is strongest there.

image

That said, I would appreciate if @ariel-phet or @kathy-phet could also take a look at this issue.

@arouinfar arouinfar removed their assignment May 9, 2024
@pixelzoom
Copy link
Contributor Author

pixelzoom commented May 14, 2024

Discussed with @ariel-phet and he convinced me that the bar magnet is behaving properly. He pointed to the same reference that @arouinfar provided above, http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/elemag.html. So I'm going to close this. @kathy-phet if you'd like to comment, please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants