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.

Mismatch between calculated answer from Comsol and Matlab

Please login with a confirmed email address before reporting spam

Anyone know why the result generated from Comsol (4.2) different from the result calculated by using Matlab?

I am doing 2D mode analysis for photonic crystal fibre, i draw and defined all parameters and set up in the Comsol, then i run it to get the result (effective refractive index).
After that, i saved the comsol as M.file and run the M.file without any modification.

both the answer is not the same...
why????

anyone can give me some possible solution?

thanks

3 Replies Last Post 24 set 2013, 14:02 GMT-4
COMSOL Moderator

Hello Tee Din Chai

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.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 nov 2012, 11:15 GMT-5
Hi Tee Din Chai and everyone else
did you find a solution to your problem? I am just experiencing exactly the same phenomenon, and I do not know what to do about it! The solution given my comsol matches my expection by the way, but the one provided by matlab differs significantly. If you found out anything helpful, I would be very glad if you let me know about - or maybe anyone else has an idea, why this problem could occur? I checked all the solver settings, and included the mesh generated my comsol and saved in a file to make sure that the only difference is the solving step to be done by matlab.
All best,
Sabine
Hi Tee Din Chai and everyone else did you find a solution to your problem? I am just experiencing exactly the same phenomenon, and I do not know what to do about it! The solution given my comsol matches my expection by the way, but the one provided by matlab differs significantly. If you found out anything helpful, I would be very glad if you let me know about - or maybe anyone else has an idea, why this problem could occur? I checked all the solver settings, and included the mesh generated my comsol and saved in a file to make sure that the only difference is the solving step to be done by matlab. All best, Sabine

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 set 2013, 04:50 GMT-4
Same problem!

If anyone can share some ideas about this problem?

Thanks,
Fei
Same problem! If anyone can share some ideas about this problem? Thanks, Fei

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 set 2013, 14:02 GMT-4
hey there,
right now i am not sure how the solution was to the problem i was asking here about, but for sure there are some functions which make problems when used with matlab - for example, some commands need to be put 'further down' in the skript when using matlab, like definitions of functions, which are filled with content only lateron, produce an error if there are two equation systems defined, and one is solved in between. i dont think this is helpful for you, since your skript seems to work, just with results differing from those obtained with the comsol interface. (i guess you checked the number of displayed digits etc.) so sorry, cannot help you there out now (or what exactly is the difference you are observing?)
good luck!!
hey there, right now i am not sure how the solution was to the problem i was asking here about, but for sure there are some functions which make problems when used with matlab - for example, some commands need to be put 'further down' in the skript when using matlab, like definitions of functions, which are filled with content only lateron, produce an error if there are two equation systems defined, and one is solved in between. i dont think this is helpful for you, since your skript seems to work, just with results differing from those obtained with the comsol interface. (i guess you checked the number of displayed digits etc.) so sorry, cannot help you there out now (or what exactly is the difference you are observing?) good luck!!

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.