Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

computing mode coefficients of eigenmodes with negative wavevector components #476

Closed
oskooi opened this issue Aug 22, 2018 · 4 comments
Closed

Comments

@oskooi
Copy link
Collaborator

oskooi commented Aug 22, 2018

There doesn't seem to be a way to compute the mode coefficients of eigenmodes with negative wavevector components (i.e., diffraction orders with negative angles) given the current framework of get_eigenmode_coefficients. The binary grating example tutorial involved a normally incident source where the positive diffraction orders (i.e., those with m > 0) are equivalent to the negative orders by symmetry. This saves a factor of 2 in the computation which is nice. However for an oblique source which breaks the symmetry, it is necessary to compute the diffraction orders with negative angles. This may involve modifying get_eigenmode_coefficients to operate on modes with negative wavevector components. Currently, the wavevector components of the modes are always non negative.

@oskooi
Copy link
Collaborator Author

oskooi commented Aug 23, 2018

As an example based on the binary grating tutorial, an oblique planewave pulsed source with center frequency fcen and rotation angle theta (in radians, counter clockwise about y-axis) would correspond to a k_point of mp.Vector3(math.cos(theta),math.sin(theta),0).scale(fcen). Since the mode monitor spans the entire length of the computational cell in the y-direction, the y-component of the mode's k wavevector (computed by get_eigenmode_coefficients) will therefore be exactly equivalent to the y-component of k_point (i.e., math.sin(theta)*fcen). Currently, the y-component of the modes are always non-negative (since theta >= 0). However, when k_point is non zero, it becomes necessary to also compute modes with the negative y-component (i.e., -math.sin(theta)*fcen). These correspond to diffraction orders with negative angles. In general, the mode coefficients of the diffraction orders with positive and negative angles are not the same. This can be used as part of the validation.

@stevengj
Copy link
Collaborator

stevengj commented Aug 28, 2018

Suppose the Bloch wavevector is K, and the primitive reciprocal lattice vector is G (= 1/period in our units). Now you do the acos calculation and get a value k. This is actually just the absolute value of the wavevector, since acos always returns a positive result. One of the two must be true:

  • positive diffracted order: k = K + m*G for some nonnegative integer m
  • negative diffracted order: -k = K - m*G for some nonnegative integer m.

So, to get the right sign, just compute (k-K)/G and (k+K)/G and see which one is closer to a nonnegative integer — if it is the former, then use +k, if the latter, then -k.

(In the normal-incident case, you have a degeneracy between ±k.)

@oskooi
Copy link
Collaborator Author

oskooi commented Aug 29, 2018

What about the case when k = K - m*G for some nonnegative integer m? This should also correspond to a positive diffracted order even though it involves -m.

@stevengj
Copy link
Collaborator

stevengj commented Sep 7, 2018

Once NanoComp/mpb#71 is merged, we can modify the get-eigenmode-coefficients function to return the list of dominant k vectors (in addition to group velocity, k, etc). In diffraction problems, these dominant k vectors are exactly the k vectors of the diffracted planewave, with no post-processing needed.

@oskooi oskooi closed this as completed Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants