gpt4 book ai didi

2d - gmsh 中的重复结构化表面/网格

转载 作者:行者123 更新时间:2023-12-03 09:02:38 26 4
gpt4 key购买 nike

我正在尝试从 gmsh 中的简单几何形状构建大型结构,并且我想使用结构化(四边形)网格。我首先创建该形状,然后根据需要经常复制和翻译它以构建我的最终结构。

问题是,即使我将原始形状的线和面定义为超限的,一旦我复制并翻译它,这个属性就会丢失。检查正方形的示例代码:

Point(1) = {0, 0, 0, 1};
Point(2) = {0, 1, 0, 1};
Point(3) = {1, 1, 0, 1};
Point(4) = {1, 0, 0, 1};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line Loop(5) = {1, 2, 3, 4};
Plane Surface(6) = {5};

Transfinite Line {1, 2, 3, 4} = 10 Using Progression 1;
Transfinite Surface {6};
Recombine Surface {6};

Translate {0, 1, 0} {
Duplicata { Surface{6}; }
}

我获得了带有结构化网格的原始正方形,但复制的正方形没有此属性。当我复制表面时是否可以保留结构化网格?

EDIT: It seems that there is indeed no possibility to duplicate a structured volume or surface. The problem is that these properties are directly related to the mesh itself and not the geometry. And the mesh cannot be duplicated.

最佳答案

这是可能的。

您可以使用 GMSH Geometry.CopyMeshingMethod 属性来负责复制复制或平移几何实体的网格划分方法。默认情况下,它是关闭的。要打开它,您只需将以下行添加到 GEO 文件的开头即可。

Geometry.CopyMeshingMethod = 1;

现在,比较一下:

enter image description here

在 GMSH 3.0.5 上测试,但应该适用于任何现代版本。

关于2d - gmsh 中的重复结构化表面/网格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49197879/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com