def test_5000_250(self): """ Test asymmetric reinforcement for N=1000 kN, M=750 kNm """ n_ed = 5000.0 m_ed = 250.0 as1, as2 = compression_asymmetric.main(h, b, a1, a2, m_ed, n_ed, eta_bet, lambda_bet, f_cd, f_ck) self.assertAlmostEqual(as1, 5.750000, 2) self.assertAlmostEqual(as2, 24.60759, 2)
def test_3500_350(self): """ Test asymmetric reinforcement for N=1000 kN, M=750 kNm """ n_ed = 3500.0 m_ed = 350.0 as1, as2 = compression_asymmetric.main(h, b, a1, a2, m_ed, n_ed, eta_bet, lambda_bet, f_cd, f_ck) self.assertAlmostEqual(as1, 4.025000, 2) self.assertAlmostEqual(as2, 12.94635, 2)
def test_1000_750(self): """ Test asymmetric reinforcement for N=1000 kN, M=750 kNm """ n_ed = 1000.00 m_ed = 750.0 as1, as2 = compression_asymmetric.main(h, b, a1, a2, m_ed, n_ed, eta_bet, lambda_bet, f_cd, f_ck) self.assertAlmostEqual(as1, 29.879164, 2) self.assertAlmostEqual(as2, 12.74813, 2)
def test_1000_500(self): """ Test asymmetric reinforcement for N=1000 kN, M=500 kNm """ n_ed = 1000.0 m_ed = 500.0 as1, as2 = compression_asymmetric.main(h, b, a1, a2, m_ed, n_ed, eta_bet, lambda_bet, f_cd, f_ck) self.assertAlmostEqual(as1, 17.95217, 2) self.assertAlmostEqual(as2, 1.80000, 2)
def test_5_10(self): """ Test asymmetric reinforcement for N=5 kN, M=10 kNm """ n_ed = 5.0 m_ed = 10.0 as1, as2 = compression_asymmetric.main(h, b, a1, a2, m_ed, n_ed, eta_bet, lambda_bet, f_cd, f_ck) self.assertAlmostEqual(as1, 0.219840, 1) self.assertAlmostEqual(as2, 1.80000, 1)
def test_5000_225(self): """ Test asymmetric reinforcement for N=1000 kN, M=750 kNm """ n_ed = 5000.0 m_ed = 225.0 as1, as2 = compression_asymmetric.main(h, b, a1, a2, m_ed, n_ed, eta_bet, lambda_bet, f_cd, f_ck) self.assertAlmostEqual(as1, 4.578443, 2) self.assertAlmostEqual(as2, 23.49285, 2)
def onclick(self): h = float(self.data_1.get().replace(',', '.')) * 10**-2 b = float(self.data_2.get().replace(',', '.')) * 10**-2 a1 = float(self.data_3.get().replace(',', '.')) * 10**-3 a2 = float(self.data_4.get().replace(',', '.')) * 10**-3 m_ed = float(self.data_5.get().replace(',', '.')) n_ed = float(self.data_6.get().replace(',', '.')) if n_ed >= 0: as1, as2 = compression_asymmetric.main(h, b, a1, a2, m_ed, n_ed, self.eta_bet, self.lambda_bet, self.f_cd, self.f_ck) else: as1, as2 = extension_asymmetric.main(h, b, a1, a2, m_ed, n_ed, self.eta_bet, self.lambda_bet, self.f_cd, self.f_ck) as1 = round(as1, 2) as2 = round(as2, 2) self.result_1.config(text=f"A_s1 = {as1} [cm^2]") self.result_2.config(text=f"A_s2 = {as2} [cm^2]")