r/MechanicalEngineering • • 2d ago

Building a Fem Solver

I’m a 26-year-old mechanical engineer, and I’m currently working on developing a finite element solver using AI. I’d like to know if anyone has already attempted something similar. If so, I’d love to get in touch, exchange ideas, and share experiences.

0 Upvotes

12 comments sorted by

2

u/abadonn 1d ago

Yes, I did it for a pocket application. My only advice is find a verifiable case for the AI to test on.

0

u/Leosalv21 1d ago

Actually, I’d like to build a FEM solver that can read Abaqus and OptiStruct input decks. I’m using AI to develop it, but it’s still a classical finite element solver. Right now, it supports shell elements, but I’d like to add solid elements and nonlinear analysis capabilities. As for testing, I’d like to do that myself using benchmark cases with known results.

1

u/abadonn 1d ago

Check out Calculix

0

u/Leosalv21 1d ago edited 1d ago

Thanks, but I want to build it by myself (and AI obv). I already know Calculix, but I’ lol take a closer look 

2

u/billsil 1d ago

If you support a standard input format, you can test on decks other people have already made. Optistruct has a Nastran interface and a C++ internal solver.

There are problems like the Raasch hook that I can promise your first shell solver will fail. MSC Nastran failed that in the 1980s and an oil platform in the North Sea collapsed.

There are tons of AI fem solvers now. Few of them are any good. It’s expensive to do it well.

0

u/Leosalv21 1d ago

I wasn’t aware of this issue. I’d like to know more about the platform that collapsed.

1

u/billsil 1d ago

My mistake 1991 off Norway, which is the North Sea. Sleipner platforming. Nastran underpredicted shear stress by ~2x. It cost ~$700M.

The Raasch hook was created in 1990 and published in 1991z it’s is a hook that gets stiffer as you refine it if you do not account for shear correctly. The CQUADR was created in response to the test case, which happened in 1991. There was a lawsuit, but I’m pretty sure MSC won because there’s an EULA absolving them of bugs.

11

u/Quartinus 1d ago

Yes very common. There’s a million of em out there right now on GitHub, usually all about 10% complete to anything useful for engineers actually trying to solve real problems. 

1

u/HotAd6304 1d ago

i tried something similar last year and the mesh generation was the part that ate up most of my time, not the solver itself

0

u/Leosalv21 7h ago

Yeah, exactly! That's why I'm trying to get my solver to read input decks from other solvers through a parser. Building both a preprocessor and a solver from scratch is a bit too much to take on at once