Vibe Coding a Hyperelastic FEA Solver From Scratch

How about vibe coding to build a finite element solver?

That’s exactly what I did. What started as a curious whim and with a series of sessions with Claude, I was able to build fully functional nonlinear
hyperelastic FEA solver in Python. A Total Lagrangian solver that reads commercial solver input files and handles rubber component simulations.

What it solves:
– Large-deformation hyperelasticity with constitutive models (Neo-Hookean, Mooney-Rivlin, Ogden).
– Near-incompressible formulation with hybrid u/p elements and static pressure condensation.
– Automatic Newton-Raphson with line search, adaptive time stepping, and increment cutback.

What makes it worthwhile:
– Rigid bodies with Rodrigues rotation kinematics.
– Tie constraints with direct DOF elimination.
– Frictionless contact with penalty method.
– Part assembly parsing with label offsets.

Performance:
– Parallel element assembly via ThreadPoolExecutor.
– Outputs files directly compatible with Pyvista and .vtu for ParaView visualization.

The software is 18 modules. No Fortran, no C++, and no commercial license required.

Overall some chinks are still there, will keep working on it.

#Abaqus #Ansys #FEA #FiniteElementAnalysis #Hyperelastic #Rubber #Python #AI