# Mesh Cylinder[{{0,0,0},{0,0,1}},1] with inner boundary x=y=0

In a meshed cylinder Cylinder[{{0,0,0},{0,0,1}},1] I need to specify DirichletConditions along x=y=0.

How to define such a 3D mesh with additional inner boundary?

Thanks!

• Not sure whether this works in 3D, but this should answer your question if it does: mathematica.stackexchange.com/questions/207285/… Mar 19, 2023 at 11:13
• @LukasLang Thank you, I have to try it out. Unfortunately I'm not able to mesh the line in 3D: ToElementMesh[Line[...]] Mar 19, 2023 at 14:34

ToBoundaryMesh[..., "IncludePoints" -> myAdditionnalPoints] seems to be the solution :

myAdditionnalPoints = Table[{0, 0, h}, {h, 0, 1, 1/50}];

boundaryMesh =
ToBoundaryMesh[Cylinder[{{0, 0, 0}, {0, 0, 1}}, 1],

boundaryMesh["Wireframe"["MeshElement" -> "PointElements"]]


Checking that the points are still there after full-meshing :

fullMesh = ToElementMesh[boundaryMesh]
fullMesh["Wireframe"["MeshElement" -> "PointElements"]]


• The solution is simple but it took me hours to find it ! Mar 19, 2023 at 16:00
• Looks good, thank you very much! Mar 19, 2023 at 16:07
• Unfortunately ther are no linelements: Cases[boundaryMesh["BoundaryElements"], Line[p_] :> p, -1] (*{}*) Mar 19, 2023 at 16:20
• I don't understand, Dirichlet conditions do not need some "LineElements" : Only PointElements are necessary Mar 19, 2023 at 16:23
• Thanks , I expected a line for the inner bc and a set of triangles outside. I will test the DirichletCondition. By the wayCases[boundaryMesh["BoundaryElements"], Point[p_] :> p, -1] gives {} too Mar 19, 2023 at 16:28