|
35 | 35 | origin=[0, 0, 0], plane='XY', element_type='Quad')
|
36 | 36 |
|
37 | 37 | # Add a 4' wide x 12' tall door opening to the mesh
|
38 |
| -model.Meshes['MSH1'].add_rect_opening(name='Door 1', x_left=2*12, y_bott=0*12, width=4*12, height=12*12) |
| 38 | +model.meshes['MSH1'].add_rect_opening(name='Door 1', x_left=2*12, y_bott=0*12, width=4*12, height=12*12) |
39 | 39 |
|
40 | 40 | # Add a 4' wide x 4' tall window opening to the mesh
|
41 |
| -model.Meshes['MSH1'].add_rect_opening(name='Window 1', x_left=8*12, y_bott=8*12, width=4*12, height=4*12) |
| 41 | +model.meshes['MSH1'].add_rect_opening(name='Window 1', x_left=8*12, y_bott=8*12, width=4*12, height=4*12) |
42 | 42 |
|
43 | 43 | # Add another 4' wide x 4' tall window opening to the mesh
|
44 |
| -model.Meshes['MSH1'].add_rect_opening(name='Window 2', x_left=14*12, y_bott=8*12, width=4*12, height=4*12) |
| 44 | +model.meshes['MSH1'].add_rect_opening(name='Window 2', x_left=14*12, y_bott=8*12, width=4*12, height=4*12) |
45 | 45 |
|
46 | 46 | # Add another 4' wide x 12' tall door opening to the mesh
|
47 |
| -model.Meshes['MSH1'].add_rect_opening(name='Door 2', x_left=20*12, y_bott=0*12, width=4*12, height=12*12) |
| 47 | +model.meshes['MSH1'].add_rect_opening(name='Door 2', x_left=20*12, y_bott=0*12, width=4*12, height=12*12) |
48 | 48 |
|
49 | 49 | # Generate the mesh now that we've defined all the openings. Pynite automatically generates all
|
50 | 50 | # meshes when analyzing, but generating it early with give us the chance to work with it prior to
|
51 | 51 | # analysis.
|
52 |
| -model.Meshes['MSH1'].generate() |
| 52 | +model.meshes['MSH1'].generate() |
53 | 53 |
|
54 | 54 | # Shear at the top of the wall
|
55 | 55 | V = 100 # kip
|
56 | 56 |
|
57 | 57 | # The shear at the top of the wall will be distributed evently to all the
|
58 | 58 | # nodes at the top of the wall. Determine how many nodes are at the top of the
|
59 | 59 | # wall.
|
60 |
| -n = len([node for node in model.Nodes.values() if isclose(node.Y, height)]) |
| 60 | +n = len([node for node in model.nodes.values() if isclose(node.Y, height)]) |
61 | 61 | v = V/n
|
62 | 62 |
|
63 | 63 | # Add supports and loads to the nodes
|
64 |
| -for node in model.Nodes.values(): |
| 64 | +for node in model.nodes.values(): |
65 | 65 |
|
66 | 66 | # Determine if the node is at the base of the wall
|
67 | 67 | if isclose(node.Y, 0):
|
|
96 | 96 | renderer.render_model()
|
97 | 97 |
|
98 | 98 | # Print the maximum displacement
|
99 |
| -d_max = max([node.DX['Seismic'] for node in model.Nodes.values()]) |
| 99 | +d_max = max([node.DX['Seismic'] for node in model.nodes.values()]) |
100 | 100 | print('Max displacement: ', d_max, 'in')
|
101 | 101 | print('Expected displacement from reference text: ', 7.623/E*t, 'in')
|
102 | 102 | print('Wall rigidity: ', V/d_max, 'kips/in')
|
|
0 commit comments