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

User question: incorrect wavelength in Bohr model #14

Closed
oliver-phet opened this issue Mar 31, 2017 · 9 comments
Closed

User question: incorrect wavelength in Bohr model #14

oliver-phet opened this issue Mar 31, 2017 · 9 comments

Comments

@oliver-phet
Copy link

Dear People at Phet,

First of all thank you very much for these amazing simulations, I use
them a lot!

On the hydrogen atom one
https://phet.colorado.edu/en/simulation/legacy/hydrogen-atom
I do not get the correct wavelengths in Bohr model.

For example, in the 6 to 5 transition, I calculate the wavelength to
be 7460 nm. This calculation is consistent with the page:
https://en.wikipedia.org/wiki/Hydrogen_spectral_series

However, your app gives it as 780 nm, please see the attached print-screen.

I was wondering if you could please check.

@amyh-phet
Copy link

@oliver-phet Did the user include some sort of screen-shot with this report? I can't reproduce the issue they are reporting.

@oliver-phet
Copy link
Author

Sorry, here's the screenshot!
screenshot from 2017-03-30 23_50_59

@amyh-phet
Copy link

amyh-phet commented May 4, 2017

I was able to recreate this behavior. Need to check into why a n=6 to n=5 transition results in an emission of a photon at 780 nm rather than at 7460 nm.

@pixelzoom
Copy link
Contributor

Un-deferring, since development on this sim has resumed.

@pixelzoom
Copy link
Contributor

pixelzoom commented Jun 8, 2022

Note to self, for future investigation...

de Broglie, Schrodinger, and Bohr all use the same transition wavelengths. The Java implementation lives in BohrModel.js, and has not been ported to TypeScript yet. The transition wavelengths are computed by this method:

    /**
     * Gets the transition wavelengths for a specified state.
     * @param state
     * @return double[]
     */
    public double[] getTransitionWavelengths( int state ) {

I'm not sure why the photon wavelength would be correct for Bohr, but incorrect for de Broglie. DeBroglieModel extends BohrModel and there nothing in DeBroglieModel.java that overrides the Bohr behavior.

Transition wavelengths used to label the light's wavelength slider are computed by this method:

    /**
     * Gets the set of wavelengths that cause a state transition.
     * When firing white light, the gun prefers to firing these wavelengths
     * so that the probability of seeing a photon absorbed is higher.
     * 
     * @param minWavelength
     * @param maxWavelength
     * @return double[]
     */
    public static double[] getTransitionWavelengths( double minWavelength, double maxWavelength ) {

@pixelzoom
Copy link
Contributor

pixelzoom commented Aug 4, 2024

Note that the Java versions shows the correct wavelength (7460 nm) for n=6 to n=5 transition, see Help > Transitions dialog below.

If there is a bug, it's also not clear whether there's a problem with emissions only (n=6 → n=5) or also with absorption (n=5 → n=6).

screenshot_3449

@pixelzoom pixelzoom changed the title User question: wavelength question User question: incorrect wavelength in Bohr model Oct 1, 2024
@pixelzoom pixelzoom self-assigned this Dec 17, 2024
pixelzoom added a commit that referenced this issue Jan 27, 2025
@pixelzoom
Copy link
Contributor

I added this assertion to Spectrometer recordEmission:

    // To verify that legacy issue https://github.com/phetsims/models-of-the-hydrogen-atom/issues/14 is no longer a problem.
    assert && assert( photonAbsorptionModel.getTransition( wavelength ), `invalid emission wavelength: ${wavelength}` );

So if any invalid transition wavelength is encountered, the sim will complain loudly and fail. I ran the Bohr model with white light and the Spectrometer accordion box open for ~10 minutes and saw no problems. I'll let CT run for a few cycles to confirm before closing.

@pixelzoom
Copy link
Contributor

pixelzoom commented Jan 27, 2025

Since I'm still curious about how this occurred in the legacy (Java) version, I searched the Java code base for 780. I found nothing in the hydrogen-atom project (sim-specific code), but I did find this in common-code VisibleColor.java:

    public static final double MAX_WAVELENGTH = 780;

... and there are several uses of VisibleColor. MAX_WAVELENGTH in sim-specific Java code. But I did not see any obvious error when inspecting those usages.

@pixelzoom
Copy link
Contributor

pixelzoom commented Jan 27, 2025

Here's a zoomed in view of the screenshot that the user sent:

Image

The user is assuming that the photon was 780 nm based on the tick mark that it's near. But note that the photon is not the color of 780 nm, which is dark red:

Image

The photon is gray, which is the color used for UV and IR wavelengths. So this is actually an IR photon that is being plotted incorrectly.

Enabling some debugging out that's present in SpectrometerNode.java, I got this console output:

SpectrometerNode.photonEmitted 7460
SpectrometerNode.photonEmitted 4052
SpectrometerNode.photonEmitted 486
SpectrometerNode.photonEmitted 122

... for this Spectrometer display, where the 2 IR photons (7460 and 4052) are plotted incorrectly:

Image

I don't feel the need to investigate this further, and I'm confident that this was a bug in how IR photons were plotted in the Java version. So I'm going to close this issue.

Since the Spectrometer in the HTML5 version is labeled with wavelength values, misinterpretting the Spectrometer values should not be a problem.

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

No branches or pull requests

4 participants