JWock82 / PyNite

A 3D structural engineering finite element library for Python.
MIT License
421 stars 86 forks source link

Post-processing - analysis fails for two span beams #157

Closed Zardasht84 closed 1 year ago

Zardasht84 commented 1 year ago

Describe the bug Recently I found your library as a good source to perform an elastic-static analysis. I use Excel-sheet as GUI and your library to do the static parts. I calculate from one span to multiple spans with different section properties. During review your code I found a bug when there is a one or two spans with pinned support in the beginning and roller support at intermediate support and at the end. The code raise "MatrixRankWarning: Matrix is exactly singular" If you change the support condition at the end from roller to clamped, then the scripts work as it should!

There is a bug in the code!

I screenshot the code and to explain the problem.

A requirement: getting x-segment of member length and corresponding moment, shear and deformation as a list. Instead of making a list or array then run in the for-loop with every x-value to get the result.

The code: image

Error: image

JWock82 commented 1 year ago

Your model is unstable. There's nothing preventing the beam from spinning about the global X-axis. Change the line continuous_beam.analyze() to continuous_beam.analyze(check_stability=True) and the program will tell you exactly where the instability is. You need to lock down rotation about X at one of the nodes.

Zardasht84 commented 1 year ago

This is correct. I found out to prevented the beam from rotation about X-axis with code Pinned support = (True, True, True, True, False, False). Then it works as it should :) I would like to leave the question open for others to benefit from it that they encounter the same unstability problem.