Esempio n. 1
0
def arch_or_tie_plots(bridges_dict,
                      load_groups,
                      lw=1.0,
                      ls='-',
                      arch=True,
                      effect='Moment'):

    for name in load_groups:
        load_group = load_groups[name]
        fig, axs = pyplot.subplots(1, 2, figsize=(8, 2), dpi=240)
        for i, key in enumerate(bridges_dict):
            label = key
            bridge = bridges_dict[key]
            if arch:
                bridge.network_arch.arch.plot_effects(axs[0],
                                                      load_group,
                                                      effect,
                                                      label=label,
                                                      c=colors[i],
                                                      lw=lw,
                                                      ls=ls)
            else:
                bridge.network_arch.tie.plot_effects(axs[0],
                                                     load_group,
                                                     effect,
                                                     label=label,
                                                     c=colors[i],
                                                     lw=lw,
                                                     ls=ls)

        if arch:
            axs[0].set_title('Arch')
        else:
            axs[0].set_title('Tie')

        axs[0].set_ylabel('M [MNm]')
        adjust_plot(axs[0])

        axs[1].remove()
        handles, labels = axs[0].get_legend_handles_labels()
        fig.legend(handles,
                   labels,
                   loc='upper left',
                   bbox_to_anchor=(0.55, 0.85),
                   frameon=False)
        fig.savefig(name + ".png")
        pyplot.show()
    return
Esempio n. 2
0
    '95° - 35° Arrangement (Polynomial)': bridge_95_35f
}

span = 267.8
rise = 53.5
fig, axs = pyplot.subplots(1, 2, figsize=(8, 2), dpi=240)
for i, key in enumerate(bridges_dict):
    bridge = bridges_dict[key]
    nodes = bridge.network_arch.arch.nodes
    x = np.array([node.x for node in nodes])
    y = np.array([node.y for node in nodes])
    y_ref = [rise * (1 - ((x_i - span / 2) / (span / 2))**2) for x_i in x]
    axs[0].plot(x, y - y_ref, label=key, c=colors[i], lw=0.7)

# y = np.array([rise - radius * (1 - (1 - ((x_i - span / 2) / radius) ** 2) ** 0.5) for x_i in x])
# axs[0].plot(x, y-y_ref, label='Circular arch', c=colors[i+1], lw=0.7)

axs[0].set_title('Arch shape')
axs[0].set_ylabel('Deviation [m]')
adjust_plot(axs[0], step=0.2, min_0=True)

axs[1].remove()
handles, labels = axs[0].get_legend_handles_labels()
fig.legend(handles,
           labels,
           loc='upper left',
           bbox_to_anchor=(0.55, 0.85),
           frameon=False)
fig.savefig('arch_shapes_3.png')
pyplot.show()
Esempio n. 3
0
x = [(i+1)/(101)*span for i in range(100)]
f_2 = []
f_6 = []
f_10 = []
for i in range(100):
    d_2 = bridge.network_arch.hangers.effects['F'+str(i+1)]['Normal Force'][1]
    d_6 = bridge.network_arch.hangers.effects['F'+str(i+1)]['Normal Force'][5]
    d_10 = bridge.network_arch.hangers.effects['F'+str(i+1)]['Normal Force'][9]
    f_2.append(F*d_2*c)
    f_6.append(F*d_6*c)
    f_10.append(F*d_10*c)

span = 267.8
rise = 53.5
fig, axs = pyplot.subplots(1, 2, figsize=(8, 2), dpi=240)

axs[0].plot(x, f_2, label='2. Hanger', c=colors[0], lw=1)
axs[0].plot(x, f_6, label='6. Hanger', c=colors[1], lw=1)
axs[0].plot(x, f_10, label='10. Hanger', c=colors[2], lw=1)

# axs[0].set_title('Fatigue limit state')
axs[0].set_ylabel('Hanger force [kN]')
axs[0].set_xlabel('Design truck position [m]')
adjust_plot(axs[0], step=100, min_0=True)

axs[1].remove()
handles, labels = axs[0].get_legend_handles_labels()
fig.legend(handles, labels, loc='upper left', bbox_to_anchor=(0.55, 0.85), frameon=False)
fig.savefig('figures/fatigue.png')
pyplot.show()