How the optical modes are computed?

Basically the optical modes and their propagation constant b = k ne
in a wave guide is an eigen value problem. The effective refractive index ne is directly related to the propagation speed of the concerned mode.
 
  The wave equation for a field F is : 
 {d2/dx2  + d2/dy2  + d2/dz2} Fxyz + k2 n2 Fxyz =0 
becomes : 
   {d2/dx2  + d2/dy2+ k2 n2x,y} Fxy = b2
      considering  Fxyz = exp(-ibz) Fxy 

The polarisation correction and/or the vectorial form may be introduced without change in the approach. 

Discretization problem :

The discretization of the operator {...} in every point x, y of the section thanks to finite differences approximations require an important number of points, mainly because of the transcendental nature (exponential ou sine) of the profiles of mode fields. We prefer to consider the (unknown) profiles as linear combination of basis orthogonal functions :
F(x,y) = exp(-ibz) x S cij Si(x) x Sj(y). The weighting coefficients cij are now the unknowns.
 
 
For the sake of simplicity, the chosen basis consists of sine functions, null on the border of the domain of dimensions Lx xLy around the waveguide : 
Sij(x,y) = Si(x) x Sj(y) = V4 /Lx Ly) sin (i p x/Lx) sin (j p y/Ly). 
Gauss Hermite functions have also been used, because they exponentially vanish towards the outside, they are particularly adapted to represent optical modes.

How to transform a differential problem to an integration problem (Galerkine) ?

When substituting F(x,y) and its derivatives the wave equations for every couple ij becomes :
Equ(...cij...,x,y) = S cij [- ne2 -p 2/k2 (i2/Lx2 + j2/Ly2 )+ n2(x,y))] Sij(x,y) = 0
The equation Equ(...)=0 with unknowns ci,j will be verified for every point (x,y) of the domain (the waveguide section) if  :
the integral on the domain is verified for any weighting function  W(x,y)  :

The Equation Equ(...)=0 will be approximately verified if the integral is null for a set of functions which can be the functions chosen to represent the solutions, i.e. the sine functions.
This is Galerkin method widely used within finite element packages.

The system to solve :

Thus a system is obtained, of order N where N is the numeber of couples of values ij. The algebraïc equation on row ij' is :

 Aij',ij cij = ne2 cij'       with Aij',ij(n2(x,y) - no2) Sij(x,y) Sij'(x,y) dx dy
+ [if diagonal element] - p(i2/Lx2 + j2/Ly2) + no2 x area_of_the_domain
If no is the refractive index of the domain around the guide(s), the coefficients Aij',ij require only the evaluation of the integral on the sub-domains of refractive index n(x,y).
The integration can be performed in closed form on rectangular shapes. But, in order to take into account complex geometry, we propose a new technique in optical computing that can be adapted to any polygonal shapes. 

Integration on complex shapes

The computation is based on integration in a reference rectangle  (-1,1)-(1,-1) and the use of a bilinear interpolation :
E(x,y). dx dy = E(x(h,z),y(h,z)) det(J). dh, doù (h,z) are reference coordonnates varying each between  -1 et +1, the fonctions x(h,z), et y(h,z), are respectively equal to : xi et yi are the coordinates of the nodes of the quadrangle, and det(J) is the determinant of Jacobian matrix in the bilinear transform:   det(J) = a0 + a1 x z+ a2 x h with The integration method itself is the numerical Gauss-Legendre approach, developped as a product (integration in the two dimensions). It is based on the evaluation of the integrand in particular points optimised (zeros of Legendre polynomials). These evaluation are weighted and then summed up. For a given number of points, this method is much more precise than usual methods such as Simpson's rule, especially when, integrands contain transcendental functions.