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

Addtional Plotting/DataAnalysis Tools in OpenSeesPy #33

Closed
cslotboom opened this issue Jun 12, 2020 · 7 comments
Closed

Addtional Plotting/DataAnalysis Tools in OpenSeesPy #33

cslotboom opened this issue Jun 12, 2020 · 7 comments

Comments

@cslotboom
Copy link

I was a little nervous to create a pull request, but I've recently published some tools that can be used to animate and plot OpenSeesPy models, as well as do some data analysis:
https://github.com/cslotboom/OpenSeesPyTools

For my model plotting functions, I've used the original plot function from @u-anurag as a base.

I'd be happy to contribute any of this code to base package, or collaborate with people using them. However, I'm not sure how receptive people are to changes in the existing plot functions. I'm also not sure what the appetite is for non plotting functions. Either way, I just thought I would get the ball rolling.

Some notable comments:

  • For model animations, I use an helper function to shift all displacement into an "animation frame domain" before running the animation function. For earthquakes, this creates much smaller file sizes, and every animation frame will have the same time interval between them. All animations data is read from files.
  • In the current "Get_Rendering" plotting files, all three existing plotting functions (basic model, mode shape, displacement) use basically the same code, with some small permutations. From a maintenance standpoint, this might not be ideal. To avoid this, I use a single function, 'update_Plot_Disp' call to plot the functions - every other function just calls that function with the deformation to be plotted.
  • Things like updating view-port size is also done with standardized functions, to avoid repeating code.
  • I use a style object to change the appearance of the charts. The user can also import a custom custom "StyleSheet" to modify the plot appearance.
@u-anurag
Copy link
Contributor

These functions look good. You are most welcome to create a pull request to add to the plotting functions or make the existing functions more efficient. There is PR #32 to reduce code repetition within the functions. I am working on documentation explaining what is going on inside the Get_Rendering library so others can easily modify it.

Also, how do you handle plotting mode shapes in OpenSeesPyTools? I couldn't see it in the functions.

@zhuminjie
Copy link
Owner

Thank you for contributing the codes. Just as @u-anurag said, you are very welcome to send PR with the source, documentation and examples. If two of you can have a conversations about how to merge your tools in the existing functions, it would be perfect.

For now, there isn't any tests setup for plotting functions. We may have to do it in the future. Thank you so much. I can't wait to see these plots.

@cslotboom
Copy link
Author

@u-anurag
Right now there isn't one, but it would be a easy add - it's just a matter of getting the mode shape with a function and using that as the displacement with the displacement plot.

@zhuminjie / @u-anurag
Where would be the best place for us to have that conversation? Here, or on #32?
I think ideally it would be somewhere public, for the sake of future developers.

@zhuminjie
I agree, it's probably a good idea to have a few test cases with a known output! Not sure where that would go in the existing repository.

@u-anurag
Copy link
Contributor

@cslotboom You can continue the public discussion on #17. Also, I have documented and tried to explain the working of Get_Rendering library in PR zhuminjie/OpenSeesPyDoc#190.

Please go through the code and see if you can add the animation function in it. Feel free to ask questions/discuss in #17.

@zhuminjie
Copy link
Owner

@u-anurag Thank you for initiating the discussion.

@cslotboom There are already tests in this folder

https://github.com/zhuminjie/OpenSeesPy/tree/master/openseespy-pip/openseespy/test

If you want, you add a new test file with name test_filename.py in that folder.

@cslotboom
Copy link
Author

cslotboom commented Jun 28, 2020

@zhuminjie - I'm wondering if you know of a way that section geometric information can be returned via a command.
At some point, I'd love to be able to thicken elements.

@zhuminjie
Copy link
Owner

I saw you have posted on the OpenSeesPy Forum. I am going to close this one.

zhuminjie pushed a commit that referenced this issue Oct 10, 2023
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

3 participants