我正在尝试构建一个非常简单的网格。我有一个盒子:
box_size = 50;
lb = 10.;
Point(1) = {-box_size/2, -box_size/2, -box_size/2, lb};
Point(2) = {box_size/2, -box_size/2, -box_size/2, lb};
Point(3) = {box_size/2, box_size/2, -box_size/2, lb};
Point(4) = {-box_size/2, box_size/2, -box_size/2, lb};
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};
Extrude {0, 0, box_size} {
Surface{6};
}
这很有效,gmsh很乐意(3D)对它进行网格划分。 问题是我要确保框内的某些点是节点。所以我的问题是,我如何确保积分,比如这些
lc = 10;
Point(5) = {7.150548, 1.000000, -6.990684, lc};
Point(6) = {-4.438894, 1.000000, -8.960816, lc};
Point(7) = {-9.893936, 1.000000, 1.452595, lc};
Point(8) = {-1.675894, 1.000000, 9.858569, lc};
Point(9) = {8.858176, 1.000000, 4.640336, lc};
Point(10) = {1.675894, 4.750000, -9.858569, lc};
Point(11) = {-8.858176, 4.750000, -4.640336, lc};
Point(12) = {-7.150548, 4.750000, 6.990684, lc};
Point(13) = {4.438894, 4.750000, 8.960816, lc};
Point(14) = {9.893936, 4.750000, -1.452595, lc};
Point(15) = {7.150548, 8.500000, -6.990684, lc};
是网格的一部分吗?
我需要这个的原因是我需要在这些特定点强加边界条件。
如果在其他软件中这更容易,我也很乐意改变。我希望有人可以提供帮助。
提前谢谢。
答案 0 :(得分:3)
相当晚的回答,但无论如何它可能会有所帮助。如果Point的索引是p并且其中一个体积或曲面是q,那么:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim CheckCells As Range
Dim ChangedCell As Range
Set CheckCells = Intersect(Me.Columns(10), Target)
Application.EnableEvents = False
If Not CheckCells Is Nothing Then
For Each ChangedCell In CheckCells.Cells
If Len(ChangedCell.Value) > 0 And WorksheetFunction.CountIf(Me.Range("dropdown"), ChangedCell.Value) > 0 Then
ChangedCell.Value = WorksheetFunction.VLookup(ChangedCell.Value, Me.Range("dropdown").Resize(, 2), 2, False)
End If
Next ChangedCell
End If
Application.EnableEvents = True
End Sub
或者如果它在Surface上:
Point{p} In Volume {q};
答案 1 :(得分:-1)
我认为唯一的选择是将结构分开,使得它们以你的点为特征并在此之后对结构进行网格化。现在,您可以在物理点或物理线上应用载荷和条件。
示例:如果您想要网格化的立方体。边界条件位于中心的平面上,然后在该平面上划分立方体。使飞机成为一个物理实体,即物理表面(14)= {中间数字}。这一切都很好,你很高兴!