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

Changes implementation to SymPy #26

Merged
merged 2 commits into from Jul 6, 2017

Conversation

jirikuncar
Copy link
Collaborator

No description provided.

@jirikuncar jirikuncar force-pushed the sympy branch 2 times, most recently from addab8d to 0e81438 Compare July 5, 2017 11:00
@schymans
Copy link
Collaborator

schymans commented Jul 5, 2017

Use of MKS in https://github.com/environmentalscience/essm/blob/sympy/essm/variables/units.py#L58 is not adequate, as MKS stands for "meter, kilogram, second". We also need representations for kelvin and mole, others might also need ampere and candela etc.

@jirikuncar
Copy link
Collaborator Author

jirikuncar commented Jul 6, 2017

@schymans can we use the natural system?

@schymans
Copy link
Collaborator

schymans commented Jul 6, 2017

No, sorry, natural is even worse:

>>> from essm.variables.units import MKS
>>> quantities = [T_a, nu_a, p_nua1, p_nua2]
>>> print [a.convert_to(MKS.print_unit_base(a)) for a in quantities]
[T_a, meter**2/second, p_nua1, meter**2/second]

This one only fails on T_a, but natural returns useless stuff:

>>> from sympy.physics.units.systems import natural
>>> quantities = [T_a, nu_a, p_nua1, p_nua2]
>>> print [a.convert_to(natural.print_unit_base(a)) for a in quantities]
[T_a, 0.0169042576289485*hbar*speed_of_light**2/electronvolt, p_nua1, 0.0169042576289485*hbar*speed_of_light**2/electronvolt]

We may have to write an additional units system called SI.

@schymans
Copy link
Collaborator

schymans commented Jul 6, 2017 via email

@jirikuncar jirikuncar merged commit 0dd9798 into environmentalscience:master Jul 6, 2017
@jirikuncar jirikuncar deleted the sympy branch July 6, 2017 13:03
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

Successfully merging this pull request may close these issues.

None yet

2 participants