Skip to content

Commit

Permalink
Bug fix for results pulled directly from mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
JWock82 committed Nov 14, 2023
1 parent 48845da commit 8bfd0e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ Here's a list of projects that use PyNite:

# What's New?
v0.0.81 - in progress
* I've started work on nonlinear pushover analysis. This has proven to be a challenging feature to implement, and still has a long way to go. However, in the process of working on pushover analaysis I identified several inneficiencies in the analysis code and fixed them. This update includes those changes, and brings the "work-in-progress" pushover code into the main branch of the project. I decided to merge the pushover branch into to the main branch because critical parts of the analysis code were diverging from the main branch, making it harder to accept pull requests from other users. In the future I'll be working on branches in smaller pieces to avoid this problem.
* `Sections` have been introduced to allow for member stresses to be tracked by the program during nonlinear analysis in the future. This opens the door for other useful features down the line too. Use of `Sections` is optional, and will only required for pushover analysis when that feature is implemented. You do not need to use this feature yet.
* P-Delta analysis code has been greatly simplified. Performance has also been improved, as redundant iterations are no longer being performed. Removed the `tol` parameter as it is unecessary when using a geometric stiffness matrix instead of an iterative procedure.
* Better documentation for P-Delta analysis.
* Corrections to unit tests that weren't working properly. Added another AISC Benchmark unit test for P-Delta analysis. This should help safeguard the program against some types of bugs being introduced going forward.
* Bug fix for multiple support springs at a single node. When calculating reactions, the program was only considering the effects of one spring at the node, whichever came first in this list: DX, DY, DZ, RX, RY, RZ. This only affected reaction calculations, and has been remedied.
* Bug fix for mesh max/min results. The program was throwing exceptions when the user requested results from the mesh rather than the elements themselves.
* Work has begun on nonlinear pushover analysis. This has proven to be a challenging feature to implement, and still has a long way to go. However, in the process of working on pushover analaysis several inneficiencies in the analysis code were identified and fixed. This update includes those changes, and brings the "work-in-progress" pushover code into the main branch of the project. The pushover branch into to the main branch because critical parts of the analysis code were diverging from the main branch, making it harder to accept pull requests from other users.

v0.0.80
* Refactored/simplified analysis code. Much of it has been moved to a new `Analysis` file that eliminated redundant code.
Expand Down
12 changes: 4 additions & 8 deletions Testing/test_tanks.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,13 @@ def test_PCA_7_rect(self):
My_max_Tim = (1 - 1/(beta*H))*w*R*H*t/(12*(1 - nu**2))**0.5
Qy_max_Tim = -(w*R*H*t)/(12*(1 - nu**2))**0.5*(2*beta - 1/H)

# My_max = max([element.moment(element.width()/2, element.height())[1, 0] for element in tank_model.Plates.values()])
My_max = tank_model.Meshes['MSH1'].max_moment('My')
# My_min = min([element.moment(element.width()/2, element.height()/2)[1, 0] for element in tank_model.Plates.values()])
My_min = tank_model.Meshes['MSH1'].min_moment('My')
# Sx = max([element.membrane(element.width()/2, element.height()/2)[0, 0] for element in tank_model.Plates.values()])*t
Sx = tank_model.Meshes['MSH1'].max_shear('Qx')*t
Sx = max([element.membrane(element.width()/2, element.height()/2)[0, 0] for element in tank_model.Plates.values()])*t

# Check that the PyNite calculated values are within 5% of expected
# values.
self.assertLess(abs(1 - My_max/My_max_PCA), 0.05, 'Failed plate cylinder flexure test.')
self.assertLess(abs(1 - My_min/My_min_PCA), 0.05, 'Failed plate cylinder flexure test.')
# Check that the PyNite calculated values are within 8% of expected values. With a finer mesh the results are known to converge even closer, but 8% allows the model to run faster.
self.assertLess(abs(1 - My_max/My_max_PCA), 0.08, 'Failed plate cylinder flexure test.')
self.assertLess(abs(1 - My_min/My_min_PCA), 0.08, 'Failed plate cylinder flexure test.')
self.assertGreater(My_max, 0, 'Failed plate cylinder sign convention test')
self.assertLess(abs(1 - Sx/20000), 0.05, 'Failed plate cylinder hoop tension test.')

Expand Down

0 comments on commit 8bfd0e3

Please sign in to comment.