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 26 apr 2017, 14:30 GMT-4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 13 set 2016, 21:11 GMT-4
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 11 gen 2017, 17:29 GMT-5
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 12 gen 2017, 15:30 GMT-5
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: 7 years ago 24 feb 2017, 08:43 GMT-5
Updated: 7 years ago 5 giu 2017, 10:56 GMT-4
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: 7 years ago 26 apr 2017, 10:17 GMT-4
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: 7 years ago 26 apr 2017, 10:51 GMT-4
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: 7 years ago 26 apr 2017, 14:30 GMT-4
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.