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.

Comsol/ matlab interface

Please login with a confirmed email address before reporting spam

Hello,
I posted this a few days back and so far there have no responses. My apologies for trying it again, but would greatly appreciate any feedback.
I have set a initial value of effective index in comsol as 1.42 but when I look in the Matlab script generated by Comsol I found that this value is :0-5.877819e6*i (see below)
( fem.sol=femeig(fem, 'solcomp',{'tExEy21','tExEy10','tExEy20','ez'}, ... 'outcomp',{'tExEy21','tExEy10','tExEy20','ez'}, neigs',50,'shift',0-5.877819e6*i);
And the other problem is to return the effective index of all calculated modes. For this, I use the following function : fem.sol.lambda but the returned results is not equal to result I found directly with comsol.
Recently, I have used the following function :
for i = 1:50
I = posteval(fem,'neff_rfwv','dl',1,'solnum',1);
End
I(1,1).d return the effective index of the first solution
The data contains the real part of the effective index. Can you please help me to return an exactly value of effective index


Best regards,
Ilyes

4 Replies Last Post May 10, 2010, 2:14 a.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 28, 2010, 10:20 a.m. EST
Hi

For me, the complex value you see is not "n" nor "neff", but "beta" from the definition eigenvalue:

lambda = i*beta

and

neff = beta/k0

with k0 being the k0=2*pi/lambda0

these are also linked to the normalized frequency of the fibre "V" for a fibre core radius "a" (see attached jpg)

so you must do some maths to get "neff" (that is done inside Comsol for "neff_rfwf" have a look at the "Model tree - scalar variables" and for other the internals definition in "physics - equations systems - subdomain equations - variables" (unfortunately these cannot be easily sorted by names !!)^

Hope this helps
Good luck
Ivar
Hi For me, the complex value you see is not "n" nor "neff", but "beta" from the definition eigenvalue: lambda = i*beta and neff = beta/k0 with k0 being the k0=2*pi/lambda0 these are also linked to the normalized frequency of the fibre "V" for a fibre core radius "a" (see attached jpg) so you must do some maths to get "neff" (that is done inside Comsol for "neff_rfwf" have a look at the "Model tree - scalar variables" and for other the internals definition in "physics - equations systems - subdomain equations - variables" (unfortunately these cannot be easily sorted by names !!)^ Hope this helps Good luck Ivar


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 28, 2010, 2:52 p.m. EST
Dear Ivar,

Could you further shed some light on the significance of output components tExEx21, tExEy0 and tExEy20? I am essentially interested in knowing how comsol computes field values like Ex and Ey from them? For Ez I guess it is obtained simply by multiplying ez by alpha, as explained in the rfuserguide.

Thanks in advance
Dear Ivar, Could you further shed some light on the significance of output components tExEx21, tExEy0 and tExEy20? I am essentially interested in knowing how comsol computes field values like Ex and Ey from them? For Ez I guess it is obtained simply by multiplying ez by alpha, as explained in the rfuserguide. Thanks in advance

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 28, 2010, 5:43 p.m. EST
Hi

well sorry but that goes further than my knowledge of the interiours of that module, I stop at tEx tEy etc the tangeant Electric field along x, y ...

When I search to understand the interiours, I check the two-three location where this is normally define in COMSOL: Physics Eqution systems, and the equation nodes of the model tree, and then I cross check against the documentation. But I did it just now, and I found nothing on tExEx etc.
Then I study the history.m files and finally I save a model as a m file with the option show all defults.

Normally this does the job for me

Hope it still helps you on the way
Good luck
Ivar
Hi well sorry but that goes further than my knowledge of the interiours of that module, I stop at tEx tEy etc the tangeant Electric field along x, y ... When I search to understand the interiours, I check the two-three location where this is normally define in COMSOL: Physics Eqution systems, and the equation nodes of the model tree, and then I cross check against the documentation. But I did it just now, and I found nothing on tExEx etc. Then I study the history.m files and finally I save a model as a m file with the option show all defults. Normally this does the job for me Hope it still helps you on the way Good luck Ivar

MOHD FIRDAUS BIN ZAKARIA

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 10, 2010, 2:14 a.m. EDT
can fluid dynamic determine water hammer phenomena in pipeline system?
can fluid dynamic determine water hammer phenomena in pipeline system?

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.