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

Should use "MLT" (mass, length, time) units exclusively and convert energies to eV only when producing output #12

Open
rklancer opened this issue Sep 7, 2012 · 0 comments
Assignees

Comments

@rklancer
Copy link
Contributor

rklancer commented Sep 7, 2012

For consistency with Classic MW, we have been reporting energies in electron volts. However, electron volts aren't "natural" mass/length/time units (like MKS or the amu - nanometer - femtosecond units we use internally) and often we need to convert between electron volts and MLT units.

However, there are currently some inconsistencies regarding exactly when this conversion is made.

  1. We convert gravitational and friction units from an eV basis to MLT when we parse them from an MML file.
  2. But radial bond strengths are not converted to an MLT basis when we parse them from MML file. (They are converted to eV/nm^2).
  3. We convert gravitational potential energy from MLT into eV just before reporting potential energy.
  4. However, the Lennard Jones and Coulomb calculators use one system of units for calculating force and another for calculating energy, so the potential energy calculator needs to remember that, unlike gravitational potential energy, potential energy reported by these calculators don't need to be converted to eV.

This is error prone and confusing. A consistent way of dealing with this would be to

  1. Adopt a policy of converting all MML parameters (friction, gravitational field strength, radial bond strength, etc) to an MLT basis on point of ingestion (when parsing the MML file).
  2. During simulation, accumulate all kinetic and potential energy calculations (etc) in MLT units, and convert to eV if necessary just before outputing the value for human consumption.
@ghost ghost assigned rklancer Sep 7, 2012
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

1 participant