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(',', '.')) as_1 = float(self.data_7.get().replace(',', '.')) * 10**-4 as_2 = float(self.data_8.get().replace(',', '.')) * 10**-4 if n_ed >= 0: n_rd, m_rd = compression_diagnostic.main(h, b, a1, a2, m_ed, n_ed, as_1, as_2, self.eta_bet, self.lambda_bet, self.f_cd, self.f_ck) else: n_rd, m_rd = extension_diagnostic.main(h, b, a1, a2, m_ed, n_ed, as_1, as_2, self.eta_bet, self.lambda_bet, self.f_cd, self.f_ck) m_rd = round(m_rd, 2) n_rd = round(n_rd, 2) self.result_1.config(text=f"M_rd = {m_rd} [kNm]") self.result_2.config(text=f"N_rd = {n_rd} [kN]")
def test_3500_350(self): """ Test asymmetric reinforcement for N=1000 kN, M=750 kNm """ n_ed = 3500.0 m_ed = 350.0 as_1 = 4.025000 * 10**-4 as_2 = 12.94635 * 10**-4 n_rd, m_rd = compression_diagnostic.main(h, b, a1, a2, m_ed, n_ed, as_1, as_2, eta_bet, lambda_bet, f_cd, f_ck) self.assertAlmostEqual(n_rd, n_ed, 0) self.assertAlmostEqual(m_rd, m_ed, 0)
def test_1000_500(self): """ Test asymmetric reinforcement for N=1000 kN, M=500 kNm """ n_ed = 1000.0 m_ed = 500.0 as_1 = 17.95217 * 10**-4 as_2 = 1.80000 * 10**-4 n_rd, m_rd = compression_diagnostic.main(h, b, a1, a2, m_ed, n_ed, as_1, as_2, eta_bet, lambda_bet, f_cd, f_ck) self.assertAlmostEqual(n_rd, n_ed, 0) self.assertAlmostEqual(m_rd, m_ed, 0)
def test_1000_750(self): """ Test asymmetric reinforcement for N=1000 kN, M=750 kNm """ n_ed = 1000.00 m_ed = 750.0 as_1 = 29.879164 * 10**-4 as_2 = 12.74813 * 10**-4 n_rd, m_rd = compression_diagnostic.main(h, b, a1, a2, m_ed, n_ed, as_1, as_2, eta_bet, lambda_bet, f_cd, f_ck) self.assertAlmostEqual(n_rd, n_ed, 0) self.assertAlmostEqual(m_rd, m_ed, 0)
def test_5000_225(self): """ Test asymmetric reinforcement for N=1000 kN, M=750 kNm """ n_ed = 5000.0 m_ed = 225.0 as_1 = 4.578443 * 10**-4 as_2 = 23.49285 * 10**-4 n_rd, m_rd = compression_diagnostic.main(h, b, a1, a2, m_ed, n_ed, as_1, as_2, eta_bet, lambda_bet, f_cd, f_ck) self.assertAlmostEqual(n_rd, n_ed, 0) self.assertAlmostEqual(m_rd, m_ed, 0)