Skip to content

a python library for the simplest finite element analysis.

License

Notifications You must be signed in to change notification settings

MuTong320/NaiveFea

Repository files navigation

NaiveFea

A simple python library for 2D finite element analysis.

You can learn how to use it by example.ipynb and example_nonlinear.ipynb.

  • Linear and nonlinear elasticity;
  • Easy to calculate and plot user-defined showing data;
  • Support multiprocessor;
  • Plot mesh, undeformed, and deformed figure, where magnificient of deformed figure can be calculate automatically.

Pre-processing

Plot figure of mesh and restirct condition

mesh plot

restrict plot

Solving

Solving a FEA problem within 8 lines.

mesh=meshio.read('abaqus_mesh.inp')
fea=LinearFea(mesh)
material=LinearElastic(E=10.0,nv=0.3)
fea.uniform_material(material)
fea.set_deform_conditions('fix',Uxy=[0,5,10,15,20])
fea.set_force_conditions({14:(0.001,0)})
fea.submit()
fea.plot('stress','S12')

Post-processing

Easy to plot figures.

deform mesh plot

Ux plot S12 plot

Result of two material fea

Ability to solve multi material problem.

e11 plot


Mark

This project is a teaching material for students who want to implement FEA with Python in a post on Chaoli forum (in Chinese):

Theory document of linear finite element analysis (in Chinese)