Dear Christopher,

Thank you for your theoretical Comments!

Your comment helped me a lot.

I understand that implementing `u * grad(v) = 0`

requires some ingenuity.

Because `a += SymbolicBFI(u*grad(v))`

will raise the error `NgException: Dimensions don’t match’. I need to study electromagnetics further.

I found other two important points by your comments.

- I am interested in the mathematical meaning of the coefficient in front of “nu”.

The following tutorials almost cancel out “nu”, where nu=7.96e5.

```
a += nu*curl(u)*curl(v)*dx + 1e-6*nu*u*v*dx
```

```
a += 1/(mu0*mur)*curl(u)*curl(v)*dx + 1e-8/(mu0*mur)*u*v*dx
```

```
a = BilinearForm(1/mu*curl(u)*curl(v)*dx+1e-6/mu*u*v*dx)
```

However, the following command in my application gives me good results for the A.

```
a += nu*curl(u)*curl(v)*dx + nu*u*v*dx
```

- The mesh of a coil area to be contour-integrated must be fine enough.

This is because the mesh on the line to be contour integrated must be fine enough to represent A.

- Not good mesh. Because mesh around the inside of the cross-section of the coil isn’t fine.

```
def makeCoil_NotGood(radius:float, width:float, height:float, p=(0,0,0)):
p_out = (0+p[0], -height/2+p[1], 0+p[2])
coil = Cylinder(p_out, Y, r=radius+width/2, h=height) - Cylinder(p_out, Y, r=radius-width/2, h=height)
dr = 2*math.pi*radius / 720
coil.maxh = dr
coil.mat('coil')
coil.faces.col = (1,1,0)
return coil
```

- Good mesh. Because mesh around the inside of the cross-section of the coil is fine.

```
def makeCoil(radius:float, width:float, height:float, p=(0,0,0)):
p_out = (0+p[0], -height/2+p[1], 0+p[2])
coil = Cylinder(p_out, Y, r=radius+width/2, h=height) - Cylinder(p_out, Y, r=radius-width/2, h=height)
#######################################
# inside of cross section of the coil
dr = 2*math.pi*radius / 720
p_in = (0+p[0], -dr/2+p[1], 0+p[2])
coil_in = Cylinder(p_in, Y, r=radius+dr/2, h=dr) - Cylinder(p_in, Y, r=radius-dr/2, h=dr)
coil_in.maxh = dr
coil = Glue((coil, coil_in))
#######################################
coil.mat('coil')
coil.faces.col = (1,1,0)
return coil
```

I would be glad if you could point out any errors in my suggestions, or a better way than the suggestions.

I hope that useful information will be posted on this forum and that the number of NGsolve users will continue to grow.

Best,

Daigo