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.

Integrating part of the boundary

Please login with a confirmed email address before reporting spam

Hello,

I have a 3d simulation, in which I have a surface, which consists of several boundaries. I want to split that surface into a grid and integrate each element of the grid. The final result should be a matrix in matlab, where each entry in the matrix represents the result of integration of the respective element in the grid.

The way I do it now is by using:
[xo, yo, es] = mphinterp(model, {'x', 'y','es.nD'}, 'dataset','surf1');
F = TriScatteredInterp(xo',yo',es');
Then integrating F.

It works, but gives a large error. I tried to minimise the error by meshing the surface more densely, but the smallest I could get it to was 12%, which is too large for my application.

Is there a way to get the results of the integration straight from Comsol? I was looking at functions like mphint, but couldn't figure out a way how to use them in this way.

I can provide example mph file, if needed.

Best regards,
Ivan

0 Replies Last Post 2 avr. 2012, 04:47 UTC−4
COMSOL Moderator

Hello Ivan Ruskin

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.