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.

initial condution as a function of last step results

Please login with a confirmed email address before reporting spam

Hi,

I am tring for a while to work a problem I have and I need help.

I have a running model (on the comsol-matlab interface) of electric current. the conductivity id a function of the elctric field sigma0*(1+flc2hs(Ec.normE-120,580)). This is working fine.
Now I am running a loop in which the model is running again and again and the initial conditions of the new model are the solution
( model.sol('sol1').feature('v1').set('initmethod', 'sol');
model.sol('sol1').feature('v1').set('initsol', 'sol1');
and I change the tlist.

This is running as well.

Now my problem is I want to chane the sigma0 from the conductivity function to be the ec.sigmaxx from the last time step. I dont know what is the right sintax. I cant figure out how to do it.

please help me.
Shirely

this is my loop without the change in sigma 0

model=model_conductivity;

indx=1
for idx=1:3;

start=5.0e-5+(idx-1);
stop=1+(idx-1);
%range_start=5.0e-5;
%range_stop=1;
tlist_str =[ 'range(',num2str(start),',0.05,',num2str(stop),')'];
model.study('std1').feature('time').set('tlist',tlist_str);
model.sol('sol1').feature('t1').set('tlist',tlist_str);

model.sol('sol1').feature('v1').set('initmethod', 'sol');
model.sol('sol1').feature('v1').set('initsol', 'sol1');

model.sol('sol1').runAll;

indx=indx+1
end

0 Replies Last Post 2012年10月30日 GMT-4 06:05
COMSOL Moderator

Hello Shirley Sharabi

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.