Issues with meshing in Comsol for Matlab

Nathan Wiegman

Please login with a confirmed email address before reporting spam

I am using MATLAB to run optimization loops on my COMSOL model. I do change some model input parameters in the optimization, but it doesnt change the number of domains or boundaries, only the size of them, so I dont expect that the explicit selections I use are affected.

I create a distribution of mesh nodes along a boundary (the identity pair in the airgap of an electric machine) and copy them to the destination of the identity pair, as well as a few other boundaries in the design.

The issue I am having is that the Livelink model occasionally fails, giving the error message here:

A problem occurred when building mesh feature [name of mesh feature]. Could not copy to any destination entity

I am especially confused since it seems inconsistent when it fails in MATLAB (sometimes it fails on the first copy operation, sometimes on the third, and it does not always fail). If I use the parameters from the MATLAB optimization in the actual COMSOL model (not Livelink) the model builds and simulates correctly.

I can supply the model files if necessary. I am using COMSOL 5.3.1.229, and MATLAB 9.2.0.538062 (R2017a). These are the default versions that my system administrator provides, but I can use different versions if necessary.

Thanks in advance,

Nathan Wiegman


2 Replies Last Post 2018年5月22日 GMT-0400上午6:53
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 months ago 2018年5月18日 GMT-0400上午7:26
Updated: 3 months ago 2018年5月23日 GMT-0400上午6:25

Hi

The problem is most likely caused by renumbering of the geometric entities when you change the geometry.

In order to investigate please supply us with model files and your script (either here or by sending the files to support).

-------------------
Lars Gregersen
Comsol Denmark
Hi The problem is most likely caused by renumbering of the geometric entities when you change the geometry. In order to investigate please supply us with model files and your script (either here or by sending the files to support).

Nathan Wiegman

Please login with a confirmed email address before reporting spam

Posted: 3 months ago 2018年5月22日 GMT-0400上午6:53

Lars is correct. I was able to resolve the issue by using resulting boundary selections of the objects I used to create the airgap.

Lars is correct. I was able to resolve the issue by using resulting boundary selections of the objects I used to create the airgap.

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.