How To Find Specific Geometry Name/Identifiers in MATLAB with COMSOL

Please login with a confirmed email address before reporting spam

Hi,

I'm using COMSOL with MATLAB to build a model which can be altered based on inputs in the MATLAB script to change the geometry and applied voltages in COMSOL. I've been able to change the geometry as needed, however, I'm having trouble with setting the selection for terminals where the voltage would be applied. For example, normally in the COMSOL GUI you would select the terminal by selecting the relevant geometry in the display window. In this case, I need a way to get the "name/number" or identifier of the relevant edge of the electrodes I've created in the MATLAB so I can use that as an input to set my voltage terminal.

Thank you!


3 Replies Last Post Nov 5, 2020, 7:22 AM EST
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 months ago Jul 27, 2020, 3:52 PM EDT

Hello Alisha,

This blog post addresses your question, I believe.

Best regards,

Jeff

-------------------
Jeff Hiller
Hello Alisha, [This blog post](https://www.comsol.com/blogs/manually-work-entity-numbers-selections) addresses your question, I believe. Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 1 month ago Oct 27, 2020, 2:03 PM EDT

Hello Jeff,

Is it possible to go one step further and obtain the IDs/coordinates of mesh nodes on a certain geometric entity like an edge?

Thanks, Mohamed Abdelhamid

Hello Jeff, Is it possible to go one step further and obtain the IDs/coordinates of mesh nodes on a certain geometric entity like an edge? Thanks, Mohamed Abdelhamid

Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 weeks ago Nov 5, 2020, 7:22 AM EST
Updated: 3 weeks ago Nov 8, 2020, 4:09 AM EST

Hi

Use mphgetcoords to get coordinates if you know the entity number

Use mphselectbox or mphselectcoords to get the entity numbers if you know (something about) their coordinates.

If you need more info then please exactly what info you have and what you would like to get.

-------------------
Lars Gregersen
Comsol Denmark
Hi Use mphgetcoords to get coordinates if you know the entity number Use mphselectbox or mphselectcoords to get the entity numbers if you know (something about) their coordinates. If you need more info then please exactly what info you have and what you would like to get.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.