From finite element to Unity - from abaqus mesh model file to Unity model data

From finite elements to Unity

1. From finite element to Unity - Export and analysis of finite element mesh information
2. From finite element to Unity - Unity mesh programming
3. From finite element to Unity - from abaqus mesh model file to Unity model data



Preface

  The previous article roughly talked about what Unity's grid programming is and how to implement it. This article continues the previous content and explains how to convert the grid information exported by Abaqus into grid model data in Unity, and use grid programming to method to reconstruct the finite element mesh.


1. Use triangle patches to represent different unit types

  As mentioned earlier, the model in Unity is based on points and triangles. Therefore, to use the Abaqus grid information to reproduce the grid model in Unity, it is necessary to split the units into small grids composed of triangular faces based on its units, and then completely construct the original model.
  Volume mesh element types generally include tetrahedron, hexahedron, wedge, and other second-order elements. For second-order units, if all nodes of the second-order unit are considered, the number of vertices and patches of the mesh constructed in Unity will be several times higher than that of the first-order unit. During the rendering process, both memory and performance The overhead will put a lot of pressure on the computer; in addition, if you only perform intuitive visual rendering in Unity instead of precise analysis and description, the author believes that treating the exported second-order unit as a first-order unit can also meet the needs. Therefore, this article takes a unit as an example to elaborate.

1. Tetrahedron

  We learned about the composition of different units from the previous node composition of different unit bodies . For a tetrahedron, its composition is as follows:
Tetrahedral unit composition  a tetrahedron is composed of four nodes and four triangular faces. In the previous article, Unity grid programming defined the vertex coordinates of the component units and the triangular facet construction sequence. The vertex coordinates are the node coordinates, and the patch construction sequence is defined in the following table:

triangle patch id Vertex 1 Vertex 2 Vertex 3
1 1 2 3
2 2 4 3
3 1 3 4
4 1 4 2

2. Hexahedron

Hexahedral unit composition  The definition of a hexahedron is consistent with the previous cube form. The patch construction sequence is defined in the following table:

triangle patch id Vertex 1 Vertex 2 Vertex 3
1 1 2 3
2 1 3 4
3 1 5 6
4 1 6 2
5 1 4 8
6 1 8 5
7 7 6 5
8 7 5 8
9 7 8 4
10 7 4 3
11 7 3 2
12 7 2 6

3. Cuneiform body

wedge-shaped unit  Similarly, the triangular facet of a wedge can be defined as follows:

triangle patch id Vertex 1 Vertex 2 Vertex 3
1 1 2 3
2 4 6 5
3 1 4 5
4 1 5 2
5 1 3 4
6 3 6 4
7 2 5 6
8 2 6 3

2. More complex model—Abaqus grid information

  Go back to the .rpt file of the finite element mesh information exported by Abaqus. Similarly, for the node information file, its content is relatively simple. To extract the grid vertex information is to extract the node coordinates before deformation or the node coordinates after deformation (select according to different visualization requirements, for details, see the article From Finite Element to Unity——Export and analysis of finite element mesh information ; as for the unit information file, the cylinder from the previous article is still used here.

Guess you like

Origin blog.csdn.net/flatrrow/article/details/132734703