Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Convert derived SI units to base units

How can I convert SI units involving temperature (kelvin) to their base units?

Example using units of heat capacity:

# Temperature units multiplied by other units cannot be converted
blah = units.energy.joule/units.temperature.kelvin
blah.convert()

Traceback (click to the left of this block for traceback)

...

ValueError: Cannot convert

I need this output:

units.energy.joule.convert()/units.temperature.kelvin.convert()

kilogram*meter^2/(kelvin*second^2)

There is a discussion of this issue at the link below, but there should be a function to convert to base units in the absence of numerical values. Link: [https://groups.google.com/forum/#!searchin/sage-devel/convert%28%29/sage-devel/q0MwrPYAuNI/klJNkSNHaXAJ]

Does anyone know how to do this?