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.

Creating Geometry with an algorithm

Please login with a confirmed email address before reporting spam

I am wondering if there is a way of creating tedious geometries that happen to lend themselves to being defined by a simple algorithm easily, without requiring the MATLAB interface.

For example, I want to create many successive line segments in a 2D simulation whose lengths and in-between gaps are predefined with an algorithm that calculates them. I can envision doing the calculation outside of COMSOL, then importing these as a parameter list and then using it as a lookup table for a COMSOL algorithm that creates these lines. Any pointers for accomplishing this easily would be appreciated.

Thanks,
Ozgur

7 Replies Last Post Apr 26, 2017, 2:30 p.m. EDT
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Sep 13, 2016, 9:11 p.m. EDT
Have you considered using an app? They allow programming through methods written in JAVA. This can be used to automate repetitive tasks in pre- or post-processing.
Best,
Jeff
Have you considered using an app? They allow programming through methods written in JAVA. This can be used to automate repetitive tasks in pre- or post-processing. Best, Jeff

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Jan 11, 2017, 5:29 p.m. EST
I have added an example that shows how to create a repetitive geometry in the Application Builder in this thread:
www.comsol.com/community/forums/general/thread/133541/
Best,
Jeff
I have added an example that shows how to create a repetitive geometry in the Application Builder in this thread: https://www.comsol.com/community/forums/general/thread/133541/ Best, Jeff

Walter Frei COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Jan 12, 2017, 3:30 p.m. EST
Hi All,

Here is another example:
www.comsol.com/blogs/using-the-application-builder-to-create-a-koch-snowflake/

Best Regards,
Hi All, Here is another example: https://www.comsol.com/blogs/using-the-application-builder-to-create-a-koch-snowflake/ Best Regards,

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Feb 24, 2017, 8:43 a.m. EST
Updated: 8 years ago Jun 5, 2017, 10:56 a.m. EDT
There is now also a recorded webinar that shows how to generate a geometry algorithmically with the Application Builder:
www.comsol.com/events/webinar/Automating-Preprocessing-and-Postprocessing-with-the-Application-Builder-Webinar-23741
Best,
Jeff

Edit: There is a new blog illustrating the use of the App Builder to build a randomized geometry: www.comsol.com/blogs/how-to-create-a-randomized-geometry-using-model-methods/
There is now also a recorded webinar that shows how to generate a geometry algorithmically with the Application Builder: https://www.comsol.com/events/webinar/Automating-Preprocessing-and-Postprocessing-with-the-Application-Builder-Webinar-23741 Best, Jeff Edit: There is a new blog illustrating the use of the App Builder to build a randomized geometry: https://www.comsol.com/blogs/how-to-create-a-randomized-geometry-using-model-methods/

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Apr 26, 2017, 10:17 a.m. EDT
Hi Jeff and if we have never used JAVA ,, the app builder could be always used or not?
Hi Jeff and if we have never used JAVA ,, the app builder could be always used or not?

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Apr 26, 2017, 10:51 a.m. EDT
I am assuming your question is still with regards to automating geometry creation. Doing so in the Application Builder does require some Java coding.

There are many other things you can do in the Application Builder that do not require any Java coding.

You can also automate creation without using the Application Builder by using MATLAB coding instead (This requires LiveLink for MATLAB).

Jeff
I am assuming your question is still with regards to automating geometry creation. Doing so in the Application Builder does require some Java coding. There are many other things you can do in the Application Builder that do not require any Java coding. You can also automate creation without using the Application Builder by using MATLAB coding instead (This requires LiveLink for MATLAB). Jeff

Nicholas Goldring Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Apr 26, 2017, 2:30 p.m. EDT
The application builder sounds like a great way to achieve this; another easy solution may be using livelink with excel.

--
Nick
The application builder sounds like a great way to achieve this; another easy solution may be using livelink with excel. -- Nick

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.