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+1 09:09
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 2024年3月13日 GMT+1 09: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/

Reply

Please read thediscussion forum rulesbefore posting.

Pleaselog into 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 theSupport Centerfor a more comprehensive response from the Technical Support team.

Baidu
map