I try to simulate laser manufacturing process. IT involves a lot of layer-by-layer build up. So I use comsol and make loop simulation by using matlab. I can do loop simulation of layer-by-layer but I cannot use the previous loop result as an initial condition of the next loop. Can anyone give me an idea how to handle this problem?