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.

Extraction at Arbitrary Points and NaN

Please login with a confirmed email address before reporting spam

I have gone through the matlab-comsol livelink manual, and I understand that the NaN output value occurs when the extraction point is outside of the computation domain; but in this case the point is within the domain and I am still getting the NaN value. Please, I will appreciate any assistance or suggestions.

Kindly find as attached the files in case you have sufficient time to run and check.

Regards

FEMI


2 Replies Last Post 16 giu 2016, 15:21 GMT-4
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 16 giu 2016, 03:55 GMT-4
Hi

Your mesh looks too coarse to get any reliable result for your flow problem. Hence it could very well be the case that the variables you are trying to evaluate are in fact NaN.

--
Lars Gregersen
Comsol Denmark
Hi Your mesh looks too coarse to get any reliable result for your flow problem. Hence it could very well be the case that the variables you are trying to evaluate are in fact NaN. -- Lars Gregersen Comsol Denmark

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 16 giu 2016, 15:21 GMT-4
Thanks Lars. I was able to extract when i put the coordinates directly in the mphinterp command line, even with the coarse mesh (i used the coarse mesh just to hasten the computation, but I am currently running with finer mesh now), that is:
coord28a=[5.4569;-12.0259];
mphinterp(model,'p','coord',coord28a,'dataset'​,'dset2','t',20);

but when i used the same coordinates in formular form i get NaN. Please, if you will be able to look at the attached MATLAB code line 233 to 268. This is the main code.
Thanks Lars. I was able to extract when i put the coordinates directly in the mphinterp command line, even with the coarse mesh (i used the coarse mesh just to hasten the computation, but I am currently running with finer mesh now), that is: coord28a=[5.4569;-12.0259]; mphinterp(model,'p','coord',coord28a,'dataset'​,'dset2','t',20); but when i used the same coordinates in formular form i get NaN. Please, if you will be able to look at the attached MATLAB code line 233 to 268. This is the main code.

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.