sewkokot / opsvis

OpenSeesPy postprocessing and plotting module
GNU General Public License v3.0
35 stars 21 forks source link

Example "demo_cantilever_3el_3d.py" with ElasticTimoshenkoBeam element #41

Closed juancaFS closed 1 year ago

juancaFS commented 1 year ago

Hello, in the example "demo_cantilever_3el_3d.py" I tried to replace the elasticBeamColumn elements with the 3D ElasticTimoshenkoBeam element just for check it, but the command opsv.plot_model() did not work for this 3D element. I just modified in the code: ops.element('ElasticTimoshenkoBeam', 1, 1, 2, E, G, A, J, Iy, Iz, A, A, gTTagz) ops.element('ElasticTimoshenkoBeam', 2, 2, 3, E, G, A, J, Iy, Iz, A, A, gTTagx) ops.element('ElasticTimoshenkoBeam', 3, 3, 4, E, G, A, J, Iy, Iz, A, A, gTTagy)

Run in VSCode Python 3.9.13 Openseespy 3.4.0.5 Opsvis 1.0.21 demo_cantilever_3el_3d.zip

sewkokot commented 1 year ago

@juancaFS Thank you for the bug report. Please update the package and let me know if it works.

juancaFS commented 1 year ago

@sewkokot Thank you for your answer. I noted that in settings.py and model.py of this last update there are now the ELE_TAG corresponding to the ElasticTimoshenkoBeam in 2D. I tried using this element in the 2D example "demo_portal_frame.py" and it works very good. Shear force diagram using elasticBeamColumn elements: Figure_6 Shear force diagram using ElasticTimoshenkoBeam elements: Figure_6_Timo

However, my initial comment was regarding the ElasticTimoshenkoBeam element in 3D which still does not work with this update.

sewkokot commented 1 year ago

For me the current opsvis version works with the ElasticTimoshenkoBeam element in 3D (both for plot_model and plot_defo as well as for section force diagrams). Do you have the following lines in both model.py and defo.py files?

if (ele_classtag == EleClassTag.ElasticBeam3d
            or ele_classtag == EleClassTag.ForceBeamColumn3d
            or ele_classtag == EleClassTag.DispBeamColumn3d
            or ele_classtag == EleClassTag.ElasticTimoshenkoBeam3d):
juancaFS commented 1 year ago

Thanks for your reply. Yes, I have those lines since I just updated with the recent opsvis version 1.0.23 but still I get the message: opsvis

sewkokot commented 1 year ago

@juancaFS, I work on the locally compiled OpenSees sources which include the following fix for the ElasticTimoshenko3d element

https://github.com/OpenSees/OpenSees/commit/5610504a5c7f44c72f4798c6c1b17c3bcd513ce4

The current openseespy pip package does not include this commit and therefore produces errors for opsvis.

You can see that plot_model(local_axes=False) works, but other 3d opsvis commands (e.g plot_defo) fail for the ElasticTimoshenko3d element. We have to wait for the update of the openseespy pip package (https://github.com/zhuminjie/OpenSeesPy/issues/103#issuecomment-1411308391).

juancaFS commented 1 year ago

OK, thank you for your explanation.