SharedNet-Hero.ipynbOpen in CoCalc
from pint import UnitRegistry
u = UnitRegistry()
#Overall_Plant_Efficiency_in_ntl gas
(2827178 * u.btu)/(43641296 *u.feet**3)
0.06478217328834597 btu/foot3
#Overall_Plant_Efficiency_in_therms_ntl_gas
((2827178 * u.btu)/(43641296 *u.feet**3))*(100* u.feet**3/1.037 * u.therms)
6.247075534073864 btu thm

#Pony_Boiler_Max_Flow
(1999999 * u.BTU)/(566 * u.kwatt * u.hour)
3533.5671378091874 btu/(hour kilowatt)
(14* u.H20)*((0.0361 * u.psi)/(1* u.H20))
--------------------------------------------------------------------------- UndefinedUnitError Traceback (most recent call last) <ipython-input-12-4f44ced3cabd> in <module>() ----> 1 (14* u.H20)*((0.0361 * u.psi)/(1* u.H20)) /ext/anaconda3/lib/python3.5/site-packages/pint/registry.py in __getattr__(self, item) 201 if item[0] == '_': 202 return super(BaseRegistry, self).__getattribute__(item) --> 203 return self.Unit(item) 204 205 def __getitem__(self, item): /ext/anaconda3/lib/python3.5/site-packages/pint/unit.py in __new__(cls, units) 43 inst._units = units 44 elif isinstance(units, string_types): ---> 45 inst._units = inst._REGISTRY.parse_units(units)._units 46 elif isinstance(units, _Unit): 47 inst._units = units._units /ext/anaconda3/lib/python3.5/site-packages/pint/registry.py in parse_units(self, input_string, as_delta) 765 :class:`ValueError` if the expression is invalid. 766 """ --> 767 units = self._parse_units(input_string, as_delta) 768 return self.Unit(units) 769 /ext/anaconda3/lib/python3.5/site-packages/pint/registry.py in _parse_units(self, input_string, as_delta) 875 as_delta = self.default_as_delta 876 --> 877 return super(NonMultiplicativeRegistry, self)._parse_units(input_string, as_delta) 878 879 def _define(self, definition): /ext/anaconda3/lib/python3.5/site-packages/pint/registry.py in _parse_units(self, input_string, as_delta) 790 many = len(units) > 1 791 for name in units: --> 792 cname = self.get_name(name) 793 value = units[name] 794 if not cname: /ext/anaconda3/lib/python3.5/site-packages/pint/registry.py in get_name(self, name_or_alias, case_sensitive) 473 candidates = self._dedup_candidates(self.parse_unit_name(name_or_alias, case_sensitive)) 474 if not candidates: --> 475 raise UndefinedUnitError(name_or_alias) 476 elif len(candidates) == 1: 477 prefix, unit_name, _ = candidates[0] UndefinedUnitError: 'H20' is not defined in the unit registry