COMSOL–MATLAB Livelink Export Issue

Please login with a confirmed email address before reporting spam

Dear all,

I am using the student version of COMSOL Multiphysics 6.3 and am encountering some issues when trying to run a COMSOL model exported as a .m file in MATLAB.

Specifically, the model (which includes heat transfer and surface-to-surface radiation in a 3D geometry) runs perfectly within COMSOL. However, when I export it as a .m file and attempt to run it in MATLAB, I encounter an error during the physics definition step, particularly when boundary selections are being set.

The error suggests that some of the boundary indices being referenced do not exist.

Java exception occurred: Exception:

com.comsol.util.exceptions.UnexpectedServerException: com.comsol.model.data.SelectionOutOfBoundsException: Illegal input vector illegal entity
number
(rethrown as com.comsol.util.exceptions.FlException)

Messages:

com.comsol.model.data.SelectionOutOfBoundsException: Illegal input vector illegal entity number

This is the incriminated matlab line that gives error but in realty this happen for any selection boundary in the code:

model.component('comp1').physics('ht').feature('hf1').selection.set([41 42 46 49 50 51 53 54 56 57 66 67 68 69 71 72 74 75 83 84 89 90 107 110 127 128 130 131 133 134 141 142 148 149 150 153]);

However, I am unable to understand what is causing the issue, as the model runs flawlessly within COMSOL. The selection indices appear to match those used in the COMSOL model and therefore should exists.

Thank you in advance to anyone who might be able to help.

Best regards, Federico


Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.