Skip to content

Commit

Permalink
Update shear wall tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JWock82 committed Jan 26, 2022
1 parent b32dc10 commit 15f13c8
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions Testing/test_shear_wall.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,24 +211,27 @@ def test_shear_wall_openings(self):
# Analyze the model
model.analyze(log=True, check_statics=True)

# Render the model and plot the `Txy` shears.
# window = render_model(model, text_height=1, render_loads=True, deformed_shape=True,
# deformed_scale=200, color_map='Txy', scalar_bar=False,
# combo_name='Seismic', labels=False, screenshot='console')
from PyNite.Visualization import Renderer
renderer = Renderer(model)
renderer.combo_name = 'Seismic'
renderer.color_map = 'Txy'
renderer.annotation_size = 1
renderer.deformed_shape = True
renderer.deformed_scale = 200
renderer.scalar_bar = True
# renderer.render_model()
renderer.screenshot()
# # Render the model and plot the `Txy` shears.
# # window = render_model(model, text_height=1, render_loads=True, deformed_shape=True,
# # deformed_scale=200, color_map='Txy', scalar_bar=False,
# # combo_name='Seismic', labels=False, screenshot='console')
# from PyNite.Visualization import Renderer
# renderer = Renderer(model)
# renderer.combo_name = 'Seismic'
# renderer.color_map = 'Txy'
# renderer.annotation_size = 1
# renderer.deformed_shape = True
# renderer.deformed_scale = 200
# renderer.scalar_bar = True
# # renderer.render_model()
# renderer.screenshot()

# Print the maximum displacement
d_max = max([node.DX['Seismic'] for node in model.Nodes.values()])
print('Max displacement: ', d_max, 'in')
print('Expected displacement from reference text: ', 7.623/E*t, 'in')
print('Wall rigidity: ', V/d_max, 'kips/in')
print('Expected rigidity from reference text: ', 1/7.623*E*t, 'kips/in')
# d_max = max([node.DX['Seismic'] for node in model.Nodes.values()])
# print('Max displacement: ', d_max, 'in')
# print('Expected displacement from reference text: ', 7.623/E*t, 'in')
# print('Wall rigidity: ', V/d_max, 'kips/in')
# print('Expected rigidity from reference text: ', 1/7.623*E*t, 'kips/in')

# Add a dummy check for now - we just wanted to see that it ran without errors.
self.assertLess(0, 0.02, 'Failed shear wall with openings test.')

0 comments on commit 15f13c8

Please sign in to comment.