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.

Unexpected behaviour of "intop" function

Please login with a confirmed email address before reporting spam

Hi all!

First of all I'd like to thank this forum, here I have found many answers I needed before. But now I couldn't find any at all.

Thing is, I have a quite complicated 2D model of a superconducting magnet. My model is a transversal section of the magnet where we can see all the conductors as "domains" and the electric current is perpendicular to the plane.

The electrical resistivity of the conductor is a function of the temperature and magnetic field. So I imported a table and COMSOL interpolates it to obtain the resistivity, that works fine.

Now I need to implement an electric current that follows Where I0 and L are constants.

R is the resistivity (rho) integrated all over the conductor's domain, it reads:

I used "intop" to tackle this double integral over the conductor's domain, and the outer one is the length in the "z" direction.

COMSOL apparently does simulate with this setup, but the calculations are too too slow. It takes a lot of memory as well (plus than 80GB!) However, if I use I(t)=I0, it works nice and fast, so I'm sure there's a problem with the "intop" function.

So I ask you if there's something I am missing, or some suggestions to make the simulation faster.

Thanks in advance!

Lucas


2 Replies Last Post 2019年5月21日 GMT-4 14:06

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 2019年5月21日 GMT-4 11:44

After all it wasn't "intop" causing troubles. COMSOL does evaluate the integrals with little effort.

The problem was that I implemented I(t) as a Heat Source source term in

When I did everything worked like a charm, so it must have something to do with the methodology COMSOL utilises to evaluate power of functions.

Something like the difference of using a*a and pow(a,2) in a C code.

Anyways, if someone happens to know the explanation I'd be glad to hear about it.

Thanks

Lucas

After all it wasn't "intop" causing troubles. COMSOL does evaluate the integrals with little effort. The problem was that I implemented I(t) as a Heat Source source term in \dot{q}_0 = \rho I^2 When I did \dot{q}_0 = \rho I*I everything worked like a charm, so it must have something to do with the methodology COMSOL utilises to evaluate power of functions. Something like the difference of using a\*a and pow(a,2) in a C code. Anyways, if someone happens to know the explanation I'd be glad to hear about it. Thanks Lucas

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 2019年5月21日 GMT-4 14:06

Hi Lucas,

interesting catch, thanks for sharing. A good C-compiler would typically optimize this automatically for integer constant powers. I would also appreciate to hear more about that.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Hi Lucas, interesting catch, thanks for sharing. A good C-compiler would typically optimize this automatically for integer constant powers. I would also appreciate to hear more about that. Cheers Edgar

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.