def get_window(KPO, L, B, h, cp): nv = lightpass.get_light_pass(L, B, h) r1 = reflection.get_reflection(L, B, h, cp) Sv = (KPO * 0.85 * 1.2 * 2 * nv * L * B) / (0.8 * 0.7 * r1 * 100) return round(Sv, 2)
def get_KPO(L, B, Sv, h, cp): nv = lightpass.get_light_pass(L, B, h) r1 = reflection.get_reflection(L, B, h, cp) e = (Sv * 0.8 * 0.7 * r1 * 100) / (0.85 * 1.2 * 2 * nv * L * B) return round(e, 1)
def test_get_reflection_2_4_0_1_wall(self): index = reflection.get_reflection(2, 4, 0.1, 'wall') self.assertEqual(index, 3.4)
def test_get_reflection_4_2_1_wall(self): index = reflection.get_reflection(4, 2, 1, 'wall') self.assertEqual(index, 1.2)
def test_get_reflection_3_3_0_window(self): index = reflection.get_reflection(3, 3, 0, 'window') self.assertEqual(index, 1.15)
def test_get_reflection_2_4_0_1_window(self): index = reflection.get_reflection(2, 4, 0.1, 'window') self.assertEqual(index, 2)