def moment_results(): a = members_list() B = Beam() B.beam_width = a[0] B.beam_height = a[1] B.beam_length = a[2] B.numbers_of_level = a[6] C = Column() C.column_width = a[3] C.column_thickness = a[4] C.column_height = a[5] C.numbers_of_level = a[6] B.weight_from_beam = B.beam_weight() B.weight_from_column = C.column_weight() C.weight_from_beam = B.beam_weight() C.weight_from_column = C.column_weight() n = B.numbers_of_level if n == 1: a = ['%.2f' % B.beam_moment_5(), 0, 0, 0, 0] return a if n == 2: a = ['%.2f' % B.beam_moment_4(), '%.2f' % B.beam_moment_5(), 0, 0, 0] return a if n == 3: a = [ '%.2f' % B.beam_moment_3(), '%.2f' % B.beam_moment_4(), '%.2f' % B.beam_moment_5(), 0, 0 ] return a if n == 4: a = [ '%.2f' % B.beam_moment_2(), '%.2f' % B.beam_moment_3(), '%.2f' % B.beam_moment_4(), '%.2f' % B.beam_moment_5(), 0 ] return a if n == 5: a = [ '%.2f' % B.beam_moment_1(), '%.2f' % B.beam_moment_2(), '%.2f' % B.beam_moment_3(), '%.2f' % B.beam_moment_4(), '%.2f' % B.beam_moment_5() ] return a
def check_moment(): a = members_list() B = Beam() B.beam_width = a[0] B.beam_height = a[1] B.beam_length = a[2] B.numbers_of_level = a[6] C = Column() C.column_width = a[3] C.column_thickness = a[4] C.column_height = a[5] C.numbers_of_level = a[6] B.weight_from_beam = B.beam_weight() B.weight_from_column = C.column_weight() C.weight_from_beam = B.beam_weight() C.weight_from_column = C.column_weight() b_list = get_beamvalues() c_list = get_columnvalues() n = B.numbers_of_level l = [1, 1, 1, 1, 1] for i in range(0, len(b_list)): bw = b_list[i][0] bh = b_list[i][1] V = b_list[i][2] M = b_list[i][3] if n == 1: if bw == B.beam_width and bh == B.beam_height: if M <= B.beam_moment_5(): l[0] = 0 elif n == 2: if bw == B.beam_width and bh == B.beam_height: if M <= B.beam_moment_5(): l[1] = 0 if M <= B.beam_moment_4(): l[0] = 0 elif n == 3: if bw == B.beam_width and bh == B.beam_height: if M <= B.beam_moment_5(): l[2] = 0 if M <= B.beam_moment_4(): l[1] = 0 if M <= B.beam_moment_3(): l[0] = 0 elif n == 4: if bw == B.beam_width and bh == B.beam_height: if M <= B.beam_moment_5(): l[3] = 0 if M <= B.beam_moment_4(): l[2] = 0 if M <= B.beam_moment_3(): l[1] = 0 if M <= B.beam_moment_2(): l[0] = 0 elif n == 5: if bw == B.beam_width and bh == B.beam_height: if M <= B.beam_moment_5(): l[4] = 0 if M <= B.beam_moment_4(): l[3] = 0 if M <= B.beam_moment_3(): l[2] = 0 if M <= B.beam_moment_2(): l[1] = 0 if M <= B.beam_moment_1(): l[0] = 0 return l