I have used the ParametricPlot
to plot the sector of the disk and use Show
to combine them in one picture, however it cannot be converted to the region and cannot use the RegionUnite
, and cannot be meshed by ToElementMesh
, **so how to convert the plot to region and get the mesh later for FEM and boundary conditions indication?
The code and its results are as follows:
R1 = 4/100;
R2 = 7/100;
R3 = 8/100;
ToothNumber = 8;
SlotNumber = ToothNumber;
RectangleNumber = ToothNumber + SlotNumber;
betaSlot = Pi/8;
betaPole = 2*Pi/(ToothNumber) - betaSlot;
thetaInitial = Pi/12;
regionR2R3 =
ParametricPlot[{r Cos[theta], r Sin[theta]}, {theta, 0, 2 Pi}, {r,
R2, R3}];
region[n_] :=
ParametricPlot[{r Cos[theta], r Sin[theta]}, {theta,
thetaInitial + betaPole + (n - 1)*(betaPole + betaSlot),
thetaInitial + betaPole +
betaSlot + (n - 1)*(betaPole + betaSlot)}, {r, R1, R2}];
regionR1R2 =
Show[Table[region[n], {n, 1, ToothNumber}], PlotRange -> All];
regionAll = Show[{regionR1R2, regionR2R3}, PlotRange -> All]
The above code can plot the right region (But it is not in region format) and the output figure is as this:
The following code doesn't work:
RegionUnion[regionR1R2, regionR2R3]
\[CapitalOmega] = regionAll;
bounds = {{-R3, R3}, {-R3, R3}};
meshAll = ToElementMesh[\[CapitalOmega], bounds]
mesh = ToElementMesh[regionAll // BoundaryDiscretizeGraphics]; mesh["Wireframe"]
$\endgroup$