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.

Integration of multiple subdomains at once

Please login with a confirmed email address before reporting spam

Hello,

I have a model which contains ~ 70 subdomains. I would like to do a subdomain integration of these domains but without the need to click on each single domain and click 'integrate'.

Rather select all the domains and do an integration for all of them at once but giving back the individual values as an output (list).

(If I select all subdomains and hit integrate, only the sum of the integrals is returned)

I guess, this option exists somewhere in the GUI or by a simple instruction but I am not able to find it.

Thanks for help!

Matthias

7 Replies Last Post Mar 24, 2011, 3:13 a.m. EDT
Ruud Borger COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 25, 2010, 1:54 p.m. EST
Dear Matthias,

I think the fastest way would be to use the Matlab Livelink and write a For-loop to evaluate the individual domains.

Gruss,

Ruud
Dear Matthias, I think the fastest way would be to use the Matlab Livelink and write a For-loop to evaluate the individual domains. Gruss, Ruud

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 Nov 25, 2010, 3:37 p.m. EST
Hi Borger

It could have been handy to allow a

for i={my_set}; intop1((dom==i) *solid.rho); end

or just an integration over

(dom=={myset})*solid.rho

to fill a table with the mass of a each of the "my_set" domains no ?

--
Have fun Comsoling
Ivar
Hi Borger It could have been handy to allow a for i={my_set}; intop1((dom==i) *solid.rho); end or just an integration over (dom=={myset})*solid.rho to fill a table with the mass of a each of the "my_set" domains no ? -- Have fun Comsoling Ivar

Ruud Borger COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 26, 2010, 1:27 p.m. EST
Hi Ivar,

That is certainly along the lines of what I had in my mind.


By the way, I have to commend you on your keynote speech during the conference last week! Some very practical tips.

Have a good night,

Ruud
Hi Ivar, That is certainly along the lines of what I had in my mind. By the way, I have to commend you on your keynote speech during the conference last week! Some very practical tips. Have a good night, Ruud

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 Nov 26, 2010, 5:42 p.m. EST
Hi
Thanks,
I have also uploaded several mph examples, to the Paris conf site, they will surely include them, will try to make a pdf with explanations, it's a start to something à la acdc minicourse of yours but tailored to structural

--
Good night, soon home, its snowstorm and sevral hours delayed trains down here in the middle of Europe ;)
Ivar
Hi Thanks, I have also uploaded several mph examples, to the Paris conf site, they will surely include them, will try to make a pdf with explanations, it's a start to something à la acdc minicourse of yours but tailored to structural -- Good night, soon home, its snowstorm and sevral hours delayed trains down here in the middle of Europe ;) Ivar

Ruud Borger COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 28, 2010, 6:18 a.m. EST
Looking forward to those :)

There is a bit of snow here in Holland as well, but probably not as much as there.

By the way, don't forget to download our most recent update, 4.1.112:
www.comsol.com/support/updates/comsol41p/

List of changes is also included on that page. Have a good weekend!
Looking forward to those :) There is a bit of snow here in Holland as well, but probably not as much as there. By the way, don't forget to download our most recent update, 4.1.112: http://www.comsol.com/support/updates/comsol41p/ List of changes is also included on that page. Have a good weekend!

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 23, 2011, 4:25 p.m. EDT
Hi Ivar,

I am integrating over 12 separate domains and exporting the data individually to MATLAB and I came across this thread. where do you enter this for-end loop that you wrote? in Matlab? do you have MATLAB connected? how do you do this? it would definitely make my life easier. thanks!
Hi Ivar, I am integrating over 12 separate domains and exporting the data individually to MATLAB and I came across this thread. where do you enter this for-end loop that you wrote? in Matlab? do you have MATLAB connected? how do you do this? it would definitely make my life easier. thanks!

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 Mar 24, 2011, 3:13 a.m. EDT
Hi

actually tte "for" loop in COMSOL GUI is not implemented from my knowledge, so you have only matlab to get around. I just found it to be "handy"

the closest you can get to a for loop is the Parametric sweep, or the solver continuation sweep

--
Good luck
Ivar
Hi actually tte "for" loop in COMSOL GUI is not implemented from my knowledge, so you have only matlab to get around. I just found it to be "handy" the closest you can get to a for loop is the Parametric sweep, or the solver continuation sweep -- 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.