How to divide a region in FEM with a parametric curve?

I'm using NDSolve with finite element to try to solve a heat transfer problem. The region I have is a rectangle where the four vertices are at (-0.5,0), (0.5,0), (0.5, 3), (-0.5,3). The rectangle is divided into two regions (different thermal conductivity) by a parametric curve y=1-0.1*Cos[2*pi*x], where -0.5<=x<=0.5. There is an example similar to this case in the official documentation using ToBoundaryMesh, but the region is divided by a straight line, not a curve. I also tried something like

ir = ParametricRegion[{t, 1 + \[Delta] Cos[2 \[Pi] t]}, {{t, -0.5, 0.5}}]
coords = DiscretizeRegion[ir]


But then I'm not sure how to supply the coordinates to ToBoundaryMesh or other functions.

How can I generate the mesh for use in NDSolve?

Maybe this will get you started:

(* If you do not have the FEMAddOns installed get then with: *)

Needs["FEMAddOns"]
(* Create Regions *)
dom = Rectangle[{-0.5, 0}, {0.5, 3}];
bot = DiscretizeRegion@
ImplicitRegion[(-0.5 <= x <= 0.5) && (0 <= y <=
1 + 0.1 Cos[2 \[Pi] x]), {x, y}];
bmesh1 = ToBoundaryMesh[dom];
bmesh2 = ToBoundaryMesh[bot];
bmesh = BoundaryElementMeshJoin[bmesh1, bmesh2]
bmesh["Wireframe"]


• I think this is a good approach. Apr 8 '20 at 8:15
• If I want to apply periodic boundary condition to the left and right sides (x=-0.5 and x=0.5), do I need to specify anything in the mesh generation stage, or do I just specify that in side NDSolve`? I'm not sure if the generated mesh on the two sides actually match. Apr 8 '20 at 18:11
• @Physicist I don't think Mathematica requires a 1 to 1 nodal correspondence for PeriodicBCs as other codes do. Apr 8 '20 at 19:26