Example #1
0
from matplotlib import pyplot

from bridges.Blennerhassett import BlennerhassettBridge
from plotting.plots import make_plots

bridge_basic = BlennerhassettBridge(arch_optimisation=False)

fig, ax = bridge_basic.plot_effects_on_structure('-1 DL', 'Moment')
pyplot.show()
# fig.savefig('dead_load.png')
Example #2
0
arch.nodes[-1] = nodes.nodes[-1]

model = bridge.network_arch.create_model()

s, c = np.sin(hanger.inclination), np.cos(hanger.inclination)
model['Loads'] = [{
    'Nodal': [[hanger.tie_node.index, c, s, 0],
              [hanger.arch_node.index, -c, -s, 0]]
}]
model['Boundary Conditions']['Restricted Degrees'] += [[
    len(nodes.nodes) - 2, 1, 1, 0, 0
], [len(nodes.nodes) - 1, 0, 1, 0, 0]]
d_tie, if_tie, rd_tie, sp_tie = structure_analysis(model)

print(max([max(test) for test in if_tie[0]['Moment']]))
print(min([min(test) for test in if_tie[0]['Moment']]))

effects = bridge.network_arch.internal_forces_to_effects(if_tie[0])
bridge.network_arch.set_effects(effects, 'Test')

fig, ax = bridge.plot_effects_on_structure('Test', 'Moment')
plot_supports_new(model, ax, factor=0.03)
fig.savefig(
    'optimisation methods/overall optimisation single force moment.png')
pyplot.show()

plot_loads_old(model,
               0,
               'optimisation methods/overall optimisation single force',
               save_plot=True)