Please see the following tutorial.

http://www.comsol.com/model/computing-the-effect-of-fringing-fields-on-capacitance-12605

Also, feel free to contact our technical support team.

http://www.comsol.com/support

I’m trying to evaluate electric charge in a certain potential arrangement. My main domain is a big cylinder, where the bottom plane is ground, the other faces are zero charge/continuity and inside there are two sphere ‘electrodes’ where I can fix an electric potential. If I enclose these electrodes in a single gaussian surface, the value of the surface integral of es.normD changes with the size of the enclosing gaussian surface…

I’ve tried modifying the mesh size, using electric potential or surface charge on the electrodes, using an infinite element domain on the external wall of my main domain, but still the result I get from the integral changes with the size of the enclosing surface. Do you have any suggestions? How can I send you a file with the model so you can take a look?

Thanks ]]>

1. The variable ec.normJ is the L2 norm of the current density vector. This is usually not the same as the normal component of the same vector on a given surface. In the Electric Currents interface COMSOL actually stores the normal current density in another variable which is ec.nJ. So you can actually replace “nx*ec.Jx+ny*ec.Jy+nz*ec.Jz” with “ec.nJ” and try out again.

2. You are right about the negative sign. The only purpose of showing it in this blog is to highlight that in case you have created the cut plane in such a way that its normal vector points in exactly the direction, that is opposite of what you want, instead of trying to create another cut plane, you can simply type in the negative of the normal vector variables to obtain the desired direction. ]]>

and, secondly, the negative sign in “-(cpl1nx*ec.Jx+cpl1ny*ec.Jy+cpl1nz*ec.Jz)[1/mm]” is not necessary if the order of selecting the “first point for cut plane normal” and the second point is changed. ]]>