I would like to specify a Dirichlet condition from a polyhedron defined by a set of points.
DirichletCondition[u[x, y, z] == 5, Region`RegionProperty[RegionBoundary[object], {x, y, z}, "FastDescription"][[1]][[2]]]
However, this part
Region`RegionProperty[RegionBoundary[object], {x, y, z},
"FastDescription"][[1]][[2]]]
doesn't work given the oddly shaped polygon given by RegionBoundary[object]
. I haven't been able to find out much about RegionProperty
or find out where I can find alternatives to "FastDescription"
.
Here is how I define object
:
center = {39, 19, 0};
objcoords = {{0.35744634112855245,
19.49760834744405}, {10.42305798361631,
19.4864491327628}, {12.243503729806417,
18.29241316186902}, {16.364505056976796,
18.11755617591872}, {18.196197885680288,
22.372731682760513}, {15.189009198663676,
24.589812823211748}, {0.2100041188046311, 24.861851631504276}, {0,
24.86}, {-61.5, 24.86}, {-61.5, 15.86}, {-5, 15.86}};
objcoords[[;; , 1]] = objcoords[[;; , 1]] - center[[1]];
objcoords[[;; , 2]] = objcoords[[;; , 2]] - center[[2]];
(*create 3D polygon from the coordinates*)
objTop =
Table[{objcoords[[i, 1]], objcoords[[i, 2]], 1}, {i, 1,
Length[objcoords]}];
objBottom =
Table[{objcoords[[i, 1]], objcoords[[i, 2]], -1}, {i, 1,
Length[objcoords]}];
object = ConvexHullRegion[Join[objTop, objBottom]]
Please could someone help me get a Dirichlet condition from a user-defined polyhedron/polygon?
Thank you in advance for any help you might be able to give me with this.
object
to be a region for your numerical solution? $\endgroup$