chemistry · MIT License
Overview
Calculate de Broglie wavelength or momentum, a nonrelativistic electron wavelength, and hydrogenic Rydberg wavelengths and transition information.
- Not calculator tested
- Downloaded 34 times
- Version 1.0.0
- 2716 bytes
- Uses math
Tried it? Did this program work on your calculator?
Before you run it
- TI-84 Plus CE Python · No calculator OS or Python App version has been verified.
- TI Connect CE .py transfer is the intended path; calculator OS, Python App, transfer, and execution have not yet been tested for this release
- p = m*v and the voltage relation are nonrelativistic.
- The Rydberg modes apply to hydrogen and one-electron hydrogen-like ions using the stated constant.
- Physical magnitudes and quantum numbers are positive; transition levels must differ; the emission-only mode requires upper n greater than lower n.
Try the DuckieDai calculator screen
Follow the same opening, solve menu, prompts, validation, and result flow as the downloadable program.
TI-84 Plus CE Python · screen preview
Learn the math
How de Broglie wavelength and hydrogen transitions work
The idea
Moving particles behave like waves, with a wavelength that gets shorter as momentum rises. For everyday objects the wavelength is far too small to notice; for electrons it is comparable to the size of an atom.
Electrons in a hydrogen-like atom can only have certain energies. Jumping between levels emits or absorbs light of a specific wavelength, given by the Rydberg formula.
The formula
lambda = h/(m*v) = h/p
1/lambda = R*Z^2*(1/n1^2 - 1/n2^2)
lambda- wavelength
h- Planck's constant, 6.626 x 10^-34 J*s, built in
m, v, p- mass (kg), velocity (m/s), and momentum (kg*m/s)
n1, n2- the lower and upper energy levels
Using the program
- 1 finds a wavelength from mass and velocity. 2 finds it from momentum. 3 finds momentum from a wavelength.
- 4 finds an electron's wavelength from an accelerating voltage.
- 5 finds the wavelength of a hydrogen-like transition. 6 describes the transition.
Worked example
An electron (9.109 x 10^-31 kg) moves at 2.2 x 10^6 m/s. Choose 1 and enter 9.109e-31 and 2.2e6.
lambda = 6.626e-34/(9.109e-31 x 2.2e6)
The program shows lambda nm = 0.3306 (it prints more decimal places), about the size of an atom.
Tips and common mistakes
- Type powers of ten with e: 9.109e-31.
- The electron-voltage mode ignores relativity, so it is for modest voltages.
- Dropping from a high level to a low one emits light; going up absorbs it.
Where this comes up
It covers the atomic structure and quantum unit of general chemistry and the modern physics unit of physics: line spectra, the Bohr model, and matter waves.
Exact reviewed bytes
Source code
from math import sqrth=6.62607015e-34light=299792458me=9.1093837e-31charge=1.602176634e-19R=1.0973731568e7def duckiedai_intro(program_name,wait=True):title=program_name[:16]empty=16-len(title)left=empty//2right=empty-leftprint("+----------------------+")print("| "+" "*left+title+" "*right+" |")print("| |")print("| __ |")print("| ___(o )> quack! |")print("| \\ <_. ) |")print("| `---' |")print("| by DuckieDai |")print("+----------------------+")print("Loading...")if wait:input("Press enter to start ")print("\n"*6)def pos(s):while 1:try:x=float(input(s))if x>0:return xexcept:passprint("Enter a positive #")def whole(s):while 1:try:x=int(input(s))if x>0:return xexcept:passprint("Enter a whole #")def menu(s,top):while 1:try:x=int(input(s))if x>0 and x<=top:return xexcept:passprint("Invalid choice")def wave(w):print("lambda m =",w)print("lambda nm =",w*1e9)print("lambda pm =",w*1e12)def photon(w):f=light/we=h*fprint("Frequency Hz =",f)print("Energy J =",e)print("Energy eV =",e/charge)duckiedai_intro("QUANTUM WAVE")print("QUANTUM WAVELENGTH")print("1 lambda from m,v")print("2 lambda from p")print("3 Find momentum")print("4 Electron voltage")print("5 Rydberg lambda")print("6 Transition info")c=menu("Choose 1-6: ",6)if c==1:m=pos("Mass kg: ")v=pos("Velocity m/s: ")p=m*vwave(h/p)print("p kg*m/s =",p)elif c==2:p=pos("Momentum kg*m/s: ")wave(h/p)elif c==3:print("1 meters 2 nm 3 pm")u=menu("Choose unit: ",3)w=pos("lambda: ")if u==2:w=w*1e-9elif u==3:w=w*1e-12print("p kg*m/s =",h/w)elif c==4:v=pos("Voltage V: ")p=sqrt(2*me*charge*v)wave(h/p)print("p kg*m/s =",p)if v>10000:print("High V: relativity matters")elif c==5:z=whole("Atomic Z: ")n1=whole("Lower n1: ")n2=whole("Upper n2: ")if n2<=n1:print("n2 must exceed n1")else:w=1/(R*z**2*(1/n1**2-1/n2**2))wave(w)photon(w)else:z=whole("Atomic Z: ")n1=whole("Initial n: ")n2=whole("Final n: ")if n1==n2:print("No transition")else:w=1/(R*z**2*abs(1/n2**2-1/n1**2))if n1>n2:print("EMISSION")else:print("ABSORPTION")print("n",n1,"to",n2)wave(w)photon(w)if z==1:low=min(n1,n2)if low==1:print("Lyman: UV")elif low==2:print("Balmer: visible")elif low==3:print("Paschen: infrared")else:print("Higher H series")input("ENTER for guide: ")print("QUICK GUIDE")print("lambda=h/p")print("More p: shorter lambda")print("High n to low n: emit")print("Low n to high n: absorb")print("DuckieDai: done!")input("ENTER to exit: ")
- Filename
dWAVE.py- Size
- 2716 bytes
- SHA-256
8238d675998a4041554d4d58d2c8d3641dc07972c2f8b7a6287494f809419f0a
Usage
Inputs
- Mass and speed, momentum, wavelength, or electron accelerating voltage
- Atomic number and principal quantum levels for hydrogenic transitions
Outputs
- Wavelength in metres, nanometres, and picometres
- Momentum; or transition direction, photon frequency, and photon energy
Units: SI units are used for mass, speed, momentum, voltage, wavelength, frequency, and energy; entered nm or pm are explicitly converted.
Assumptions and limitations
Assumptions
- p = m*v and the voltage relation are nonrelativistic.
- The Rydberg modes apply to hydrogen and one-electron hydrogen-like ions using the stated constant.
Constraints
- Physical magnitudes and quantum numbers are positive; transition levels must differ; the emission-only mode requires upper n greater than lower n.
Known failures
- Multi-electron atoms are not described by the Z-squared hydrogenic formula.
- High accelerating voltage requires a relativistic wavelength correction.
Compatibility and review
- Review status
- Not calculator tested
- Tested on
- The owner reports personally testing the supplied archive programs on a calculator; exact model, OS, and Python App versions were not recorded
- What happened
- Owner reported interactive testing is disclosed, but the published bytes are not labeled independently calculator tested because the environment is unrecorded and Arrhenius received a narrow intake correction
- Dependencies
- math
- Suggested calculator name
DWAVE— you can give it another valid, unique name when you transfer it- Desktop test cases
- Not available for this interactive-only source
This exact source auto-launches an interactive calculator session, so compatibility evidence comes from the recorded physical-device review rather than an importable desktop fixture.
Transfer and launch
Download the .py file, send it to your calculator with TI Connect CE as DWAVE or another name, then open the Python App and try the worked example on this page first. This release has no verified calculator OS or Python App version; treat transfer and execution as unverified until independently tested.
Full installation and troubleshooting guide. Check your teacher's or exam's rules before using any program.
Version history
- 1.0.0 — current version, published . Download this reviewed version
Related learning
Did a DuckieDai program help with your homework? Every program here is free. If you would like to say thanks, you can leave a tip on Cash App ($duckiedai214) or read what tips pay for.
Independent compatibility resource: Hidden Word Scanner is independent and is not affiliated with or endorsed by Texas Instruments. TI product names describe compatibility only.
Action-count privacy: Successful downloads, preview starts, and preview completions increment same-origin aggregate counters, and so does a Yes or No answer about whether the program worked. Your browser notes that you answered; that note is never sent to the site. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.