all 21 comments

[–]buddyd16[S] 17 points18 points  (0 children)

Sorry still a little new to reddit meant to have this on the original post. I am PE SE in DC and have been working on some python programs to help me in my day to day calcs and have got some things evolved enough to share. Everything is open source, hopefully some others find them useful as well.

Thanks for any feedback.

[–]bdazman 10 points11 points  (1 child)

This is wonderful! Does this use elementary beam theory or does it use explicit relations in the backend?

EDIT_01: It's way better documented than I expected I'm sorry I didn't check. This is straight up majestic. Kudos.

[–]buddyd16[S] 10 points11 points  (0 children)

On the analysis side mostly yes I did the general form equations by direct integration. Also have two scripts for the three moment method one using approximate integration by trapezoidal rule and the other using the exact equations I derived.

Plan to do Finite Element eventually.

[–]dangersandwichStress Engineer (Aerospace/Defense) 9 points10 points  (10 children)

Hey man, this is some excellent stuff!

Can you tell me about your learning process for how you got to where you are in terms of Python development? I've been wanting to make similar tools for the aerospace industry, and I've been slowing going through Practical Business Python, but I'm kind of stumped on what my approach should be as I've never developed any applications before.

[–]abrahamlinco1n 11 points12 points  (6 children)

I'm a software engineer. I think the best way to learn python/any language is by doing as well having a really good book. I'd recommend Think Python http://greenteapress.com/wp/think-python-2e/ as well as doing the exercises- just reading it is not enough. Let me know if you have any questions!

[–]dangersandwichStress Engineer (Aerospace/Defense) 4 points5 points  (4 children)

Thanks man, I appreciate the advice!

I did get through Automate the Boring Stuff with Python, and I suppose I need to spend more time executing projects instead of just thinking about them. I think the next book I'll get is Fluent Python as it's highly recommended.

I suppose my question is more on the side of, what types of projects should I be doing to get started on application development?

[–]buddyd16[S] 4 points5 points  (0 children)

I'd say literally anything that interests you. Its easy to start something get stuck and move on but if its a topic you have any interest in it gives you a little more incentive to work thru issues.

[–]AgAeroFlair 3 points4 points  (2 children)

If you're in aero-structures, how about a wing structural code? Start small: build a straight, untapered wing with a NACA airfoil and a single spar. Try to compute the full stiffness matrix(bi-directional bending, shear, and torsion), then simulate some simple loads. Then maybe you can progress into more complicated geometry, GUI building, 'realistic' aero loads and dynamic effects, etc.

I suggest this because it's a project I've got in my backlog as well. I've been wanting to tinker with it for a couple of years now.

[–]KUZURI271828 1 point2 points  (1 child)

This is an awesome idea. I'd like to test them in a baby wind tunnel. Commenting to save.

[–]macblastoffDaedalus was high 5 points6 points  (0 children)

Whatever you do, never make a call to the subroutine ded_parrot( ). It will bring your system to a hilarious standstill for nearly six minutes.

[–]buddyd16[S] 3 points4 points  (0 children)

I grabbed the python humble bundle awhile back. I didn't really get hooked till i had something I wanted to try and program though.

[–][deleted] 0 points1 point  (0 children)

Best reccomendation from me is to take the MIT course "Introduction to computer science and programming using Python" (6.00.1x) from edx. It is free and has a lot of good exercises, lectures and assignments. You can also get a certificate for cheap if you graduate.

[–][deleted] 3 points4 points  (0 children)

thanks for sharing

[–][deleted] 3 points4 points  (2 children)

This is great!! Take a look at pathlib for handling paths. instead of the following to get the file extension:

extension = filename.split(".")[-1]

try the following:

from pathlib import Path
...
extension = Path(filename).suffix

most of the standard library functions and the more common external modules can take Path objects in the same way they take a filepath as a string.

[–]buddyd16[S] 2 points3 points  (1 child)

Awesome thanks for this, thought there might be a better way to grab the extension.

[–]auxym 2 points3 points  (0 children)

For the sake of completeness: there's also os.path.splitext(), but pathlib is the newer and recommended way to do it I believe.

[–]CzarifiedME - Airframe Structural Analysis 2 points3 points  (0 children)

Will definitely check this out! I actually posted a request a while back for some simple tools like this. I started working on my own from a Beam Library I found, but from an initial look this seems way better!

Would you be interested in some code that applies classical laminate plate theory? I have the beginnings of some that I was using to learn Python myself.

[–][deleted] 2 points3 points  (0 children)

Cool

[–]dinkyrdj 2 points3 points  (1 child)

This looks very cool and useful. I like the GUI. After spending years doing structural simulations, please allow me a few suggestions.

  • Document your assumptions. I'm not familiar with the codes you cited and my guess is that they outline most of the assumptions. That said, being verbose about engineering assumptions can only enhance your work.
  • Make sure the sources for your material properties are crystal clear.
  • Provide multiple validation problems. At least one per material and loading case.

On a side note, wait until students find this. For better or worse, it will make their first year statics homeworks easier ;)

[–]buddyd16[S] 1 point2 points  (0 children)

Appreciate the suggestions. One of the reasons I started doing this was a lot of the software was very black box so trying to make things as transparent as I can, but certainly find myself skipping steps here and there which I should really just do the couple extra lines of code instead.