|
8 | 8 | class RValue(DataTypeBase): |
9 | 9 | """R Value |
10 | 10 | """ |
11 | | - _units = ('m2-K/W', 'h-ft2-F/Btu', 'clo') |
12 | | - _si_units = ('m2-K/W', 'clo') |
13 | | - _ip_units = ('h-ft2-F/Btu', 'clo') |
| 11 | + _units = ('K-m2/W', 'F-ft2-h/Btu', 'clo', 'm2-K/W', 'h-ft2-F/Btu') |
| 12 | + _si_units = ('K-m2/W', 'm2-K/W', 'clo') |
| 13 | + _ip_units = ('F-ft2-h/Btu', 'h-ft2-F/Btu', 'clo') |
14 | 14 | _min = 0 |
15 | 15 | _abbreviation = 'Rval' |
16 | 16 |
|
17 | | - def _m2K_W_to_hft2F_Btu(self, value): |
| 17 | + def _Km2_W_to_Fft2h_Btu(self, value): |
18 | 18 | return value * 5.678263337 |
19 | 19 |
|
20 | | - def _m2K_W_to_clo(self, value): |
| 20 | + def _Km2_W_to_clo(self, value): |
21 | 21 | return value / 0.155 |
22 | 22 |
|
23 | | - def _hft2F_Btu_to_m2K_W(self, value): |
| 23 | + def _Km2_W_to_m2K_W(self, value): |
| 24 | + return value |
| 25 | + |
| 26 | + def _Km2_W_to_hft2F_Btu(self, value): |
| 27 | + return value * 5.678263337 |
| 28 | + |
| 29 | + def _Fft2h_Btu_to_Km2_W(self, value): |
24 | 30 | return value / 5.678263337 |
25 | 31 |
|
26 | | - def _clo_to_m2K_W(self, value): |
| 32 | + def _clo_to_Km2_W(self, value): |
27 | 33 | return value * 0.155 |
28 | 34 |
|
| 35 | + def _m2K_W_to_Km2_W(self, value): |
| 36 | + return value |
| 37 | + |
| 38 | + def _hft2F_Btu_to_Km2_W(self, value): |
| 39 | + return value / 5.678263337 |
| 40 | + |
29 | 41 | def to_unit(self, values, unit, from_unit): |
30 | 42 | """Return values converted to the unit given the input from_unit.""" |
31 | | - return self._to_unit_base('m2-K/W', values, unit, from_unit) |
| 43 | + return self._to_unit_base('K-m2/W', values, unit, from_unit) |
32 | 44 |
|
33 | 45 | def to_ip(self, values, from_unit): |
34 | 46 | """Return values in IP and the units to which the values have been converted.""" |
35 | 47 | if from_unit in self.ip_units: |
36 | 48 | return values, from_unit |
37 | 49 | else: |
38 | | - return self.to_unit(values, 'h-ft2-F/Btu', from_unit), 'h-ft2-F/Btu' |
| 50 | + return self.to_unit(values, 'F-ft2-h/Btu', from_unit), 'F-ft2-h/Btu' |
39 | 51 |
|
40 | 52 | def to_si(self, values, from_unit): |
41 | 53 | """Return values in SI and the units to which the values have been converted.""" |
42 | 54 | if from_unit in self.si_units: |
43 | 55 | return values, from_unit |
44 | 56 | else: |
45 | | - return self.to_unit(values, 'm2-K/W', from_unit), 'm2-K/W' |
| 57 | + return self.to_unit(values, 'K-m2/W', from_unit), 'K-m2/W' |
46 | 58 |
|
47 | 59 |
|
48 | 60 | class ClothingInsulation(RValue): |
|
0 commit comments