u-anurag / OpenSeesPy

OpenSeesPy-Visualization: This branch is to work on Plotting commands to Python-based visualization of OpenSees models.
https://openseespydoc.readthedocs.io/en/latest/src/Plotting_Development_Guide.html
5 stars 2 forks source link

Fixing a bug #93

Closed volkanozsarac closed 4 years ago

volkanozsarac commented 4 years ago

Dear Anurag,

Please consider accepting this minor revision, I fixed a minor bug and added few comments to make the function more clear. Moreover, you can find comparisons of mass participation ratios for 2d and 3d models (against SAP2000 and Seismostruct) in the following: https://github.com/volkanozsarac/ModalAnalysis-OpenSeespy/tree/master/Test

If you agree with these verification exercises let me know. Cheers, Volkan

u-anurag commented 4 years ago

@cslotboom Would you take a look at the tests?

cslotboom commented 4 years ago

Hey, the examples seem good!!

Two things:

SAP2000 Integrated Finite Element Analysis and Design of Structures, Verification Manual, Computers and Structures, 1997. Example 1. and seismo-struct (Example 10)

The pytest functions should look something like this:


def test_ModalAnalysis_2D():
    import openseespy.opensees.postprocessing as ops

    ....
    Your example code goes here
    ....

    yourResults = ops.ModalAnalysis(numEigen, outname='OpenSeespy', pflag=0)

    assert( YourResults == truevalue)

Once you have those up, I would run pytest, and confirm that everything is working on your end. If you're wondering how to do so, you can run the following commands in anaconda prompt:

cd C:\Path\To\The\TestDirectory

pytest

volkanozsarac commented 4 years ago

@cslotboom All right, the example I had earlier for 3D case, was made up example, I used just to illustrate that the function works with the distributed element masses. I added another 3D example and the associated reference for the model. Running pytest, I did not encounter any problem. PS. At the moment, the function cannot be used to calculate mass participation in rotational excitation directions.

cslotboom commented 4 years ago

Hey, the tests look pretty good. Once it is merged I'll do a check to see if it is working on my end.

PS. At the moment, the function cannot be used to calculate mass participation in rotational excitation directions.

This would be a good thing to include in the documentation, maybe with a explanation of why.

u-anurag commented 4 years ago

@cslotboom Thanks for reviewing it. I'll merge.

volkanozsarac commented 4 years ago

This would be a good thing to include in the documentation, maybe with a explanation of why.

@cslotboom sure, I may try to provide something short if you guys need. At the moment, I am not sure which reference point is ideal to use to obtain influence vectors in case of rotational excitation directions (center of mass, center of rigidity etc.). For example, SeismoStruct and SAP2000 yields different results in case of rotational excitation directions, I guess this is due to choice of different strategies in calculation of influence vectors.