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 one by one

Please login with a confirmed email address before reporting spam

I have a 2D CFD model with 200 outlets and I want the integration result( I do line integration) of each individual outlet and export 200 outlet result to an Excel sheet.

I reviewed a previous discussion below:
*****************************************************************************************************
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
************************************************************************************
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
***********************************************************************************
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
***********************************************************************
I try Ivar's suggestion on the Matlab Livelink and it shows "Undefined function or variable 'my_set'"
I don't know how to define 'my_set'? and how to export result to an excel file? thanks!

0 Replies Last Post Nov 4, 2014, 9:05 p.m. EST
COMSOL Moderator

Hello Linda Wang

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.