Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

Uninitialized Unit Conversion in OpenStudio SDK

Ummm, what does base unit 'BTU' is not is registered with the QuantityConverter mean?

 irb(main):037:0> OpenStudio.convert(10000, "m^2", "ft^2").get
=> 107639.10416709722
irb(main):038:0> OpenStudio.convert(10000, "GJ", "kBTU").get
[openstudio.units.QuantityConverter] <1> Cannot convert to a target Unit containing base unit 'BTU', because it is not registered with the QuantityConverter.
RuntimeError: Optional not initialized
    from (irb):38:in `get'
    from (irb):38
    from /usr/bin/irb:12:in `<main>'