I am trying to simulate the time-dependent problem in Comsol-Simulink. Two variables on every simulation step are entered into the S-function. On every simulation step the Comsol model integrated into the S-function executed and solved through the LiveLink mechanism. In Comsol model I need to use time-dependent solver.
It seems like on every Simulink simulation step, Comsol model in executed and calculated the number of simulation steps specified by the time-dependent solver, while the input variables are constant during this process. As I understand, I have to save somehow the solution of the Comsol model on every simulation step, and this solution should be used as an initial condition for the next step. Could someone help me to understand how to conduct simulation like this correctly. Thank you in advance.
It seems like on every Simulink simulation step, Comsol model in executed and calculated the number of simulation steps specified by the time-dependent solver, while the input variables are constant during this process. As I understand, I have to save somehow the solution of the Comsol model on every simulation step, and this solution should be used as an initial condition for the next step. Could someone help me to understand how to conduct simulation like this correctly. Thank you in advance.