Hi, I've been tortured by this problem for a long time. Hope there's someone can help me. I'm doing a time dependent heat transfer problem, I need to store value h and Z that I calculated at each time step. I define h with Global ODEs and DAEs, h is calculated using h and Z (from last time step), and integral of heat flux, Z is calculated using both h from this time step and h from last time step. So I think I can define h2=function of (h1,Z1), Z2=function of(h2,h1).
My problem is how I can do (h1=h2) and (Z1=Z2) at the end of each time step and then use the new h1 and Z1 to calculate h2 and Z2 for next time step.
I've seen this, https://www.comsol.com/blogs/using-the-previous-solution-operator-in-transient-modeling/ but I still couldn't find a way for my own problem, if I use Domain ODEs and DAEs to set h1=h2 after h2 is calculated, there will be an error.
Any help or comments are appreciated. Thanks.
Jing