deBroglieWavelength static method
Calculates the de Broglie wavelength of a particle with a given Mass and velocity.
Returns the wavelength as a Length quantity.
Usage: final wavelength = PhysicalConstants.deBroglieWavelength(electronMass, 1.0e6);
Implementation
static Length deBroglieWavelength(Mass mass, double velocityMeterPerSecond) {
final massInKg = mass.getValue(MassUnit.kilogram);
final momentum = massInKg * velocityMeterPerSecond; // p = mv
if (momentum == 0) {
throw ArgumentError(
'Cannot calculate de Broglie wavelength for a particle with zero momentum.',
);
}
final wavelengthInMeters = planckConstant / momentum; // λ = h/p
return Length(wavelengthInMeters, LengthUnit.meter);
}