Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Boundary current source vs electric potential source

Please login with a confirmed email address before reporting spam

Hello,

I have a question about the AC/DC module -> Electric currents.

I made a simple model of a spherical homogenous volume conductor. Inside this sphere I added a cylinder along the 3-axes. On the 2 ends of the cylinder I added 2 small round contact point (electrodes).
The contact points, cylinder and sphere all have different conductivity.
(I hope this clear, otherwise I need to add a picture somehow)

On one of the round contacts I added a boundary current source (1 A/m^2) and computed the model. This resulted in a certain voltage (4 V) on this round contact and a certain outflow of current through the surface of the sphere.
Now I removed the boundary current source on that contact and added an electric potential of 4V on the boundary. This did not result in the same current outflow through the surface of the sphere.

I think this is strange. Is my reasoning wrong or is there something wrong in the model?

10 Replies Last Post Oct 31, 2012, 3:40 p.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 26, 2012, 2:42 p.m. EDT
Hi

sorry I didnt manage to follow fully, difficult to say something, but on the other side, so far COMSOL has seldom shown me wrong results (not since 4.1 came out) so I ususally trust COMSOL and search to understand what I'm doing wrong when the result surprises me.

--
Good luck
Ivar
Hi sorry I didnt manage to follow fully, difficult to say something, but on the other side, so far COMSOL has seldom shown me wrong results (not since 4.1 came out) so I ususally trust COMSOL and search to understand what I'm doing wrong when the result surprises me. -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 29, 2012, 6:05 a.m. EDT
Hello,

what is the sink of your model? If you have a current source at your contact point, there must be a sink somewhere, usually a boundary with ground potential...
Hello, what is the sink of your model? If you have a current source at your contact point, there must be a sink somewhere, usually a boundary with ground potential...

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 29, 2012, 7:54 a.m. EDT
I added the ground on the outer surface of the sphere.

I added the ground on the outer surface of the sphere.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 30, 2012, 8:50 a.m. EDT
I built and computed your model and receive almost identical values for current flow through the outer sphere (3.14e-4 A and 3.15e-4 A, respectively). This is in the tolerable range of numerical inaccuracy, taking into consideration that it was just my first try.

Besides there is a general problem of inaccuracy when computing fluxes through boundarys, see www.comsol.com/support/knowledgebase/973/.

Because the file size was too big to attach the model, I created another one in 2d axisymmetric mode. The result is similar. Check it out and ask if something isn't clear.
I built and computed your model and receive almost identical values for current flow through the outer sphere (3.14e-4 A and 3.15e-4 A, respectively). This is in the tolerable range of numerical inaccuracy, taking into consideration that it was just my first try. Besides there is a general problem of inaccuracy when computing fluxes through boundarys, see http://www.comsol.com/support/knowledgebase/973/. Because the file size was too big to attach the model, I created another one in 2d axisymmetric mode. The result is similar. Check it out and ask if something isn't clear.


Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 30, 2012, 9:15 a.m. EDT
Hi

without neglecting the KB articles on flux measurements, you can often get better flux results if you use a very fine mesh, even sometimes boundary mesh if these line up perpendicular to the dependent variable gradient, along critical boundaries.

Another thing in ACDC avoid sharp corners, round them off with fillets around magnets and/or "good" concutors

--
Good luck
Ivar
Hi without neglecting the KB articles on flux measurements, you can often get better flux results if you use a very fine mesh, even sometimes boundary mesh if these line up perpendicular to the dependent variable gradient, along critical boundaries. Another thing in ACDC avoid sharp corners, round them off with fillets around magnets and/or "good" concutors -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 30, 2012, 9:31 a.m. EDT
Thanks for the reply.

I adjusted your model a bit, so now it produces the same problem as I have in mine.
Thanks for the reply. I adjusted your model a bit, so now it produces the same problem as I have in mine.


Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 30, 2012, 1:03 p.m. EDT
Hi

but how can you get reasonable results if you have 1 mesh element across a small edge of 1e-6V and 1V solver scaling ?
You are looking for numerical problems like that,

Check that your mesh density can reasonably resolve the gradients of your dependent variables and that your values scale to close to 1 (not sure why the solver didnt catch that large difference).

If you listen to classical music you would never sample at 1 kHz, but ratherat at 48 kHz or even more.
In your model here you are sampling at 1 Hz but still expect to hear the nice melody and vibrato, there is just no way like that, or have I missed something here ? ;)
--
Good luck
Ivar
Hi but how can you get reasonable results if you have 1 mesh element across a small edge of 1e-6V and 1V solver scaling ? You are looking for numerical problems like that, Check that your mesh density can reasonably resolve the gradients of your dependent variables and that your values scale to close to 1 (not sure why the solver didnt catch that large difference). If you listen to classical music you would never sample at 1 kHz, but ratherat at 48 kHz or even more. In your model here you are sampling at 1 Hz but still expect to hear the nice melody and vibrato, there is just no way like that, or have I missed something here ? ;) -- Good luck Ivar

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 30, 2012, 1:03 p.m. EDT
Hi again

by playing a little with the mesh I get a current density (integrated over the 2*pi*r loop) of
Normal current density (A) GND Normal current density (A) Electric potential
-3.59484e-4 3.2505e-4

over the external sphere edge and the internal ring.
All with your 8e-6V potential, and a normal mesh on the external domain.

By further increasing the mesh along the Voltage edge I even get to 3.44e-4 (A) closer, still mesh sensitive

Now to get a far better Current value is to use a Terminal node,

then your Global evaluation - Terminal curent on the is 3.60202e-4 (A)
less than 1:3000 from the GND current with a fine mesh of -3.60346e-4 (A)


-----
Have fun Comsoling
Ivar
Hi again by playing a little with the mesh I get a current density (integrated over the 2*pi*r loop) of Normal current density (A) GND Normal current density (A) Electric potential -3.59484e-4 3.2505e-4 over the external sphere edge and the internal ring. All with your 8e-6V potential, and a normal mesh on the external domain. By further increasing the mesh along the Voltage edge I even get to 3.44e-4 (A) closer, still mesh sensitive Now to get a far better Current value is to use a Terminal node, then your Global evaluation - Terminal curent on the is 3.60202e-4 (A) less than 1:3000 from the GND current with a fine mesh of -3.60346e-4 (A) ----- Have fun Comsoling Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 31, 2012, 4:25 a.m. EDT
Thanks for helping me out.

So if I understand correctly it is a problem with my mesh. The difference of the value of the depending variable (V) between neighboring nodes is too big?

So the mesh should be finer around the 'stimulation' electrode?

May I have your improved model so I can see what you precisely did?
Thanks for helping me out. So if I understand correctly it is a problem with my mesh. The difference of the value of the depending variable (V) between neighboring nodes is too big? So the mesh should be finer around the 'stimulation' electrode? May I have your improved model so I can see what you precisely did?

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 31, 2012, 3:40 p.m. EDT
Hi

2 things:
1) certainly the mesh, your source region is small and you need several mesh elements along the edge and in the direct vicinity to calculate correctly the Voltage drop, hence the electric field, and from there the current flowing.

2) you have Electric Potential and lumped Terminal type BC to define a voltage or a current source. The Lumped Terminal BC automatically adds local flux (current) variables, that are resolved with higher precision than for the Electric Potential BC node. The latter allows you hovever, to define a voltage as function of the boundry length/area, or some spatially (not only time) variable Voltage or current source. But with a less precise flux evaluation.

When I say less precise, it's with respect to a coarse mesh, with relly fine mesh you get almost to the same values.

Last thing, as I have said several timeson the Forum, (you are not the first ;): consider the mesh as a sampling method, for music people today understand Nyquist criteria, and you decide sample with reasonably hgih speed, to get a good quality sound, for meshing it's the same, apart that it is the depedent variables, and particularly their gradients you should look at, if the variables have high gradients, steep slopes, you need dense mesh to resolve correctly the shape, else you make a triangular short cut and your results will be easily wrong

--
Good luck
Ivar
Hi 2 things: 1) certainly the mesh, your source region is small and you need several mesh elements along the edge and in the direct vicinity to calculate correctly the Voltage drop, hence the electric field, and from there the current flowing. 2) you have Electric Potential and lumped Terminal type BC to define a voltage or a current source. The Lumped Terminal BC automatically adds local flux (current) variables, that are resolved with higher precision than for the Electric Potential BC node. The latter allows you hovever, to define a voltage as function of the boundry length/area, or some spatially (not only time) variable Voltage or current source. But with a less precise flux evaluation. When I say less precise, it's with respect to a coarse mesh, with relly fine mesh you get almost to the same values. Last thing, as I have said several timeson the Forum, (you are not the first ;): consider the mesh as a sampling method, for music people today understand Nyquist criteria, and you decide sample with reasonably hgih speed, to get a good quality sound, for meshing it's the same, apart that it is the depedent variables, and particularly their gradients you should look at, if the variables have high gradients, steep slopes, you need dense mesh to resolve correctly the shape, else you make a triangular short cut and your results will be easily wrong -- Good luck Ivar

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.