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

Add Kelvin as a unit #19

Open
2 tasks done
LigandBindingDomain opened this issue Oct 11, 2023 · 0 comments
Open
2 tasks done

Add Kelvin as a unit #19

LigandBindingDomain opened this issue Oct 11, 2023 · 0 comments

Comments

@LigandBindingDomain
Copy link

Name (Abbreviation) of the unit you want to create?

K

What is its base SI unit?

Kelvin

Would you like to provide more information about your unit?

Kelvin is an absolute scale for temperature, so 0 kelvin is absolute zero.

kelvin

kelvin = Unit(name='kelvin', abbr='K', si=kelvin)
K = kelvin

I'm not sure what lambda function to write for Kelvin but here are the conversions from Celsius and Fahrenheit:

Kelvin to Celsius

k_to_c = lambda k: k - 273.15

Celsius to Kelvin

c_to_k = lambda c: c + 273.15

Kelvin to Fahrenheit

k_to_f = lambda k: k * 9/5 - 459.67

Fahrenheit to Kelvin

f_to_k = lambda f: (f + 459.67) * 5/9

Contributor Guide

Code of Conduct

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