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.

Can one program Comsol to iterate through the physics of a model?

Please login with a confirmed email address before reporting spam

I have an electrode stack and need to solve for the potential at each one of the 37 electrodes when only one is powered while the rest aren't. That is, Enable electrode 1 at 1V, the rest of the electrodes disabled, solve, export data as .txt Enable electrode 2 at 1V, disable previous electrode, solve, export data as .txt . . . I would have to do this 37 times, when each computation takes ~14 mins. Is there a way to let COMSOL running with this iteration or is this the essence of COMSOL's manual labor?

-Dalila


1 Reply Last Post 13 set 2018, 17:14 GMT-4
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 13 set 2018, 17:14 GMT-4
Updated: 6 years ago 14 set 2018, 01:43 GMT-4

Hi Dalila,

There are two types of answers to your question. For the general case, you can use a Model Method. You could also use scripting through Matlab or the Java API.

You can find some instructive texts about model methods on our blog, for example

https://www.comsol.se/blogs/how-to-automate-physics-choices-and-studies-using-model-methods/

and

https://www.comsol.se/blogs/how-to-use-model-methods-to-accelerate-your-comsol-workflow/

For AC/DC in particular, there are however special methods for setting up sweeps over boundary conditions. Seach for 'sweep' in the AC/DC module documentation.

Regards,
Henrik

-------------------
Henrik Sönnerlind
COMSOL
Hi Dalila, There are two types of answers to your question. For the general case, you can use a Model Method. You could also use scripting through Matlab or the Java API. You can find some instructive texts about model methods on our blog, for example and For AC/DC in particular, there are however special methods for setting up sweeps over boundary conditions. Seach for 'sweep' in the AC/DC module documentation. Regards, Henrik

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.