在ABAQUS中创建三维凸多面体Add a 3D convex hull in ABAQUS

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.

1 生成凸多面体数据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:

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

在这里插入图片描述
Then, you need 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.
需要生成点、边、面数据

2 生成凸多面体Generate convex hull in ABAQUS

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.

2.1 生成点

First, you need to create a part with reference point:
在这里插入图片描述
No position requirement for the reference point, I just create it at
(0.0,0.0,0.0), and then Suppress it:
在这里插入图片描述
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:
在这里插入图片描述
2.2 生成边
Click Menu bar: Shape->Wire->Point to Point, and add the first Chained wires:
在这里插入图片描述
在这里插入图片描述
Click “OK” and repeat this process until build the frame model:
在这里插入图片描述
2.3 生成面
Click Menu bar: Tools->Geometry Edit…, and in Geometry Edit box, Click Face->Cover edges. Select the edges and click “Done”:
在这里插入图片描述
Repeat until generate all faces.

2.4 生成体

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:
在这里插入图片描述
It’s done! In next section, I will use a real convex hull to generate this solid model with python script.

3 利用python自动生成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 (BR75e6.geo) and open it with Gmsh:
在这里插入图片描述
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:

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

在这里插入图片描述
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:
在这里插入图片描述
Here is the python script (RH74T3.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.
在这里插入图片描述
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.

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值