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

Some queries #6

Open
AlexGriffiths526 opened this issue Dec 5, 2022 · 4 comments
Open

Some queries #6

AlexGriffiths526 opened this issue Dec 5, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@AlexGriffiths526
Copy link

Hello,
Firstly I really like your library. The simplicity of doing simple hand calculations is perfect. I am relatively new to python so I apologise if the queries are simple.

  1. Is it possible to output key (peak) values from the bending moment/shear force diagrams as numerical values? I have read through the documentation but could not see an option of extracting, for example, the peak. It may also be good to have these as a label on the plot outputs.
  2. I noticed in the documentation there is a parameter 'scale' I presumed this was to change the size of the plot but on testing different values I can't seem to change the size of the output plot. Can you clarify what the scale parameter is used for and how one would change the size of the plot output?
@cslotboom
Copy link
Owner

Hey Alex! Thanks for your comment, glad it's been useful. Yes you can - you can use Mmax and Vmax to return the values. See example below. Agreed about the labels, it would be great to have local peak information on the plot. I'll see what I can do there.

The scale parameter is used to scale the "y" values of the plot - basically the vertical scale. I may need to document this better.
Right now the best way to change the size of the plot would be to modify the matplotlib fig/ax returned by the plot functions. See below. I will think about if there is a 'cleaner' way of doing this, perhaps by passing in kwargs to the plot functions..

beam = ps.EulerBeam()
beam.addVerticalLoad(0, -5)
analysis = ps.OpenSeesAnalyzer2D(beam)
analysis.runAnalysis()

#max Moment/Shear values
beam.Mmax
beam.Vmax

# different size plots
fig, ax, _ = ps.plotMoment(beam, scale = -1/kN, yunit = 'kNm')
fig.set_size_inches(8.5, 5.5)

@cslotboom cslotboom added the enhancement New feature or request label Dec 6, 2022
@cslotboom cslotboom self-assigned this Dec 6, 2022
@cslotboom
Copy link
Owner

@AlexGriffiths526 I believe this is closed, but let me know if this solution worked for you or is still ongoing.

@akkypat
Copy link

akkypat commented Sep 13, 2024

Hello!
I am writing a calculator for solving problems in mechanics. I want to compare your values with mine. I can't find the information in the documentation information.
1)Can you tell me how to display the values on the graph and how to output the y values for the values of some x ?
2) Is it possible to shade the area under the graph?
An example is attached.
3) How to plot the result of the reactions of the supports Ra and Rb
Example1

@cslotboom
Copy link
Owner

Hey @akkypat

I'm going to move this conversation to the discussion page to keep things more focused here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants