Hello,
I seem to have a problem importing a Netgen-generated mesh into Ngsolve for a PDE solution (Laplace eq. for capacitance calculation). I attached the files I used to generate the mesh: export.geo and export.py as well as the mesh file generated by those two files respectively: mesh.vol.gz and mesh_py.vol.gz
When I import mesh.vol.gz into the attached NGSpy script calculate.py (attached), none of the boundaries are imported with it and print(mesh.GetBoundaries()) produces (‘default’, ‘default’, ‘default’, ‘default’, ‘default’, ‘default’, ‘default’, ‘default’, ‘default’, ‘default’). This causes a problem for the calculation since I use Dirichlet boundary conditions on selected boundaries.
When I import mesh_py.vol.gz into the same calculation script calculate.py, everything shows up correctly and I get the following list of boundaries (‘default’, ‘default’, ‘default’, ‘default’, ‘default’, ‘default’, ‘2’, ‘2’, ‘2’, ‘2’, ‘2’, ‘2’, ‘1’, ‘1’, ‘1’, ‘1’, ‘1’, ‘1’)
The reason I can’t generate the mesh in NGSpy is that I need extruded polygons in the structure and the Python interface cannot extrude polygonal curves, only splines, and that doesn’t work for my structures.
If someone can please point me to a solution for the above problem I would very much appreciate the help. I suspect there is a simple mistake somewhere but cannot find it.
Thanks very much,
Valery
https://ngsolve.org/media/kunena/attachments/1538/calculate.py
https://ngsolve.org/media/kunena/attachments/1538/export.geo
https://ngsolve.org/media/kunena/attachments/1538/export.py
https://ngsolve.org/media/kunena/attachments/1538/mesh.vol.gz
https://ngsolve.org/media/kunena/attachments/1538/mesh_py.vol.gz
Attachment: calculate.py
Attachment: export.geo
Attachment: export.py
Attachment: mesh.vol.gz
Attachment: mesh_py.vol.gz