Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
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.
Interp numerical feature is not updated automatically?
Posted 5 mai 2011, 19:28 UTC−4 Interfacing Version 4.1 2 Replies
Please login with a confirmed email address before reporting spam
Hi!
I was trying to run several cases with different parameters and plot results, but after switching to `tout` taken by solver (and back), I noticed that `Interp` numerical feature `flux` is not getting updated:( At least its length. An excerpt follows. Does anybody experience similar problem?
>> sol1.feature('t1').set('tout', 'tlist');
sol1.runAll;
model.result.numerical('flux').set('coord', -2);
model.result.numerical('flux').set('expr', 'dl.U');
fprintf('interp: %g\n',length(model.result.numerical('flux').getReal));
fprintf('mphinterp: %g\n', length(mphinterp(model, 'dl.U', 'coord', -2)));
interp: 105
mphinterp: 601
>> model.result.numerical('flux').run;
sol1.runAll;
model.result.numerical('flux').set('coord', -2);
model.result.numerical('flux').set('expr', 'dl.U');
fprintf('interp: %g\n',length(model.result.numerical('flux').getReal));
fprintf('mphinterp: %g\n', length(mphinterp(model, 'dl.U', 'coord', -2)));
interp: 105
mphinterp: 601
>> sol1.feature('t1').set('tout', 'tsteps');
model.result.numerical('flux').run;
sol1.runAll;
model.result.numerical('flux').set('coord', -2);
model.result.numerical('flux').set('expr', 'dl.U');
fprintf('interp: %g\n',length(model.result.numerical('flux').getReal));
fprintf('mphinterp: %g\n', length(mphinterp(model, 'dl.U', 'coord', -2)));
interp: 105
mphinterp: 118
Shall I run something before reading values? Do I forget to do something else? As a workaround I can switch to use mphinterp().
It is a bit annoying to recreate `Interp` feature inside of the loop.
>> model.result.numerical.remove('flux');
model.result.numerical.create('flux', 'Interp');
model.result.numerical('flux').set('coord', -2);
model.result.numerical('flux').set('expr', 'dl.U');
fprintf('interp: %g\n',length(model.result.numerical('flux').getReal));
interp: 118
I was trying to run several cases with different parameters and plot results, but after switching to `tout` taken by solver (and back), I noticed that `Interp` numerical feature `flux` is not getting updated:( At least its length. An excerpt follows. Does anybody experience similar problem?
>> sol1.feature('t1').set('tout', 'tlist');
sol1.runAll;
model.result.numerical('flux').set('coord', -2);
model.result.numerical('flux').set('expr', 'dl.U');
fprintf('interp: %g\n',length(model.result.numerical('flux').getReal));
fprintf('mphinterp: %g\n', length(mphinterp(model, 'dl.U', 'coord', -2)));
interp: 105
mphinterp: 601
>> model.result.numerical('flux').run;
sol1.runAll;
model.result.numerical('flux').set('coord', -2);
model.result.numerical('flux').set('expr', 'dl.U');
fprintf('interp: %g\n',length(model.result.numerical('flux').getReal));
fprintf('mphinterp: %g\n', length(mphinterp(model, 'dl.U', 'coord', -2)));
interp: 105
mphinterp: 601
>> sol1.feature('t1').set('tout', 'tsteps');
model.result.numerical('flux').run;
sol1.runAll;
model.result.numerical('flux').set('coord', -2);
model.result.numerical('flux').set('expr', 'dl.U');
fprintf('interp: %g\n',length(model.result.numerical('flux').getReal));
fprintf('mphinterp: %g\n', length(mphinterp(model, 'dl.U', 'coord', -2)));
interp: 105
mphinterp: 118
Shall I run something before reading values? Do I forget to do something else? As a workaround I can switch to use mphinterp().
It is a bit annoying to recreate `Interp` feature inside of the loop.
>> model.result.numerical.remove('flux');
model.result.numerical.create('flux', 'Interp');
model.result.numerical('flux').set('coord', -2);
model.result.numerical('flux').set('expr', 'dl.U');
fprintf('interp: %g\n',length(model.result.numerical('flux').getReal));
interp: 118
2 Replies Last Post 12 mai 2011, 09:36 UTC−4