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.

Add spheres based on x, y, and z coordinates and radius from txt file

Please login with a confirmed email address before reporting spam

I have a list of spheres in a text file that has the format of x, y, z, and radius. Is there an easy way have COMSOL add these spheres to the geometry? The only module beyond the base product that I have is the RF Module. An example of my sphere coordinate/radius file would look something like:

10    20    5    4
13.6    18.2    5    6.1
.
.
.
42    23    5    3.1

4 Replies Last Post 2019年10月1日 GMT-4 13:51
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 2019年10月1日 GMT-4 12:19

Hi Paul,

if you are willing to do some Java coding you can automate it in a model method or in an application method. There is no option for that in the GUI.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Hi Paul, if you are willing to do some Java coding you can automate it in a model method or in an application method. There is no option for that in the GUI. Cheers Edgar

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 2019年10月1日 GMT-4 12:23
Updated: 5 years ago 2019年10月1日 GMT-4 08:23

if you are willing to do some Java coding you can automate it in a model method or in an application method. There is no option for that in the GUI.

I'm happy to do some coding, but haven't really explored the model methods/application methods much. Are there any tricks to importing the text files in these methods?

>if you are willing to do some Java coding you can automate it in a model method or in an application method. There is no option for that in the GUI. I'm happy to do some coding, but haven't really explored the model methods/application methods much. Are there any tricks to importing the text files in these methods?

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 2019年10月1日 GMT-4 12:34

Well, no tricks. The java API has most or even all standard methods, and of course the file methods available. I would recommend to check the documentation and some examples in the application library.

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Well, no tricks. The java API has most or even all standard methods, and of course the file methods available. I would recommend to check the documentation and some examples in the application library.

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 2019年10月1日 GMT-4 13:51
Updated: 5 years ago 2019年10月1日 GMT-4 09:51

OK, that doesn't sound too bad then. I'll have a look. Thanks for the tip!

OK, that doesn't sound too bad then. I'll have a look. Thanks for the tip!

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.