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.

Setting COMSOL Initial Conditions from Matlab

Please login with a confirmed email address before reporting spam

Hello All,

I am looking to run a comsol model for a given period of time and then transfer the comsol results into a matlab program. These conditions will be modified inside of matlab and will then be sent back to comsol as the new initial conditions. Comsol will then run for another period of time and will once again transfer its results back to matlab for modification and so on and so forth.

In short I'm trying to write an algorithm that alternates between comsol and matlab using the final conditions of one to set the initial conditions of another.

I am very familiar with matlab and am relatively new to comsol. So far I'm having difficulty setting the instantaneous initial conditions inside of comsol for each point in the mesh(especially from a script). I'm also not sure how to resolve the indices of the results vector into physical locations within the mesh.

Any help would be greatly appreciated,

Josh

1 Reply Last Post Oct 14, 2010, 2:59 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 14, 2010, 2:59 p.m. EDT
Hi
not been that far at that moment but this definitively on my "to do list" within the next 2-3 months [ have a look at the thread I initiated today regarding improvement on 4.1. it is related to that problem at least from my perspective [ changing geometry in matlab and resending "updated" conditions/initial solution to comsol .. back and forth...
"
I will be reading what will be posted here with great interrested and might have something to share in a not so far future

In my opinion, the api and livelink documentaiton are a MUST READ before embarking in such a project

JF
Hi not been that far at that moment but this definitively on my "to do list" within the next 2-3 months [ have a look at the thread I initiated today regarding improvement on 4.1. it is related to that problem at least from my perspective [ changing geometry in matlab and resending "updated" conditions/initial solution to comsol .. back and forth... " I will be reading what will be posted here with great interrested and might have something to share in a not so far future In my opinion, the api and livelink documentaiton are a MUST READ before embarking in such a project JF

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.