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.

Coding: Geometric Parameter Sweep

Please login with a confirmed email address before reporting spam

Hi everyone,

I designed a relatively complicated model where the 3D temperature distribution (with Joule heating) was simulated.

The model consists of a PCB, some wires and some electronic components.

My main concern is to find the maximum temperature on the whole structure, I want to write a script where COMSOL automatically moves the components (and the wires accordingly) around and computes the temp. distribution for each case. Ideally, it should also save results (plots or date).

My idea (strategy proposal): The components are rigid bodies but are composed of several shapes and functions (blocks, extrude, work planes...). I would combine these shapes into a "group" and name them (eg. resistance1, resistance2..). Each "group"s center would have a specific coordinate. By using this center`s coordinate, I will write for-loops and try to achieve the goal.

I did a similar approach in Lumerical, but don`t know if it is applicable to COMSOL.

Would really appreciate if you could help me on this. A similar tutorial would also be very helpful.

Thank you,
Bartu

2 Replies Last Post 2014年9月3日 GMT-4 05:53

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年9月3日 GMT-4 05:21
There is a function to move around an object that is part of your geometry when you are building it. You can use this also to move around an entire set of objects.

Rightclick the geometry form and look under 'transforms'.
There is a function to move around an object that is part of your geometry when you are building it. You can use this also to move around an entire set of objects. Rightclick the geometry form and look under 'transforms'.

Sven Friedel COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年9月3日 GMT-4 05:53
Dear Bartu,

you can do that by programming, e.g. using the Java API or the LiveLink for Matlab:
www.ch.comsol.com/models/livelink-for-matlab

However, you can also do a built-in Optimization without a for-loop, and leave it up to the Optimization MOdule of COMSOL (in particular one of the not gradient-based optimizers), to find the best geometry.
If you like feel free to submit a toy model here or to support@comsol.com and we may be able to guide you the way.

Best
Sven
Dear Bartu, you can do that by programming, e.g. using the Java API or the LiveLink for Matlab: http://www.ch.comsol.com/models/livelink-for-matlab However, you can also do a built-in Optimization without a for-loop, and leave it up to the Optimization MOdule of COMSOL (in particular one of the not gradient-based optimizers), to find the best geometry. If you like feel free to submit a toy model here or to support@comsol.com and we may be able to guide you the way. Best Sven

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.