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.

DC application mode: How to define a boundary "electric potential" as a function of current density?

Please login with a confirmed email address before reporting spam

I am using the DC application mode and would like to define one of the boundary conditions as follows: An electric potential which is a function of the current density. In the COMSOL, modelling guide for the DC application mode it says: "The following table shows the fundamental fields, all derivable from the electric potential, that are available for postprocessing and for use in equations and boundary conditions". The list contains variables expressing the current such as "normJ". However, when typing a formula containing "normJ" into the boundary condition field "electric potential", there is always an error.
When, on the other hand, one defines the boundary condition as a "current density", which depends on potential and uses the variable "V" for potential, the model works fine.
Why does it not work with the boundary condition "electric potential"? Can anyone help me?

9 Replies Last Post 2016年2月18日 GMT-5 03:07
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年4月19日 GMT-4 14:28
It sounds like the cause of your problem is that you are trying to specify an input quantity (potential) in terms of a not-yet-computed (i.e., output) quantity (normJ). Since normJ isn't known at that start of the problem, you can't directly express your potential in terms of it. I.e., input quantities are not normally specified in terms of output quantities. I understand that such problems, when they arise, are typically called "inverse problems."

Now, the interesting question is whether there is any clever way to address your situation. You might be able to set up some kind of parametric run that considers various potential distributions and then compares the resulting normJ (as an output) to what you had wanted to specify up front. That, in a nut-shell, would be a search-based method to finding the solution to an inverse problem. There are many other approaches, depending on the type of inverse problem you face.

Another comment: An electric potential that is a function of current density seems a bit unusual to me. Rather, it seems that a surface's potential is normally a function of the total charge on it, while that charge depends on the time-integrated current density to-from the surface. Then again, you mentioned that you are in DC mode, so I suppose there is only a steady state situation. In any case, you may want to tell people here a little more about your problem, so that they can offer more specific suggestions.

By the way, just by some chance, are you trying to do a Hall Effect problem?

Good luck.
It sounds like the cause of your problem is that you are trying to specify an input quantity (potential) in terms of a not-yet-computed (i.e., output) quantity (normJ). Since normJ isn't known at that start of the problem, you can't directly express your potential in terms of it. I.e., input quantities are not normally specified in terms of output quantities. I understand that such problems, when they arise, are typically called "inverse problems." Now, the interesting question is whether there is any clever way to address your situation. You might be able to set up some kind of parametric run that considers various potential distributions and then compares the resulting normJ (as an output) to what you had wanted to specify up front. That, in a nut-shell, would be a search-based method to finding the solution to an inverse problem. There are many other approaches, depending on the type of inverse problem you face. Another comment: An electric potential that is a function of current density seems a bit unusual to me. Rather, it seems that a surface's potential is normally a function of the total charge on it, while that charge depends on the time-integrated current density to-from the surface. Then again, you mentioned that you are in DC mode, so I suppose there is only a steady state situation. In any case, you may want to tell people here a little more about your problem, so that they can offer more specific suggestions. By the way, just by some chance, are you trying to do a Hall Effect problem? Good luck.

Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年4月19日 GMT-4 14:36
On second thought, are you simply trying to model a resistor, or the equivalent of a resistor?
On second thought, are you simply trying to model a resistor, or the equivalent of a resistor?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年4月20日 GMT-4 05:22
Thanks for your reply. As you say, the current is apparently not accessible at the start.

To understand why I tried the described approach, I might give some more background information about the model:

The idea is to model electrochemical reactions at an electrode. Thus, the potential and current density at the electrode surface are related (e.g. by an equation of the Butler-Volmer type); lets say:
J = f(V)
Where J is the total current density and V the potential.
The normal approach is to define the current density at the boundary as a function of the potential (this works from a computational viewpoint). My problem however is, that COMSOL only allows specifying the normal component of the current density. This means that the component normal to the boundary follows Butler-Volmer equation, while the tangential component is left free and assumes values resulting from the calculations. The reason for this is that the electric field lines are not necessarily perpendicular to the electrode surface (this would only be the case for a constant potential along the boundary). In the end, the total current density is larger than the one according to the Butler-Volmer equation. This is physical nonsense.

There are two options to model this properly:

1. Add some kind of constraint along the boundary, which states that it is the total current density rather than the component normal to the boundary that has to follow the Butler-Volmer equation. Something like (in 2D):
sqrt(Jx^2+Jy^2) = f(V)
Where Jx is the tangential current and Jy the component normal to the boundary (for a boundary in x-direction).

2. Do it the other way round, i.e. setting the boundary condition in terms of potential as a function of current density. In other words: solve Butler-Volmer equation J = f(V) for V, so that we have V = g(J). Then we have to make sure that J is the total current density, e.g. expressed as sqrt(Jx^2+Jy^2), rather than just one of the components.

Approach No. 2 is what I tried and where I got problems in accessing the variable describing the current (normJ) and what appears to be a "inverse problem". (Please note the following: it might be confusing but in COMSOL, "normJ" is the total current density (sqrt(Jx^2+Jy^2)) and NOT the component normal to the boundary).

Approach No. 1 could be promising, but I did not manage to get it running so far. Maybe someone has an idea how to properly include such a "constraint" into the model?

Thanks for your help in advance!
Thanks for your reply. As you say, the current is apparently not accessible at the start. To understand why I tried the described approach, I might give some more background information about the model: The idea is to model electrochemical reactions at an electrode. Thus, the potential and current density at the electrode surface are related (e.g. by an equation of the Butler-Volmer type); lets say: J = f(V) Where J is the total current density and V the potential. The normal approach is to define the current density at the boundary as a function of the potential (this works from a computational viewpoint). My problem however is, that COMSOL only allows specifying the normal component of the current density. This means that the component normal to the boundary follows Butler-Volmer equation, while the tangential component is left free and assumes values resulting from the calculations. The reason for this is that the electric field lines are not necessarily perpendicular to the electrode surface (this would only be the case for a constant potential along the boundary). In the end, the total current density is larger than the one according to the Butler-Volmer equation. This is physical nonsense. There are two options to model this properly: 1. Add some kind of constraint along the boundary, which states that it is the total current density rather than the component normal to the boundary that has to follow the Butler-Volmer equation. Something like (in 2D): sqrt(Jx^2+Jy^2) = f(V) Where Jx is the tangential current and Jy the component normal to the boundary (for a boundary in x-direction). 2. Do it the other way round, i.e. setting the boundary condition in terms of potential as a function of current density. In other words: solve Butler-Volmer equation J = f(V) for V, so that we have V = g(J). Then we have to make sure that J is the total current density, e.g. expressed as sqrt(Jx^2+Jy^2), rather than just one of the components. Approach No. 2 is what I tried and where I got problems in accessing the variable describing the current (normJ) and what appears to be a "inverse problem". (Please note the following: it might be confusing but in COMSOL, "normJ" is the total current density (sqrt(Jx^2+Jy^2)) and NOT the component normal to the boundary). Approach No. 1 could be promising, but I did not manage to get it running so far. Maybe someone has an idea how to properly include such a "constraint" into the model? Thanks for your help in advance!

Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年4月20日 GMT-4 09:55
Interesting. If E is not perpendicular to your electrode, then it is not a perfect conductor. Since your electrode is not a perfect conductor, I recommend that you include it in the problem as a subdomain (with a specified resistivity), rather than attempt to model its surface as a boundary condition. Presumably, your electrode is connected to a perfect (or nearly perfect) conductor elsewhere, so you can (and should) put a well-defined boundary condition there instead. This way, both the potential and current distribution on the electrode (or anywhere else in the problem) can be solved for. I've had to do things like that on somewhat similar problems where I had resistive conductors, and it worked out well.
Interesting. If E is not perpendicular to your electrode, then it is not a perfect conductor. Since your electrode is not a perfect conductor, I recommend that you include it in the problem as a subdomain (with a specified resistivity), rather than attempt to model its surface as a boundary condition. Presumably, your electrode is connected to a perfect (or nearly perfect) conductor elsewhere, so you can (and should) put a well-defined boundary condition there instead. This way, both the potential and current distribution on the electrode (or anywhere else in the problem) can be solved for. I've had to do things like that on somewhat similar problems where I had resistive conductors, and it worked out well.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年4月20日 GMT-4 10:23
Thanks for the reply. I think the electrode is a perfect conductor, but the reason for tangential current components is the electrolyte. Imagine a steel sample in a solution with a local site of corrosion somewhere on it. At this point, the potential is very negative. In a solution of high conductivity, the complete surface would be forced to assume a unique potential. If the solution, however, has a rather high resistivity, some parts of the surface would not have the same potential as others. The reason for this is that some of the energy (voltage) between the actively corroding spot (anodic) and the passive (cathodic) sites is dissipated as ohmic drop in the solution (e.g. sites further away from the anode "suffer" from a higher voltage drop through the electrolyte). The current flowing between the anodic and cathodic sites through the electrolyte solution results from solving Laplace equation (this is what comsol does). In the presence of a potential gradient along the electrode surface (from anode to cathode), the electric field lines are not perpendicular to the surface. This is not due to a restricted flow of charge through the electrode, but due to a restricted flow of charge through the electrolyte.

The current flowing through the electrolyte arises from electrochemical reactions taking part at the electrode surface. At the anodic site, different reactions occur than at the cathodic sites. The generated ions are then moving through the electrolyte and transport charge by this. The rate at which the ionic charge is produced is a function of the potential and can be described by equations such as e.g. the Butler-Volmer equation. At the anodic site, a different equation (with different constants) is valid than at the cathodic sites.

Thus, the distribution of potentials along the electrode surface is a function of solution conductivity, and type of Butler-Volmer equations valid at the anode and cathode.

Butler-Volmer equations describe the rate of charge production, i.e. current, in function of the potential. They describe the rate of total charge produced and NOT only a geometrical component such as for instance the component perpendicular to the electrode surface. This is the reason why I want the total current to be related to the potential rather than just the normal component.

This problem is quite common in electrochemistry and I am sure that there must be a solution to model this boundary condition properly.
Thanks for the reply. I think the electrode is a perfect conductor, but the reason for tangential current components is the electrolyte. Imagine a steel sample in a solution with a local site of corrosion somewhere on it. At this point, the potential is very negative. In a solution of high conductivity, the complete surface would be forced to assume a unique potential. If the solution, however, has a rather high resistivity, some parts of the surface would not have the same potential as others. The reason for this is that some of the energy (voltage) between the actively corroding spot (anodic) and the passive (cathodic) sites is dissipated as ohmic drop in the solution (e.g. sites further away from the anode "suffer" from a higher voltage drop through the electrolyte). The current flowing between the anodic and cathodic sites through the electrolyte solution results from solving Laplace equation (this is what comsol does). In the presence of a potential gradient along the electrode surface (from anode to cathode), the electric field lines are not perpendicular to the surface. This is not due to a restricted flow of charge through the electrode, but due to a restricted flow of charge through the electrolyte. The current flowing through the electrolyte arises from electrochemical reactions taking part at the electrode surface. At the anodic site, different reactions occur than at the cathodic sites. The generated ions are then moving through the electrolyte and transport charge by this. The rate at which the ionic charge is produced is a function of the potential and can be described by equations such as e.g. the Butler-Volmer equation. At the anodic site, a different equation (with different constants) is valid than at the cathodic sites. Thus, the distribution of potentials along the electrode surface is a function of solution conductivity, and type of Butler-Volmer equations valid at the anode and cathode. Butler-Volmer equations describe the rate of charge production, i.e. current, in function of the potential. They describe the rate of total charge produced and NOT only a geometrical component such as for instance the component perpendicular to the electrode surface. This is the reason why I want the total current to be related to the potential rather than just the normal component. This problem is quite common in electrochemistry and I am sure that there must be a solution to model this boundary condition properly.

Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年4月23日 GMT-4 15:15
Ueli:

I'm not an electrochemist, but it seems to me you need to treat the thin layer of electrolyte as a part of the volume (i.e., subdomain) of the problem, rather than as a boundary condition. The true-metal boundary, to the extent the metal is a perfect conductor, really (no kidding) does have constant potential and a perpendicular E field there. Yes, that condition may be different when one goes only a very small distance away into the electrolyte layer around it, but it would seem to me that what happens in that very thin layer may matter a great deal since, after all, the behavior changes so much there! So if you can't represent the physics or behavior of that layer with some specific analytic expression (such as if you already had a closed form solution for the fields there), then you will need to put in whatever partial differential equation holds in that region (this might still be the PDE you use elsewhere, but with perhaps different values of material properties) and then treat it as part of your Comsol model.

There may be an analogy to what you are doing in some of the problems with which I am more familiar. In electromagnetics, one often has to deal with a nearly-perfect conductor (such as the walls of a waveguide), where the EM field leaks in just a short way (e.g., perhaps a micron or less). In that case, to model power losses into the surface, one cannot treat the boundary as perfectly conducting, so one has to include a thin layer there as one of the subdomains, rather than attempt to model the physical metal boundary.

Including very thin layers in the finite element mesh comes with its own challenges, but there are a number of ways to address them. You can mesh different subdomains differently and you can also scale the mesh elements differently in different directions. Another trick is to make the layer thicker in the simulation than in the real-world, while adjusting its key properties (based on your understanding of the physics) so it still yields a valid model of the thin layer.

I hope these comments help. I encourage your fellow electrochemists, if they happen to read this, to speak up with their own recommendations.
Ueli: I'm not an electrochemist, but it seems to me you need to treat the thin layer of electrolyte as a part of the volume (i.e., subdomain) of the problem, rather than as a boundary condition. The true-metal boundary, to the extent the metal is a perfect conductor, really (no kidding) does have constant potential and a perpendicular E field there. Yes, that condition may be different when one goes only a very small distance away into the electrolyte layer around it, but it would seem to me that what happens in that very thin layer may matter a great deal since, after all, the behavior changes so much there! So if you can't represent the physics or behavior of that layer with some specific analytic expression (such as if you already had a closed form solution for the fields there), then you will need to put in whatever partial differential equation holds in that region (this might still be the PDE you use elsewhere, but with perhaps different values of material properties) and then treat it as part of your Comsol model. There may be an analogy to what you are doing in some of the problems with which I am more familiar. In electromagnetics, one often has to deal with a nearly-perfect conductor (such as the walls of a waveguide), where the EM field leaks in just a short way (e.g., perhaps a micron or less). In that case, to model power losses into the surface, one cannot treat the boundary as perfectly conducting, so one has to include a thin layer there as one of the subdomains, rather than attempt to model the physical metal boundary. Including very thin layers in the finite element mesh comes with its own challenges, but there are a number of ways to address them. You can mesh different subdomains differently and you can also scale the mesh elements differently in different directions. Another trick is to make the layer thicker in the simulation than in the real-world, while adjusting its key properties (based on your understanding of the physics) so it still yields a valid model of the thin layer. I hope these comments help. I encourage your fellow electrochemists, if they happen to read this, to speak up with their own recommendations.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年4月25日 GMT-4 11:54
In addition to the other excellent replies you received, you may also want to consider whether you are conceptualizing the problem correctly. In linear media, the current density is not proportional to electric potential per se, but rather the electric field, which is the (negative) gradient of the potential. Something to consider.
In addition to the other excellent replies you received, you may also want to consider whether you are conceptualizing the problem correctly. In linear media, the current density is not proportional to electric potential per se, but rather the electric field, which is the (negative) gradient of the potential. Something to consider.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年7月2日 GMT-4 08:43
The solution I have found is to replace the current density in the Butler Volmer equation with -sigma*grad(V). This becomes the boundary condition, i.e. a mixed boundary condition which gives a relationship between V and grad(V).
The solution I have found is to replace the current density in the Butler Volmer equation with -sigma*grad(V). This becomes the boundary condition, i.e. a mixed boundary condition which gives a relationship between V and grad(V).

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2016年2月18日 GMT-5 03:07
Hi there

sub: electrode boundary condition

I felt you may able to respond to my problem
My problem is a pressure driven flow inside a microchannel, that generates ionic current due to
electric double layer formation. there is no external electric field. I solve Poisson Nernst Planck equations along with Navier Stokes, in my case ionic current is (velocity)w*(np-nn) (net charge density),

What I want to model is the "streaming current measurement, no potential exists in streaming current mode due to electrodes", when in practice we put two electrodes at the ends of channel....how can I change the streaming potential modeling to streaming current modeling? I need an electrode boundary condition at exit ? thats my problem now, can you help?

thank you
Abraham





The solution I have found is to replace the current density in the Butler Volmer equation with -sigma*grad(V). This becomes the boundary condition, i.e. a mixed boundary condition which gives a relationship between V and grad(V).


Hi there sub: electrode boundary condition I felt you may able to respond to my problem My problem is a pressure driven flow inside a microchannel, that generates ionic current due to electric double layer formation. there is no external electric field. I solve Poisson Nernst Planck equations along with Navier Stokes, in my case ionic current is (velocity)w*(np-nn) (net charge density), What I want to model is the "streaming current measurement, no potential exists in streaming current mode due to electrodes", when in practice we put two electrodes at the ends of channel....how can I change the streaming potential modeling to streaming current modeling? I need an electrode boundary condition at exit ? thats my problem now, can you help? thank you Abraham [QUOTE] The solution I have found is to replace the current density in the Butler Volmer equation with -sigma*grad(V). This becomes the boundary condition, i.e. a mixed boundary condition which gives a relationship between V and grad(V). [/QUOTE]

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.