Automated Mesh-Based Reassignment of surface Boundaries in COMSOL

Please login with a confirmed email address before reporting spam

Hi all,

I’m working on a AC/DC COMSOL model where I need to move the terminal and ground boundaries to different spots along a specific surface in my geometry. Right now, I pre-define several possible boundaries and manually assign the conditions for each run, but this gets unwieldy for automated or parametric studies.

I’m looking for a more automated (or programmatic) way to do this, ideally using outputs from each simulation to update the positions of these boundaries for the next iteration.

Specifically, I’m interested in any method that allows me to reassign boundaries based on the mesh. The boundaries themselves don’t have to “move” geometrically, as long as I can programmatically select new mesh nodes or elements as the new terminal or ground (using the initial surfaces as a reference and translating the assignment from there), that would be perfect.

Has anyone done something similar, or does anyone know of features, best practices, or scripting approaches (using MATLAB/LiveLink, Java API, etc.) that could help? My current model uses manual pre-tagged surfaces, but I’d love to streamline this process.

I have attached my current model where the surfaces are pre-defined and assigned manually. Right now, I pre-define several possible circular surfaces and manually assign the terminal and ground to the top two circular surfaces. For each new simulation, I want these boundaries to shift to the next two circles, and continue in this way. I would greatly appreciate any guidance or resources to help automate this process.

Thanks in advance for any ideas or suggestions!



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.