Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect (Zero) Reaction Observed in Z-Direction for Cantilevered Beam with Spring Supports #175

Closed
njhoffman11 opened this issue Oct 5, 2023 · 4 comments
Labels

Comments

@njhoffman11
Copy link

Describe the bug
I have created a model of a cantilevered beam with spring supports in the Y and Z directions along the length of the beam and loads in the Y and Z directions on the end. I observe that the displacements in the Y and Z directions are the same, as expected, but the reaction in the Z direction is 0. Obviously, there should be a non-zero reaction in the Z direction. I have verified that I am running the latest version 0.0.80 of PyNiteFEA.

To Reproduce
from PyNite import FEModel3D

beam = FEModel3D()

beam.add_node('N1', 0, 0, 0)
beam.add_node('N2', 20, 0, 0)
beam.add_node('N3', 40, 0, 0)
beam.add_node('N4', 60, 0, 0)
beam.add_node('N5', 80, 0, 0)
beam.add_node('N6', 100, 0, 0)
beam.add_node('N7', 120, 0, 0)
beam.add_node('N8', 140, 0, 0)
beam.add_node('N9', 160, 0, 0)

E = 29000 # Modulus of elasticity (ksi)
G = 11200 # Shear modulus of elasticity (ksi)
nu = 0.3 # Poisson's ratio
rho = 2.836e-4 # Density (kci)
beam.add_material('Steel', E, G, nu, rho)

beam.add_member('M1', 'N1', 'N9', 'Steel', 100, 100, 250, 20)

beam.def_support('N1', True, True, True, True, True, True) # Fixed Support at the base

for i in range(1, 10):
beam.def_support_spring('N' + str(i), 'DY', 10, direction=None)
for i in range(1, 10):
beam.def_support_spring('N' + str(i), 'DZ', 10, direction=None)

beam.add_node_load('N9', 'FZ', -1) # Loads in the Y and Z directions at the end of the beam
beam.add_node_load('N9', 'FY', -1)

beam.analyze()

print('Y Reaction at N9:', beam.Nodes['N9'].RxnFY, 'kip')
print('Z Reaction at N9:', beam.Nodes['N9'].RxnFZ, 'kip')
print('Y Displacement at N9:', beam.Nodes['N9'].DY, 'in')
print('Z Displacement at N9:', beam.Nodes['N9'].DZ, 'in')

from PyNite.Visualization import Renderer
renderer = Renderer(beam)
renderer.annotation_size = 6
renderer.deformed_shape = True
renderer.deformed_scale = 100
renderer.render_loads = True
renderer.render_model()

Expected behavior
Reaction forces should be the same in the Y and Z directions.

Screenshots
N/A

Additional context
Running this code produces the following output:

Y Reaction at N9: {'Combo 1': -0.43234915558749026} kip
Z Reaction at N9: {'Combo 1': 0.0} kip
Y Displacement at N9: {'Combo 1': -0.043234915558749025} in
Z Displacement at N9: {'Combo 1': -0.04323491555874857} in

@ghost
Copy link

ghost commented Oct 6, 2023

Thanks for reporting this. I’ll have a closer look this weekend. I think I might know what’s going on here.

@JWock82
Copy link
Owner

JWock82 commented Oct 7, 2023

I've fixed this bug and released it as version 0.0.81. The program was only considering one spring support when calculating reactions. Note this only affected reaction calculations. Other calculations were correct.

Do you mind if I convert your code snippet into a unit test for PyNite to run in the future anytime a change is made to the program?

@JWock82 JWock82 added the bug label Oct 7, 2023
@JWock82
Copy link
Owner

JWock82 commented Oct 7, 2023

Fixed

@JWock82 JWock82 closed this as completed Oct 7, 2023
@njhoffman11
Copy link
Author

njhoffman11 commented Oct 8, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants