Hi, I am trying to model a coil using the following Python script.
from ngsolve import *
from netgen.occ import *
from ngsolve.webgui import Draw
wp = WorkPlane(Axes((0,0,0), n=(-1, 0, 0),h=(0, 0, 1)))
t1 = 90+25.41
t2 = 90-25.41
wp.MoveTo(1.142,0).LineTo(1.142, 0.453432).Direction(0,1).Arc((0.122+0.060),t1)\
.LineTo(-0.038088,0.180828).Arc((0.122+0.060), t2)\
.LineTo(-0.142000,0.016432).LineTo(-0.142000,0)\
.LineTo(-0.020000,0).LineTo(-0.020000,0.016432).Direction(0,1).Arc(0.060, -t2)\
.LineTo(0.934257,0.507629).Arc(0.060, -t1)\
.LineTo(1.020000,0.453432).LineTo(1.020000,0).Close()
coil = wp.Face()
coil = coil.Extrude(Vec(0.122,0,0)).mat('coil')
mesh = Mesh(OCCGeometry(coil, dim=3).GenerateMesh(maxh=0.01)).Curve(2)
Draw(mesh)
If I change maxh to 0.02, the kernel dies, and an extremely fine mesh is generated at the corner of the coil connection, as shown in the attached figure.
Also if I change to .Curve(1), again the kernel dies.
If anyone knows of a solution, please advise me.