Code covered by the BSD License

### Highlights from Waveguide Mode Solver

4.45455
4.5 | 22 ratings Rate this file 52 Downloads (last 30 days) File Size: 36.1 KB File ID: #12734 Version: 1.2

# Waveguide Mode Solver

### Thomas Murphy (view profile)

20 Oct 2006 (Updated )

Calculate the electromagnetic modes of optical waveguides.

File Information
Description

Calculate the electromagnetic eigenmodes and propagation constants of optical waveguides using the finite difference method. Features:

1. Includes vector, semivector, and scalar versions.

2. Can solve for all components of E and H.

3. Allows for perfectly-matched boundary layers.

4. Can model transverse anisotropic materials.

5. Several examples included

Also available at:

http://www.photonics.umd.edu/software/wgmodes/

Published in:

A. B. Fallahkhair, K. S. Li and T. E. Murphy, "Vector Finite Difference Modesolver for Anisotropic Dielectric Waveguides", J. Lightwave Technol. 26(11), 1423-1431, (2008).

Acknowledgements

This file inspired Fft Beam Propagation Method.

MATLAB release MATLAB 7.9 (R2009b)
03 Jun 2016 Xiaodong

### Xiaodong (view profile)

Could I use it to plot the characteristic functions to study the cutting-off condition of modes? Thanks.

do anyone knows how to plot the radiation pattern of the circular waveguide???

Comment only
15 Apr 2016 srr

### srr (view profile)

Anyway I can use this for solving modes in a partially filled rectangular waveguide?

Comment only
30 Apr 2015 Ole

### Ole (view profile)

Which function handles the hybrid modes ?
Thank you.

Comment only
09 Apr 2015 Alvin Hui

### Alvin Hui (view profile)

Are the symmetric mode and antisymmetric mode that would be set in the wgmodes.m the same as even (fundamental) mode, n_even, and odd (first order) mode, n_odd, for calculating the beating length, Lb

Lb = lambda / 2*(n_even - n_odd)

Comment only
10 Mar 2015 Ole

### Ole (view profile)

How does it handle circular waveguides ?

Comment only
15 Jan 2015 NAVEEN MISHRA

### NAVEEN MISHRA (view profile)

How can we use this for diffused and graded index waveguides?

Comment only
05 Dec 2014 Philippe DI BIN

### Philippe DI BIN (view profile)

Hello,

I think I've an error in the function "fiber".

The 2 first lines
nx = round((sum(r)+side)/dx);
ny = round((sum(r)+side)/dy);
must be replaced by
nx = round((max(r)+side)/dx);
ny = round((max(r)+side)/dy);
as r is the radius of the layer and not its thickness.

Comment only
01 Dec 2014 Philippe DI BIN

### Philippe DI BIN (view profile)

Hello,
Nice job, and looks to be very useful.
I'am interested by scalar solutions, but I see only semi-vectorial or full-vectorial solutions. Where is the scalar method hidden
Does a tutorial exist which may describe the exact role and definition of each variable describing the guide? My application is for scalar modes of optical fiber.

20 Jul 2014 Raqibul Hossen

### Raqibul Hossen (view profile)

its really great

03 Jul 2014 Long Wang

### Long Wang (view profile)

Hi, thanks for posting this package online. I wonder that if you can tell me what references used for the formulation in 'svmode'. I am using the book 'Introduction to Optical Waveguide Analysis:Solving Maxwell's Equations and the Schrodinger Equation' by Kenji Kawano. It seems the equations used here for aw, ae, an and as are partially different from that in the book.

05 Sep 2013 Jiali

### Jiali (view profile)

I want to calculate two supermodes of silicon coupler. I can do it by semivector. But I fail for fullvector methods. Can someone help me?

Comment only
05 Sep 2013 Jiali

### Jiali (view profile)

17 Jul 2013 Rizwan

### Rizwan (view profile)

Hi,

I am new to waveguide and I want to plot the mode profiles of slab waveguide as shown in this figure http://wwwhome.math.utwente.nl/~hammer/Metric/Fig/tefEy00L.gif.
n1c=1.77;
n2s=1.45;
n3cd=1.0;
d=2.0*10^-6;
lambda=1.00*10^-6;
c=3*10^8;
f=c/lambda;
omega=2*pi*f;
k0=omega/c;
neff=n2s:0.00001:n1c;
beta=k0.*neff;
r=sqrt((beta.^2)-(k0^2*n3cd^2));
q=sqrt(((k0^2)*n1c^2)-(beta.^2));
p=sqrt((beta.^2)-(k0^2*n2s^2));

x=-5*10^-6:2.0*10^-6:4*d;

Ey=zeros(length(x),length(r));

for i=1:length(x)
if (x(i)<0)
Ey(i,:)=exp(r*x(i));
% Ef1=Ey;

elseif (0<=x(i) )&& (x(i)<=2*d)
Ey(i,:)=cos(q*x(i))+sin(q*x(i));
% Ef2=Ey;

else
Ey(i,:)=(cos(2*d*q)+sin(2*d*q)).*exp(-p*(x(i)-(2*d)));
% Ef3=Ey;
end
end
% Ef=[Ef1 Ef2 Ef3];
mesh (abs(Ey));

Comment only
25 Apr 2013 Nam Tran

### Nam Tran (view profile)

That's great! But I am wondering how to calculate the effective refractive indices of the regions in and out (A and B) of the waveguide, as shown in this picture http://tinypic.com/r/25iorpi/4

Comment only
25 Apr 2013 Nam Tran

### Nam Tran (view profile)

07 Apr 2013 Michelle Rybak

### Michelle Rybak (view profile)

This is great! I am new to waveguide terminology and conventions, if I'm trying to simulate a rectangular waveguide, should I set rH = h2 or rH = 0?

Comment only
15 Oct 2012 KF

### KF (view profile)

15 Jun 2012 James

### James (view profile)

Great model. I'm using it to model SOI waveguides, and some preliminary benchmarking against published results shows good agreement for effective index calculations. Easy to use. Helpful examples show how to define waveguides.

Comment only
15 Jun 2012 James

### James (view profile)

17 Nov 2011 Muddassir Iqbal

### Muddassir Iqbal (view profile)

Great work by Thomas Murphy. Good job

03 Nov 2011 Andrzej

### Andrzej (view profile)

Well this mode solver is briliant, however I was wondering if it is possible to extract mode area from the mode solver. Means, I calculate modes with wgmodes and after get somehow the modal area? I am looking forward to hearing from you as soon as you have some time to answer.
Andrzej

18 Oct 2011 Li

### Li (view profile)

27 Oct 2009 Gabby Nzulu

### Gabby Nzulu (view profile)

I am trying to run the polymer waveguide example but I keep on receiving error messages as shown below:
generating index mesh...
??? Undefined command/function 'waveguidemeshfull'.

Error in ==> polymer_waveguide at 39
[x,y,xc,yc,nx,ny,epsxx] = waveguidemeshfull([n1,sqrt(e2xx),n3], ...
rror in ==> waveguidemesh at 31
ih = round(h/dy);

generating index mesh...
??? Undefined command/function 'waveguidemesh'.

Error in ==> silicon_channel at 23
[x,y,xc,yc,nx,ny,eps] = ...

Thankyou
Gabriel

Comment only
08 Oct 2009 Vidya

### Vidya (view profile)

good work. Can u pl. upload matlab codes for simulation of circular and rectangular waveguides? I am trying to work on the paper:"Analysing electromagnetic structures with curved boundaries on cartesian FDTD meshes" by Yang Hao and Chris J. Railton. Hope I get some help in this regard.

Comment only
19 Aug 2008 yogesh kumar

this is good

16 Feb 2008 Dingshan Gao

Yeah,it's a good frequency domain mode solver in the web. It's excellent for dielectric waveguide structures like SOI ridge waveguide.
But I find that it can not solve waveguide structures including metal material. Hope to find the improvement at this point.

11 Jan 2008 Thomas Murphy

I have recently updated the code to correct an algebraic error in the expressions for Axy(E), Axy(W), Ayx(N) and Ayx(S). Many thanks to yuchunlu_china@hotmail.com for pointing out this bug.

Comment only
08 Jan 2008 Yuchun Lu

There may be some errors in the formulation of axye axyw ayxn ayxs in "wgmodes.m".

They can't reduce to the formulation presented in "P.Lusse; P.Stuwe; etc., "Analysis of vectorial mode fields in optical waveguides by a new finite difference method," Lightwave Technology, Journal of , vol.12, no.3, pp.487-494, Mar 1994"

18 Dec 2007 Satomi Ono

I find it hard to start using it from the very beginning. A bit more explanation about how to use the code would be of great help.

29 Nov 2007 muzafar ismail

do you know how to analysis optical buried waveguide channel using finite difference method

10 Sep 2007 Vajira S

Excellent work

18 Feb 2007 Liamin Mohd Daffy

This is great. Do you know how to analyse the optical waveguide using finite element method?

05 Feb 2007 Mohamed Farhat

it is very good work it helps me so much

03 Feb 2007 cao xiangjie

it is what i need!

29 Nov 2006 eze reginald
27 Oct 2006 Felipe Vallini

It's an excellent problem for solving waveguides without difficult.
Simple and fast to use with a clean code.

02 Jan 2007

Fixed bug in auxilliary file: stretchmesh.m

10 Oct 2007

New version includes several significant improvements, including the ability to model anisotropic waveguides. Interface has been simplified.

28 Mar 2011 1.1

Minor modifications in the examples, and contour plotting subroutine.

22 Apr 2011 1.2

Corrected bug in stretchmesh routine for south and west boundaries. Also corrected a bug in wgmodes and svmodes in which dy was incorrected conjugated.

(Thanks to Jiri Petracek for discovering this bug.)