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.

Building a list of geometrical objects

Please login with a confirmed email address before reporting spam

Hello,

I would like to build a large number of identical geometrical objects (>100 circles of same size and material) inside a 2D box. I have a text file listing the x,y coordinates I want to use, but I don't know of any way of communicating this list to COMSOL. Manually inputting the information by creating new circles is obviously time consuming. Any help would be appreciated.

Thanks.

5 Replies Last Post May 11, 2014, 3:11 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 23, 2014, 6:23 p.m. EDT
An indirect way is possible: Draw the geometries in Matlab, and link COMSOL with Matlab. Or equivalently you can save model as .m file and write a loop there.
An indirect way is possible: Draw the geometries in Matlab, and link COMSOL with Matlab. Or equivalently you can save model as .m file and write a loop there.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 24, 2014, 3:07 a.m. EDT
Use an array. Screen capture attached.

BR
Lasse
Use an array. Screen capture attached. BR Lasse


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 24, 2014, 9:49 a.m. EDT
Hello,

Thanks for the response; however, I need to build a list of circles in specific locations. The circles will not be in an ordered array, but rather distributed in "random" locations. I may need to use MATLAB, but I was unaware if COMSOL can directly import a list of x,y coordinates and use those to define circle locations.

Cheers
Hello, Thanks for the response; however, I need to build a list of circles in specific locations. The circles will not be in an ordered array, but rather distributed in "random" locations. I may need to use MATLAB, but I was unaware if COMSOL can directly import a list of x,y coordinates and use those to define circle locations. Cheers

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 24, 2014, 9:52 a.m. EDT
Thanks for the response. My MATLAB skills are a little rusty (but I do work with some people much more knowledgable than myself), so I'll see what I can do.

Cheers
Thanks for the response. My MATLAB skills are a little rusty (but I do work with some people much more knowledgable than myself), so I'll see what I can do. Cheers

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 11, 2014, 3:11 p.m. EDT
Hi Chris,
I am also interested in this topic, did you figure out how to do it? Thank you.
Yang
Hi Chris, I am also interested in this topic, did you figure out how to do it? Thank you. Yang

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.