I want to create a 3D grid based on a 2D mesh, on the surface of which I want to assign point-marker for certain regions. The mesh created in the sample code is a fluidic Y-structure, at whose inputs (marker 4,3) and outputs (marker 2) I want to define corresponding Dirichlet boundary conditions.
As soon as I create the 3D mesh from the 2D mesh, all markers assigned in the 2D mesh are set to 0. After creating the 3D mesh, how can I add markers for the point markers at the inputs and outputs afterwards?
Thank you very much.
Needs["NDSolve`FEM`"]
coord = {{0., -25.}, {200., -25.}, {200., 25.}, {0., 25.}, {-75., 100.}, {-75., 75.}, {0., 0.}, {-75., -75.}, {-75., -100.}};
iID = {{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}, {7, 8}, {8, 9}, {9, 1}};
marker = {1, 2, 1, 1, 3, 1, 1, 4, 1};
(*2D-Boundary-Mesh*)
bmesh2D = ToBoundaryMesh["Coordinates" -> coord, "BoundaryElements" -> {LineElement[iID, marker]}]
bmesh2D["Wireframe"["MeshElement" -> "BoundaryElements", "MeshElementMarkerStyle" -> Blue]]
mesh2D = ToElementMesh[bmesh2D];
mesh2D["PointElementMarkerUnion"]
Show[mesh2D["Wireframe"], mesh2D["Wireframe"["MeshElement" -> "PointElements", "MeshElementMarkerStyle" -> Blue]]]
(*create 3D-Mesh*)
mesh = ElementMeshRegionProduct[mesh2D, ToElementMesh[Line[{{0}, {50}}], "MaxCellMeasure" -> 5.0]]
mesh["PointElementMarkerUnion"]
mesh["Wireframe"]
bcs = {DirichletCondition[{u[x, y, z] == 0, v[x, y, z] == 0.,
w[x, y, z] == 0.}, ElementMarker == 1],
DirichletCondition[p[x, y, z] == pIn1, ElementMarker == 4],
DirichletCondition[p[x, y, z] == pIn2, ElementMarker == 3],
DirichletCondition[p[x, y, z] == pOut, ElementMarker == 2]}