How to stop the time-dependent solver and store the results when the requred conditions are fulfilled?

Please login with a confirmed email address before reporting spam

I am trying to perform a parameteric study of a equation, like , where is the unknown and is the parameter.

Without source terms, this dynamic equation will ultimately evolve into a steady equation, which is nonlinear and hard to solve directly using the stationary solver. And what really interests me is the solutions of this ultimate steady equation under various values of .

The solving strategy is using an auxiliary sweep for . And for each value of , perform a time-dependent study.

Since only the steady solution is cared, a flag variable, like the energy , is need to tell if the steady solution is reached. For example, if the change of is tiny for more than 100 steps, it is confident to say that the steady solution has been reached. Then, the time-dependent solver should stop and the steady solution should be stored. Next, the time-dependent solver shifts to the next value of . It's like a 'loop-until'. The workflow is illustrated in the following graph. workflow

Is there any way to implement this workflow in comsol? It appears to me that the key is how to stop the time-dependent solver, store the steady solution, and shift the time-dependent solver to the next value of the parameter, when the steady condition is fulfilled.

I would appreciate it if any one could shed lights on this.

Thank you so much!

Best,

HCL


The graph about the illustration of workflow is attached below, in case it is not properly shown in the text.



0 Replies Last Post 15 mars 2024, 05:54 UTC−4
COMSOL Moderator

Hello HC L

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.