phetsims / isotopes-and-atomic-mass

"Isotopes And Atomic Mass" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
3 stars 3 forks source link

Atomic Mass significant digits #107

Closed oliver-phet closed 2 years ago

oliver-phet commented 2 years ago

In this particular simulation if you look at the page that has the Hydrogen isotope mixture. The natural mix has H-1 at 99.9885% and the H-2 at 0.0115. And then calculated the weighted mass as follows: (1.00783 99.9885 + (2.01410 0.0115)) / 100 By my reckoning, which could be mistaken, the answer should be 1.00795amu correct to six significant digits. The answer shown in the simulation is 1.00794. Which by itself is not a big deal and the only reason I found this was because I decided to use this as calculation in a lesson on significant digits to a student already a bit familiar with this simulation. Normally I would say dont waste too much for this one mistake. However, hopefully, there is a common function that does the significant digit arithmetic and if so fixing it in that one place may fix it in other locations as well. The routine appears to always round down.

@arouinfar assigning to you to decide if this is worth fixing.

arouinfar commented 2 years ago

@oliver-phet as far as I can tell from the design doc and poking around in the code, we aren't actually calculating the average atomic mass using the abundance and mass data for individual isotopes. We pull the data from NIST. We round the NIST data to 4 decimal places for abundance and 5 decimal places for mass.

Using the abundance/mass data from NIST, the calculation looks like this: (1.007825032239*0.99988570)+(2.0141017781212*0.00011570)=1.007942869

The average atomic mass of hydrogen provided by NIST is 1.00794, which is what we display in the sim.

oliver-phet commented 2 years ago

Thanks! Replied back to the user.