I'm trying to generate mesh for axial symetric heat transfer model. The model contains four regions build from four different kinds of materials.
Inside the steel component is empty air hole present.
I tried to join coordinates from every region, and then use ToBoundaryMesh with LineElement like technique below:
el = LineElement[{{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}, {7,
8}, {8, 1}, {2, 7}, {3, 6}}];
bmesh = ToBoundaryMesh["Coordinates" -> coord,
"BoundaryElements" -> {el}];
Show[bmesh["Wireframe"],
bmesh["Wireframe"["MeshElement" -> "PointElements",
"MeshElementStyle" -> Directive[Red, PointSize[0.02]],
"MeshElementIDStyle" -> Blue]]]
Unfortunately, It seems to be a little bit complicated way, besides I have a problem with an element containing an air hole.
Could you give me any advice how to do that? What is the best technic to solve this type of task?
I will be appreciated for any help.
Below defined polygons and graphics (pic) in order to you may see what I have tried to meshing.
ClearAll["Global`*"]
Needs["NDSolve`FEM`"];
mcr = Polygon[{{0.275, 0.095}, {0.398, 0.095}, {0.447, 0.308}, {0.447,
0.323}, {0.415, 0.323}, {0.415, 0.350}, {0.447, 0.350}, {0.447,
0.868}, {0.275, 0.868}, {0.275, 0.095}}];
betw = Polygon[{{0.398, 0.095}, {0.447, 0.308}, {0.447,
0.323}, {0.415, 0.323}, {0.415, 0.350}, {0.447, 0.350}, {0.447,
0.868}, {0.483, 0.868}, {0.483, 0.350}, {0.440, 0.350}, {0.440,
0.333}, {0.485, 0.333}, {0.485, 0.308}, {0.423, 0.095}}];
betz = Polygon[{{0.275, 0}, {0.620, 0}, {0.620, 0.772}, {0.528,
0.772}, {0.528, 0.588}, {0.513, 0.588}, {0.513, 0.308}, {0.449,
0.095}, {0.275, 0.095}}];
st = Polygon[{{0.528, 0.772}, {0.620, 0.772}, {0.620, 0.786}, {0.528,
0.786}, {0.528, 0.818}, {0.520, 0.818}, {0.513, 0.818}, {0.513,
0.868}, {0.483, 0.868}, {0.483, 0.350}, {0.440, 0.350}, {0.440,
0.333}, {0.485, 0.333}, {0.485, 0.308}, {0.423, 0.095}, {0.449,
0.095}, {0.513, 0.308}, {0.513, 0.588}, {0.528, 0.588}}];
air = Polygon[{{0.495, 0.608}, {0.513, 0.608}, {0.513, 0.798}, {0.495,
0.798}}];
steel = RegionDifference[st, air];
pic= Graphics[
{
{EdgeForm[Thin], LightBlue, mcr},
{EdgeForm[Thin], LightGray, betw},
{EdgeForm[Thin], LightGreen, betz},
{EdgeForm[Thin], LightYellow, steel}
},
PlotRange -> {{0, 0.7}, {-0.1, 1}}, Frame -> True
]
My join cooordinates problem...
coord = Join[MeshCoordinates@MeshRegion@mcr,
MeshCoordinates@MeshRegion@betw, MeshCoordinates@MeshRegion@betz,
MeshCoordinates@MeshRegion@steel]
likzew