Creating my own mesh format with Python - FEA fun learning project

preview_player
Показать описание
In this video, I am starting a fun learning project that will help you to understand better what is a mesh set and how to create one from scratch with Python!
You will learn:
- What a mesh set is composed of
- How to generate nodes
- How to use Delaunay triangulation to generate elements
- How to write all of that to a mesh file

There is plenty of room for improvement here and if you have some ideas on how to make it better, please let me know!

The final code is available here:

The plate with a hole post I am mentioning in the video is here:

You can leave your comments on the blog here:
Рекомендации по теме
Комментарии
Автор

Great job!
keep bringing more python video with FEA.

germanobastos
Автор

You could just do if x**2 + y**2 < r**2: pass or continue right before you append them to the list. If you have a circle try to loop through a parameter theta and use the eqs you used for x0, y0 to avoid element distorsion problems later on. Also use np.concatenate instead of append ;) Thanks for the video

alev
Автор

Man, you are awesome.
Currently I am learning to write cfd codes and your codes are amazing

roopakbaliyan
Автор

Amazing, please keep sharing information about FEA with python

jairogue
Автор

Your videos are of great inspiration. Um muito obrigado do Brasil!

Автор

Wow! Very interesting and helpful video! Thank you! 👍♥️

peterszalai
Автор

update:
# Find the elements which contain those points
ww = set(tri.find_simplex(p))
ww.remove(-1)
ww = sorted(ww)
# print(ww)

# Feed the result of the previous function to the np.delete method
# Create a new set of elements without the problematic elements
mesh = np.delete(tri.simplices, ww, 0)

remove : bad triangles

find : intersection G, with every triangle

every triangle : three lines (i, j, k)
1e) first line : i
2e) second line : j
3e) thrid line : k
when find with one of i, jk lines, you need to delete triangle from your database.
given equation : i, j, k form
y= y1+(y2-y1)/(x2-x1)*(x-x1)
side triangle given by two points
side : i, j,k
fist point : (x1, y1). second point: (x2, y2)
check : i ∩ ray m or j ∩ ray m or k ∩ ray m
find G point, delete triangle
math : y = r
repeat process for every triangle in the database.

ray : m

t: 0≤ t ≤ radius
r = tan(α)*t
range : 0≤ α ≤ pi/2, random value

new: 08/10/2022:python: how to create mesh from scratch with Python
corrected :part
download (python, txt) :correctedpartdelaunay
corrected :solution ?
download (geogebra, pdf) :delaunayconstr.pdf
download (geogebra, png) :delanauyconstraint

petervlasschaert
Автор

Hello, great job! Thank you. How about processing of stl/stp/dxf volumes (set of nodes in most cases) то FEM meshes? Can you say something about bad volumes and constructing meshes on it? What about mesh quality and degenerate elements? I hope to see something about this things in your next videos! :)

PanKOLBASKA
Автор

Great Video. Please Share more info with python.

rajinikanth
Автор

hi sir. please make a video on how to solve diffusion equation in complex geometry (cfd coding)

sriramulunakka
Автор

Hello Cyprien, I´m just checking out my own Salome Meca mesh "dat" files, and as I see, in the elements rows (after de nodal coordinates), there are "102", "203" and "304" numbers. You said that they are vertexes IDs, but I think that they´re just the identification of element types. Am I right? Thanks a lot!

sf_nog
Автор

please show as how to connect n number of stiffness matrix it would be great

ranam
Автор

Hello there I have question here
I have cooked ".Skeletal Mesh" file format of unreal engine games and of course it's not supported. Notice that even the same file format is actually supported by blender addon it will not work with the same format of different unreal game. Basically it is binary data and it can't be read by notepad. Do you have any idea to read and write new mesh binary files in blender as addon to import and export? I don't have any basic information about this specific format and it's data so how I can read it to Blender?

adrianmiszczuk
Автор

Is it related to mesh networks somehow?

viacheslavnovakovskyi
Автор

Great!
Could you teach us how to write a program that assembles their stiffness matrix to obtain the Global stiffness matrix?
Thanks in advance

austineadah
Автор

Nice work. Could you create your own file extension?

austineadah
Автор

I have a query. You have written a file, that contains node Id and its xyz, and element with its ID and connectivity of nodes. Can I read this files and create node and elements with this same connectivity instead of using Delaunay triangulation?. And also is it possible to create 3d body

aakashs
Автор

Hello, thanks for sharing. I would like to ask about structured or unstructured mesh. according to this project, is it included as a structured mesh?

neoengineer
Автор

Great job! Could you tell me a very good book to learn FEM analysis? Thanks

andreitanasache
Автор

How to add physical limit of the object to let it to simulate deformation ?

faktaagamabaik