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 2018年9月13日 GMT-4 17:14
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 2018年9月13日 GMT-4 17:14
Updated: 6 years ago 2018年9月14日 GMT-4 01:43

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.