Hi,
I’m trying to compute the magnetic field from a thin wire following this example Using BBND to compute the magnetic field of a thin wire
I get this warning when running the solver:
used dof inconsistency
(silence this warning by setting BilinearForm(…check_unused=False) )
Anyone that can see what I’m missing in the code? The code is attached.
square-coil-wire.ipynb (5.3 KB)
you can create the mesh now easier with netgen-occ:
square = WorkPlane().RectangleC(0.5,0.5).Face()
square.edges.name = "wire"
square.edges.Max(Y).name = "contact"
sphere = Sphere((0,0,0), 1)
sphere.faces.name = "outer"
sphere.solids.name = "air"
shape = Glue([sphere, square])
geo = OCCGeometry(shape)
mesh = Mesh(geo.GenerateMesh(maxh=0.2))
mesh.Curve(5)
Draw(mesh)
Think this should resolve this error.
Thanks! I just tried it and it works.
File attached.
square-coil-wire-occ.ipynb (9.1 KB)
1 Like