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

document special_kz algorithm #1025

Closed
stevengj opened this issue Sep 18, 2019 · 1 comment · Fixed by #1047
Closed

document special_kz algorithm #1025

stevengj opened this issue Sep 18, 2019 · 1 comment · Fixed by #1047

Comments

@stevengj
Copy link
Collaborator

Would be good to have a document that writes down exactly what equations we are evolving in this case.

@stevengj
Copy link
Collaborator Author

The basic algorithm is documented here:

meep/src/step_db.cpp

Lines 121 to 133 in 4e1802b

/* In 2d with beta != 0, add beta terms. This is a trick to model
an exp(i beta z) z-dependence but without requiring a "3d"
calculation and without requiring complex fields. Looking at the
z=0 2d cross-section, the exp(i beta z) term adds an i \beta
\hat{z} \times cross-product to the curls, which couples the TE
and TM polarizations. However, to avoid complex fields, in the
case of real fields we implicitly store i*(TM fields) rather than
the TM fields, in which case the i's cancel in the update
equations. (Mathematically, this is equivalent to looking at the
superposition of the fields at beta and the timereversed fields
at -beta.) The nice thing about this is that most calculations
of flux, energy, etcetera, are insensitive to this implicit "i"
factor. For complex fields, we implement i*beta directly. */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant