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.

Time Dependent Solution

Please login with a confirmed email address before reporting spam

Hi Everyone,

I have one question regarding the time dependent solution. I want to export the time dependent problem into the Simulink and interface the "time" with simulink time. I am doing by writing a M-file in MATLAB with FEMLAB.

I want to divide the time in different interval of say: t=[0:1:10].
I want to simulate first from time t=0 to 1 & save the result to make the initial condition for the next simulation.
Then solve from t=1 to 2, with the initial condition of solution at t=1. And repeat the steps likewise.

I am looking for a good reference for solving the problem like this. Are there any example available which would help to understand the process ? I am doing this by scripting, not in COMSOL GUI because I have to interface this to Simulink by writing the Matlab function.

Please help me !!!

Thank you.
~Nirmal

1 Reply Last Post Jan 31, 2010, 8:34 a.m. EST
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 31, 2010, 8:34 a.m. EST
Hi

This is not a direct reply, but it should help you to find your way out.

Typically in such situation, I repeat the sequence(s) in the COMSOL GUI (for your case try as sequences in the Solver Manager) and then I save the file and look at the "..._history.m" and sometimes too, save and look at the model as "m" file, there is a lot of info in there to understand how to handle the system with matlab

Good luck
Ivar
Hi This is not a direct reply, but it should help you to find your way out. Typically in such situation, I repeat the sequence(s) in the COMSOL GUI (for your case try as sequences in the Solver Manager) and then I save the file and look at the "..._history.m" and sometimes too, save and look at the model as "m" file, there is a lot of info in there to understand how to handle the system with matlab Good luck Ivar

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.