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.
mphinterp function vs. Pointwise data evaluation or export
Posted 23.01.2018, 09:54 GMT-5 Acoustics & Vibrations, LiveLink for MATLAB, Geometry 3 Replies
Please login with a confirmed email address before reporting spam
Hi All,
I have got some problems about visualizing the results with Matlab. To be specific, the mphinterp function gives a very different value from the solution already stored at that point.
My code is below. Would be grateful for some insight..
THIS IS THE EXPORT FILE AND WORKS:
model.result.export.create('data1', 'Data');
model.result.export('data1').set('filename', 'D:\Users\dogan\Desktop\COMSOL_BSH_calc\Untitled.txt');
model.result.export('data1').set('gridx3', '0.145');
model.result.export('data1').set('gridy3', '2.47');
model.result.export('data1').set('gridz3', '0.1');
model.result.export('data1').set('expr', {'acpr.p_t'});
model.result.export('data1').set('location', 'grid');
model.result.export('data1').run;
THE 2ND IS THE mphinterp LINE:
SPL_rcv(iRun) = mphinterp(model,'acpr.absp','coord', [0.1447; 2.47; 0.015]);
THE 3RD OPTION IS Point EVALUATION.
model.result.numerical.create('pev1', 'EvalPoint');
model.result.numerical('pev1').selection.set([9]);
model.result.numerical('pev1').set('probetag', 'none');
model.result.numerical('pev1').setResult;
IT WORKS BUT I CANNOT SOMEHOW VISUALIZE THE VALUE AND DONT UNDERSTANT WHY THE FOLLOWING LINE GIVES ERROR:
SPL_rcv(iRun) =model.result.numerical('pev1').setResult;
Best Regards Hakan Dogan