maxwellfdfd icon indicating copy to clipboard operation
maxwellfdfd copied to clipboard

power coupled to a waveguide mode

Open neonot opened this issue 7 years ago • 1 comments

Hi, I want to evaluate power coupled to a mode. I can evaluate the power at a patch using the provided function for this, but I am not getting too far with the overlap integral between the power and the waveguide mode (some info here https://kb.lumerical.com/en/ref_scripts_overlap.html). Any help is much appreciated.

PS: Also it is not clear where the wavelength dependence of the mode calculation comes in?

Thanks.

neonot avatar Oct 11 '16 12:10 neonot

I guess you have calculated a wave emanating from some source. To calculate the overlap integral, you need to calculate the waveguide mode separately. This can be done by setting up a waveguide geometry and calculate its mode using ModalSrc as a source.

Now that you have a wave and mode profile, you can calculate the overlap integral between them in principle. Unfortunately, there is no function implemented for this purpose, so you will need to write your own script for this.

First thing you need to do is to retrieve the fields and their locations. Each of the Cartesian components of the solution E and H fields are a Scalar3d object, and Scalar3d has data_expanded() function that returns the field array and locations.

Then, you will need to implement the overlap integral. The tricky part is that the solution E and H fields are not defined at the same location due to the interlaced E and H grids in the finite-difference scheme. Therefore, you need to interpolate the E and H fields such that they are at the same locations. (Otherwise you cannot multiply them.) You can use MATLAB's interpn() function.

wsshin avatar Oct 18 '16 14:10 wsshin