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.

Domain&boundary numbering-Comsol with matlab

Please login with a confirmed email address before reporting spam

Hello.

I'm trying to build a Comsol model and save as m-file, therefore I can work through a group of similar models (different geometric parameters) and obtain corresponding results (maximum temperature, e.g.), simply by changing parameters from the m-file. This is a bit different from parametric sweep as I want to use the m-file as a function in more complicated cases.Problem is that the boundaries and domains of these models do not follow the same numbering as I change the geometric parameters.

For instance, in the first model built, the fluid domains are domain [1,2,3,4]. Then in the 2nd try I changed the size or branching angle of a channel segment. After that the numbering of fluid domains are [1,3,5,7]. This is not a problem as I work in COMSOL interface, as the numbertings are automatically coupled between geometry construction and domain&boundary settings.

But in the Matlab m-file, the domain&boundary settings does not change with geometry construction part. i.e., the desired fluid domains are changed to [1,3,5,7] in the geometry, while domain settings still remain [1,2,3,4] as fluid. Therefore the corresponding model becomes unreasonable. Conflict also exists for boundary settings.

I wonder if there is any option to solve this problem. Is it possible to force the geometry always keep the same numberings while I change the parameters? Or make sure the domain settings change with geometry numberings?

0 Replies Last Post 2012年2月29日 GMT-5 17:07
COMSOL Moderator

Hello Cheng Chen

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.