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.

How to find, save, and use the variable value in specific time in model setting

Please login with a confirmed email address before reporting spam

Deal all

I would like to ask some technical issues.

Assume that the PDE problem, where variable is called S.

when S(t=5)<=S(t=4), then save S(t=4) in a variable K. Again, if S(t=13)<=S(t=12), then save S(5=12) in that variable K. Therefore, K(1)=S(t=4) and K(2)=S(t=12).

The above problem is very easy adoped in MATLAB by using for circle and array [], but it seems that difficult adoped in COMSOL.

I would like to ask how to get the value in model setting so that it can be used in solving process.


1 Reply Last Post 2024年3月13日 GMT-4 04:09
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 8 months ago 2024年3月13日 GMT-4 04:09

Check this blog post by Walter Frei: https://www.comsol.de/blogs/using-the-previous-solution-operator-in-transient-modeling/

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Check this blog post by Walter Frei: https://www.comsol.de/blogs/using-the-previous-solution-operator-in-transient-modeling/

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.