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.

3D Time Dependent Electric Currents Model

Please login with a confirmed email address before reporting spam

Hello,

I'm currently using Comsol version 4.2a and I'm having difficulty solving a time dependent electric currents model with a variable current source. The current source is a 300 Hz Biphasic pulse which I define as an analytical function and implement using a floating potential. If the current is defined as 0 at time t=0 then the solution does not converge. However, if I begin with the pulse turned on the solution does converge and the results at each point in time are the same which they should not be. I'm assuming this has something to do with my time stepping or solver but I'm not sure. I am fairly new to this software so I could be making an obvious mistake that maybe one of you could help me with. I have attached the model below.

Thank you for your help, Brandon



7 Replies Last Post 2019年10月30日 GMT-4 12:34

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 2019年5月30日 GMT-4 16:53

Convergence is sometimes tricky.

What have you tried already?

Convergence is sometimes tricky. What have you tried already?

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 2019年5月30日 GMT-4 17:18
Updated: 6 years ago 2019年5月30日 GMT-4 17:18

Hi Alexis,

I've tried adjusting the relative tolerance by orders of magnitude, adjusting min and max time stepping in the solver to be relatively small, changed the jacobian to update on every iteration and increased max number of iterations to 25. Ive gotten the solution to converge when I begin with a non-zero current source, but the solution at time t=0 is given for every specified time from 0-600e-6 seconds for any time step. I suspect that the solver is having trouble adapting to rapid changes in the solution between time steps due to the pulses, but I'm not sure if it is indeed the problem or how to fix it. Any advice would be greatly appreciated.

Thanks, Brandon

Hi Alexis, I've tried adjusting the relative tolerance by orders of magnitude, adjusting min and max time stepping in the solver to be relatively small, changed the jacobian to update on every iteration and increased max number of iterations to 25. Ive gotten the solution to converge when I begin with a non-zero current source, but the solution at time t=0 is given for every specified time from 0-600e-6 seconds for any time step. I suspect that the solver is having trouble adapting to rapid changes in the solution between time steps due to the pulses, but I'm not sure if it is indeed the problem or how to fix it. Any advice would be greatly appreciated. Thanks, Brandon

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 2019年5月30日 GMT-4 17:22

Brandon,

it is quite obvious that you will need to apply some kind of smoothing to the waveform.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Brandon, it is quite obvious that you will need to apply some kind of smoothing to the waveform. Cheers Edgar

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 2019年5月30日 GMT-4 17:40

Hi Brandon

Try a smaller, simpler model first, to troubleshoot your implementation.

For example:

  • definitions: shifting your rect(t) functions by 50e-6 (lower and upper limits) so that your Biphasic_pulse starts at 0, and using a transition zone of 50e-6. this is important. you must have some finite derivative, or you will have problems. you can decrease this further as you continute to improve your model. note that probably you will have to modify the solver as you mention (change the jacobian to update on every iteration and increased max number of iterations to 25) in order for it to converge.
  • geometry: disable all your geometry after TCRE location, so you only get the Gold and Paste materials
  • physics: instead of a floating potential, use a terminal boundary condition ( tried just because, I have no experience using electric currents)
  • mesh: coarser mesh for all, physics controlled
  • time range: range(0,0.1e-5,6.0e-4) (this does not affect the solutions, they are just the times for which the solver "saves" the solution)
  • tolerance: physics controlled
  • solver configurations > solver 4 > Time-Dependent Solver 1 > enable direct instead of iterative (this is just from my experience modelling magnetic fields, does not mean it applies to all)

It solved in 3 minutes on my computer, in Comsol 5.4, though.

Good luck :)

Hi Brandon Try a smaller, simpler model first, to troubleshoot your implementation. For example: * definitions: shifting your rect(t) functions by 50e-6 (lower and upper limits) so that your Biphasic_pulse starts at 0, and using a transition zone of 50e-6. this is important. you must have some finite derivative, or you will have problems. you can decrease this further as you continute to improve your model. note that probably you will have to modify the solver as you mention (change the jacobian to update on every iteration and increased max number of iterations to 25) in order for it to converge. * geometry: disable all your geometry after TCRE location, so you only get the Gold and Paste materials * physics: instead of a floating potential, use a terminal boundary condition ( tried just because, I have no experience using electric currents) * mesh: coarser mesh for all, physics controlled * time range: range(0,0.1e-5,6.0e-4) (this does not affect the solutions, they are just the times for which the solver "saves" the solution) * tolerance: physics controlled * solver configurations > solver 4 > Time-Dependent Solver 1 > enable direct instead of iterative (this is just from my experience modelling magnetic fields, does not mean it applies to all) It solved in 3 minutes on my computer, in Comsol 5.4, though. Good luck :)

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 2019年5月31日 GMT-4 10:21
Updated: 5 years ago 2019年5月31日 GMT-4 10:21

Gustavo,

Thank you for all the helpful suggestions! I have implemented all of them, but my model still has trouble converging to V=0 when the current source is set to 0 A. I do see the soution getting very close to zero before the model does not converge. Is there any way to allow the solver to round the solution to zero when it is very close? Or instead of having the current source turned off should I just set it to an arbitrarily low number?

Thanks again

Gustavo, Thank you for all the helpful suggestions! I have implemented all of them, but my model still has trouble converging to V=0 when the current source is set to 0 A. I do see the soution getting very close to zero before the model does not converge. Is there any way to allow the solver to round the solution to zero when it is very close? Or instead of having the current source turned off should I just set it to an arbitrarily low number? Thanks again

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 2019年6月4日 GMT-4 07:10

my model still has trouble converging to V=0 when the current source is set to 0 A

I'm not sure what you're trying to do here.

If your excitation is 0, and your initial values are 0, your solution will be 0.

What is this V? Do you set it up explicitly anywhere? I've tried setting the current source to I=0, and it runs fine.

> my model still has trouble converging to V=0 when the current source is set to 0 A I'm not sure what you're trying to do here. If your excitation is 0, and your initial values are 0, your solution will be 0. What is this V? Do you set it up explicitly anywhere? I've tried setting the current source to I=0, and it runs fine.

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 2019年10月30日 GMT-4 12:34

Hi everyone, Thanks for your contributuons Brandon, when I enabled the direct solution, I was able o get result.

I am actaually working on something similar with Brandon's study. I am trying to apply charge balanced bihasic current on boundary of the electrode array. I have managed to built charge balanced current function (pw(t)), but can anyone suggest me how to implement this current pulse each electrode contacts (anode and cathode) seperately? Lets say I have 20 contacts (10 source and 10 sinks), should I generate pulse for each contact seperately or just generate one pulse for anode and one for cathode and apply them to ?

Thank you in advance.

Enver

Hi everyone, Thanks for your contributuons Brandon, when I enabled the direct solution, I was able o get result. I am actaually working on something similar with Brandon's study. I am trying to apply charge balanced bihasic current on boundary of the electrode array. I have managed to built charge balanced current function (pw(t)), but can anyone suggest me how to implement this current pulse each electrode contacts (anode and cathode) seperately? Lets say I have 20 contacts (10 source and 10 sinks), should I generate pulse for each contact seperately or just generate one pulse for anode and one for cathode and apply them to ? Thank you in advance. Enver

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.