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.

Using simulated potential to simulate magnetic field.

Please login with a confirmed email address before reporting spam

I have a simple 5 domain model, composed of roughly concentric spheres. I am modeling a transmembrane potential on the 3rd domain using the General Form PDE physics. This part is working correctly. I am then trying to use that potential to compute the magnetic and electric fields at the inner boundary of the outermost domain.

This was implemented pretty simply in COMSOL 3.5, using Conductive Media DC and QuasiStatics to find the electric and magnetic fields sequentially. The only inputs were the conductivities and the external current density from the PDE simulation. I'm not having any luck reimplementing it in 4.3.

With COMSOL 4.3, I'm using the Magnetic and Electric Fields physics. The transmembrane potential is used in the MEF physics in the expression for the external current density on the 3rd domain. I have a study with two steps - a time-dependent and a stationary step. The PDE physics are active in the first, the MEF physics in the second. For the stationary step, I tell it to use all the solutions from the time-dependent step for the variables not solved for.

My most recent error message is:
Failed to find a solution.
Divergence of the linear iterations.
Returned solution is not converged.

When I look at the convergence plot, the error steadily decreases until it hits a floor, and then it stays constant until COMSOL gives up after 10000 iterations.

Any suggestions on what's causing this?

(As a side note, these ask for permittivities and permeabilities that I didn't need before - why? Is there a way around this?)

8 Replies Last Post 09.01.2014, 17:09 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 03.01.2014, 10:59 GMT-5
I can upload an example if that would help.

I would really appreciate any insights. I've only been using COMSOL for a few months, so there's a lot about how it works that I don't understand.
I can upload an example if that would help. I would really appreciate any insights. I've only been using COMSOL for a few months, so there's a lot about how it works that I don't understand.

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 05.01.2014, 13:50 GMT-5

It can't harm to provide your model.

Cheers
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
It can't harm to provide your model. Cheers Edgar -- Edgar J. Kaiser emPhys Physical Technology http://www.emphys.com

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 08.01.2014, 09:58 GMT-5
Here's one physics/sovler configuration I've tried for my model.
Here's one physics/sovler configuration I've tried for my model.


Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 08.01.2014, 13:39 GMT-5
Hi Vanessa,

I added 'Gauge Fixing for A-Field' into all Ampere's Law nodes and I replaced the iterative stationary solver by a direct solver (PARDISO instead of the default MUMPS). Now it solves and you can check if the results are what you expect.

Cheers
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Hi Vanessa, I added 'Gauge Fixing for A-Field' into all Ampere's Law nodes and I replaced the iterative stationary solver by a direct solver (PARDISO instead of the default MUMPS). Now it solves and you can check if the results are what you expect. Cheers Edgar -- Edgar J. Kaiser emPhys Physical Technology http://www.emphys.com


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 08.01.2014, 14:55 GMT-5
Edgar,

Thank you so much for looking at my model! Having the solver converge is a huge step forward. :)

One of the things that confuses me is the stationary vs. time-series solver. What I am trying to do is calculate the propagation of the potential V_m, and then use that to calculate what the magnetic field will be at each time step. This is a quasi-static problem, so I thought I should use a stationary solver to find the magnetic field, but even when I set the stationary solver to use all solutions from the time-dependent step, it only seems to output one value.

Should I be using two time-dependent solvers? Or am I using the stationary solver incorrectly?
Edgar, Thank you so much for looking at my model! Having the solver converge is a huge step forward. :) One of the things that confuses me is the stationary vs. time-series solver. What I am trying to do is calculate the propagation of the potential V_m, and then use that to calculate what the magnetic field will be at each time step. This is a quasi-static problem, so I thought I should use a stationary solver to find the magnetic field, but even when I set the stationary solver to use all solutions from the time-dependent step, it only seems to output one value. Should I be using two time-dependent solvers? Or am I using the stationary solver incorrectly?

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 08.01.2014, 18:07 GMT-5
Vanessa,

I played a little and swapped the study steps, now stationary is first and time dependent is second. Now you get a time dependent solution for the V_m but the magnetic field is not yet time dependent. Something is still missing. At the moment I don't have more time to look into it.
I would recommend you to check the 'magnetic-brake' model in the model library. Maybe you can find something there.

Cheers
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Vanessa, I played a little and swapped the study steps, now stationary is first and time dependent is second. Now you get a time dependent solution for the V_m but the magnetic field is not yet time dependent. Something is still missing. At the moment I don't have more time to look into it. I would recommend you to check the 'magnetic-brake' model in the model library. Maybe you can find something there. Cheers Edgar -- Edgar J. Kaiser emPhys Physical Technology http://www.emphys.com


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 08.01.2014, 18:12 GMT-5
Edgar,

Thank you again! I will look into the magnetic-brake model.

All the best,
~Vanessa
Edgar, Thank you again! I will look into the magnetic-brake model. All the best, ~Vanessa

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 09.01.2014, 17:09 GMT-5
An update:
I'm not sure if it's working totally correctly, but I was able to get time-dependent output from the MEF physics by having three solver configurations:

1) A time dependent solver for the PDE physics only
2) A stationary solver for the MEF physics only, where under "dependent variables" it is set to "user defined," and then under "values of variables not solved for" it is set to use all solutions from solver 1.
3) A time dependent solver for the MEF physics only, again set to use all the solver 1 solutions.
An update: I'm not sure if it's working totally correctly, but I was able to get time-dependent output from the MEF physics by having three solver configurations: 1) A time dependent solver for the PDE physics only 2) A stationary solver for the MEF physics only, where under "dependent variables" it is set to "user defined," and then under "values of variables not solved for" it is set to use all solutions from solver 1. 3) A time dependent solver for the MEF physics only, again set to use all the solver 1 solutions.

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.