Abaqus 3D convex hull creation

SIMULIA Convex hull is the smallest envelope that contains the points set. It is used to construct the grain in grain-based model. There are several methods to generate the convex hull data, but it may need some efforts if you want to put it into ABAQUS model. Here, I post a simple method which is suitable for programming.

Generate convex hull data

Several methods can be used to generate the convex hull data. I am used to generate the convex hull data with my own code. But if you do not like write code, you can use Mathematica or Matlab to generate the data.

For example, in Mathematica, you can use following code to generate a 3D convex hull,

1
2
pts = RandomReal[{-1, 1}, {20, 3}];
ConvexHullMesh[pts]

3D convex hull

Then, you need to do some extra work to get the detail of this convex hull.  To generate the convex hull in ABAQUS, you need to save the points, edges and faces information to file.

Generate convex hull model

Unlike Ansys, it is hard to manipulate the points and lines in ABAQUS. Here is a simple method to generate a polyhedron in ABAQUS with GUI.

First, you need to create a part with reference point,

Reference point

No position requirement for the reference point, I just create it at $(0.0,0.0,0.0)$, and then Suppress it,

Suppress

I just need a blank part, but you cannot create a part without setting geometry in it. Now,  let us create some Datum points in this blank part,

Datum points

Click Menu bar: Shape->Wire->Point to Point, and add the first Chained wires,

Wire feature

Datum plane

Click “OK” and repeat this process until build the frame model,

Frame

Click Menu bar: Tools->Geometry Edit…, and in Geometry Edit box, Click Face->Cover edges. Select the edges and click “Done”,

Create plane

Repeat until generate all faces. Now, we should turn these faces into a solid model. Click Menu bar: Shape->Solid->From Shell. Select all faces and press “Done” to generate the solid model,

Convex

It’s done! In next section, I will use a real convex hull to generate this solid model with python script.

Python script to generate

As we known, we can use python script to do everything in ABAQUS. But it is much difficult to generate this convex hull without some human recognition in model building process.

The example is a Gmsh model, you can download (3DConvexHull1.geo) and open it with Gmsh,

Geo file

This model is generated by Voronoi algorithm, and formatted into a Gmat file. Before we start, you should note that ABAQUS will change the line featureName and index in entire process. Normally, we could get the Lineloop from convex hull data or Gmsh data. For example,

1
Lineloop(1) = {1, 2, 3, 4, 5}

Line loop

That means the first face is constructed by 5 lines. So, if we know the lines number, we could mark these lines and use them to generate the face. But how to mark these lines in ABAQUS is a big problem. At the beginning, I generate all lines in ABAQUS and use their featureName which is one of the members of Edge object to mark them, Such as “Wire-3”->3. But, when the first face is generate, the featureName of “Wire-3” is turned into “Cover edges-1”. So I use another member variable: pointOn to mark these lines.

Now let us try to turn it into a python script. The following figure shows the basic idea,

Flowchart

Here is the python script (3DConvexHull2.py) to turn a convex hull into a solid model in ABAQUS. Note that this python script is generated by C++, but it provides a basic approach to generate the convex hull automatically.

3D convex hull

Gmsh could generate the ABAQUS inp file or step file if you have a geo file. But if you want to control the model precisely, such as grain-based model, you need this method to generate your own model.