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.

Search for modes around... in Mode Analysis (RF module)

Please login with a confirmed email address before reporting spam

Hello,
I'm trying to obtain the dispersion relation of a graphene waveguide which I previously analyzed via Matlab and on paper.
In order to do this I set up a parametric sweep on frequency (angular pulse, in fact) and with Mode Analysis module I get what I need. I selected as Transform the option "Out of plane wavenumber", which is imported from a Matlab script to set up the parameter "Search for modes around".
The problem is that I cannot include the Interpolation function that I created as from Matlab files because of the error:
"COMSOL error: unknow function name. Property: shift (search for modes around)"
and by fixing it as parameter or embedding a numerical value makes the solver unable to evaluate the desired mode over a wide range of frequencies, while for small ranges the result is acceptable.

Any ideas on how fix the problem or better ways to procede?

6 Replies Last Post 28 gen 2015, 04:11 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 14 nov 2014, 06:41 GMT-5
I managed to solve this by developing a Matlab script with LiveLink that updates every parameter before rerunning (both omega on the search point)... if someone can propose a more elegant solution is still well accepted!
I managed to solve this by developing a Matlab script with LiveLink that updates every parameter before rerunning (both omega on the search point)... if someone can propose a more elegant solution is still well accepted!

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 25 gen 2015, 17:23 GMT-5
Hi Andrea,

I have been trying to do the same thing as well (i.e. updating the value of search for mode around). I am very new to Comsol and Matlab. If you dont mind, could you please give me some tips on how to write the matlab code to update this value?

Thank you so so much.
Ngoc
Hi Andrea, I have been trying to do the same thing as well (i.e. updating the value of search for mode around). I am very new to Comsol and Matlab. If you dont mind, could you please give me some tips on how to write the matlab code to update this value? Thank you so so much. Ngoc

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 26 gen 2015, 05:49 GMT-5
Hi,
core code strings to solve the problem are the following

model.study('std1').feature('mode').set('shift', num2str(wavenumber));
model.sol('sol1').feature('e1').set('shift',num2str(wavenumber));

where wavenumber is the result of the previous simulation obtained from mpglobal();
Hi, core code strings to solve the problem are the following model.study('std1').feature('mode').set('shift', num2str(wavenumber)); model.sol('sol1').feature('e1').set('shift',num2str(wavenumber)); where wavenumber is the result of the previous simulation obtained from mpglobal();

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 27 gen 2015, 12:18 GMT-5
Hi,

Thank you so much for your reply. I have managed to modify the search around value. As I would like to run a wavelength sweep, I have created a for loop to do this and update the search around value accordingly. However, I found that If i do this, my matlab code is not very robust, it takes just forever to run.

Do you know anyway that I can update the search around value using parametric sweep rather than for loop?

Thank you.
Ngoc
Hi, Thank you so much for your reply. I have managed to modify the search around value. As I would like to run a wavelength sweep, I have created a for loop to do this and update the search around value accordingly. However, I found that If i do this, my matlab code is not very robust, it takes just forever to run. Do you know anyway that I can update the search around value using parametric sweep rather than for loop? Thank you. Ngoc

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 27 gen 2015, 13:25 GMT-5
Sorry but the same here.
Livelink seem to be very demanding and much more slow than desktop version.
I solved using a workstation in my university; I believe that frequency sweep should be done in other study modules, perhaps, but in my situation I could not replicate results in other way than using Mode Analysis.

Sorry if I could not be much helpful
Sorry but the same here. Livelink seem to be very demanding and much more slow than desktop version. I solved using a workstation in my university; I believe that frequency sweep should be done in other study modules, perhaps, but in my situation I could not replicate results in other way than using Mode Analysis. Sorry if I could not be much helpful

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 28 gen 2015, 04:11 GMT-5
Hi Andrea,

Thanks a lot for your help.

Ngoc
Hi Andrea, Thanks a lot for your help. Ngoc

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.