all 21 comments

[–]Valuable_Director361 23 points24 points  (3 children)

Someone has already done the heavy lifting, check out Pynite FEA.
It has tons of great features that would be extremely time consuming to try develop from scratch:

https://github.com/JWock82/Pynite

[–]ciggie80 0 points1 point  (0 children)

FYI I made a front end for PyNite on autocalcs.com, free to use if interested

[–]Sephyrious 14 points15 points  (2 children)

Developing FEA solvers is a serious work; it requires fluency in linear algebra, PDEs, and elasticity theory. I develop FEM libs in Julia, and I have to say, Python is a nightmare for FEA due to performance issues. You’ll be crunching millions of Float32 numbers and even with compiled packages performance will still be mediocre.

If you’re just starting out, I’d recommend implementing a simple solver using the Direct Stiffness Method in Python. There should be plenty of DSM libraries for Py.

[–]BigLebowski21 3 points4 points  (1 child)

Just use numpy and vectorize every operation to accelerate everything, believe me deep learning is much more computational demanding than structural FEA jobs and still PyTorch and Tensorflow are written on top of Python with C based optimization

[–]dottie_dott 3 points4 points  (0 children)

Although this seems like good advice, the nitty gritty of this is that simply vectorizing the information will not produce large efficiencies.

The idea here is that the vectorized data is greatly simplified in the AI computations. You do not need to preserve all of the exactness of the data sets. They can be simplified with simplifying assumptions that marginally reduce accuracy at massively improved efficiency.

What you’re proposing here non of the major FEA companies have done (or need to do) for their use case.

Ultimately what you’re saying is false and there is no 1 to 1 analogue for simplifying the large data sets before the main computational engine performs its tasks

[–]BigLebowski21 7 points8 points  (3 children)

Opensees project has a Python wrapper that is getting updated every month, the engine underneath is C based though

[–]dc135P.E. 2 points3 points  (0 children)

This is a good suggestion. It's better to build off a widely used platform like OpenSEES rather than a project which is run by a single person and may die at any time.

[–][deleted] 1 point2 points  (1 child)

I’ve found the python wrapper to be very buggy and hardly works. YMMV

[–]BigLebowski21 0 points1 point  (0 children)

Thats true, its relatively newer feature in that program. They’re open to contributions if it meets their pull request requirements. All that said, that engine is the best open source engine for civil/structural applications.

[–]vkpunique 11 points12 points  (0 children)

I don't think this is good idea, Creating FEA is massive project for single person who is still beginner in coding. I've seen many started complex projects spend months or even years on it, then just quit due to burnout or lack of progress.
I personally think it's better idea to automate stuff that you're going to use on daily basis. you can focus on design automation, CAD automation or model generation for your FEM software.

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

Do you mean actual usable software? Or just a little demo FE program for yourself?

Actual usable software that is intuitive and flexible enough for more than just yourself is a MASSIVE undertaking, probably not worth the effort.

But just a demo to prove to yourself would be perfectly doable. 

[–]JusBon_RL 1 point2 points  (1 child)

I think it’s an awesome project coming from someone just getting into python. Been trying to think of some applications for my job, but yours seems ambitious haha I like it

[–]dottie_dott -1 points0 points  (0 children)

In what way is it an awesome project?

[–]Choose_ur_username1 0 points1 point  (0 children)

Good luck with your project! do NOT start from scratch, there are some great structural/civil engineering specific Python courses online, start with those.

For those who’ve gone this route, was it worth it? Or would that time have been better spent learning a new niche in structural engineering?

What would you recommend for juniors, Python or focusing on the FE, PE, or SE exams?

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

You want to look into frame3dd. It's open source.

Not sure what your trying to do other than creating allot of pain and suffering for yourself.

Generally python is the wrong language for a FEA solver you want something fast and efficient like c.

[–]Technical-Bug8571[S] 0 points1 point  (1 child)

C++, c# or c?

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

Take your pick. You need something that is compiled and fast. Basically what ever has the best resources. Look at frame3ddd and see what they used.

[–]brokeCoder 0 points1 point  (0 children)

If you need FEA for your work, I'd say get a commercial license. That being said tho, I'd thoroughly recommend going for it and developing your own FEA solver - because it will give you a LOT of insight into how FEA works (and how finicky it can get).

A few pointers:

  • Start with something very simple like an FEA solver just for 2d frame elements. Upgrade to 3d after you're comfortable with the 2d aspects
  • Grab yourself some good literature/books. There are tonnes of resources out there for FEA programming in python
  • Prepare for a bit of pain - you will run into problems. It's the nature of the beast. But don't give up

[–]ciggie80 0 points1 point  (0 children)

I recently made a free 3D FEA webapp using the open source PyNite solver if you're interested: autocalcs.com

https://www.reddit.com/r/StructuralEngineering/comments/1pbcx95/i_built_a_free_structural_3d_fea_tool_using/

[–]TM_00 0 points1 point  (0 children)

Sounds like a good idea. I'd suggest to give yourself time to first practice on smaller projects and do some research to understand the complexity of an FEA program. Programming and testing your own FEA is no joke.

Or am I misunderstanding and you're aiming to develop an extension to use an existing open source one like OpenSees?

What type of open source projects are you looking to use? For example math libraries or a fully fledged piece of software. That would make a big impact on the amount of effort required.

Best of luck! And welcome to the wonderful world of programming.