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

RuntimeWarning: divide by zero encountered in double_scalars #177

Closed
omar-alzeer opened this issue Nov 14, 2023 · 2 comments
Closed

RuntimeWarning: divide by zero encountered in double_scalars #177

omar-alzeer opened this issue Nov 14, 2023 · 2 comments

Comments

@omar-alzeer
Copy link

omar-alzeer commented Nov 14, 2023

Hello

When i want to display diagrams, it it gives this warning.
I searched that this warning belongs to numpy library, so i don't know how to get rid of this annoying warning.

please help!

from PyNite import FEModel3D

beam = FEModel3D()

beam.add_node('N1', 0, 0, 0)
beam.add_node('N2', 168, 0, 0)

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

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

# Provide simple supports
beam.def_support('N1', True, True, True, False, False, False)
beam.def_support('N2', True, True, True, True, False, False)

beam.add_member_dist_load('M1', 'Fy', -200/1000/12,
-200/1000/12, 0, 168,"D")

beam.add_load_combo("my comb",{"D":1})

beam.analyze()

# Print the shear, moment, and deflection diagrams
beam.Members['M1'].plot_moment('Mz',"my comb")
beam.Members['M1'].plot_shear('Fy',"my comb")
beam.Members['M1'].plot_deflection('dy',"my comb")

print('Left Support Reaction:', beam.Nodes['N1'].RxnFY, 'kip')
print('Right Support Reacton:', beam.Nodes['N2'].RxnFY, 'kip')
@JWock82
Copy link
Owner

JWock82 commented Nov 15, 2023

I’ll have a look

@omar-alzeer
Copy link
Author

omar-alzeer commented Nov 16, 2023

I noticed that when i run it on "Windows" it doesn't give any warning.
but when i run it on "Android" using Pydroid app (which support running matplotlib graphs and Tkinter GUI) it gives me this warning.

So don't worry i think this warning appears because of the difference in hardware between PCs and Phones.

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

No branches or pull requests

2 participants