Skip to content

bug in units conversion #19093

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

Open
sagetrac-schymans mannequin opened this issue Aug 26, 2015 · 1 comment
Open

bug in units conversion #19093

sagetrac-schymans mannequin opened this issue Aug 26, 2015 · 1 comment

Comments

@sagetrac-schymans
Copy link
Mannequin

sagetrac-schymans mannequin commented Aug 26, 2015

The .convert() function converts units to their base units, e.g.

sage: (units.energy.joule).convert()                            
kilogram*meter^2/second^2

The units of heat capacity are joule/kelvin/kilogram and since joule is not a base unit, it should be possible to convert them to base units. However, this throws an error:

sage: (units.energy.joule/units.temperature.kelvin/units.mass.kilogram).convert()
Traceback (click to the left of this block for traceback)
...
ValueError: Cannot convert

This seems to be the case whenever something is divided by temperature.

Component: symbolics

Keywords: units

Issue created by migration from https://trac.sagemath.org/ticket/19093

@sagetrac-schymans sagetrac-schymans mannequin added this to the sage-6.9 milestone Aug 26, 2015
@sagetrac-schymans
Copy link
Mannequin Author

sagetrac-schymans mannequin commented Sep 18, 2015

comment:1

Goodness, did I really create this ticket only 3 weeks ago? Just googled it again and found the same issue asked by myself 2 years ago with a proposed workaround by Eviatar Bach:
http://ask.sagemath.org/question/10260/convert-derived-si-units-to-base-units/

@mkoeppe mkoeppe removed this from the sage-6.9 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant