When I change some parameters in my model using Matlab/Livelink it gave me different answers comparing to comsol alone.
Here are the main codes:
R1,R2,R3, k, etc were defined correctly!
model = mphload('xxx.mph');
model.param.set('CC664', R1);
model.param.set('CC663', R2);
model.param.set('CC661', R3);
model.param.set('Pi', '0[Pa]');
model.param.set('Si', k(n), 'Angle');
model.geom('geom1').run;
model.mesh('mesh1').run;
model.sol('sol6').runAll;
model.sol('sol4').runAll;
I could not use Modelutil.remove code, but I don't think that's the problem. cause when I don't change any thing and just load the file and do the same runs it gives me correct answers, but when I change the parameters the answers are not similar with comsol answers.
WTF!!!!!!!!!!!!!!!