From 054ac994d501c214af6f7d8e90c86b8ab24a5a6d Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 26 Aug 2019 00:17:52 -0700 Subject: [PATCH] Don't perform dx_prop wavenumber correction in waveguide_mode_2d It's technically a correction for discretization in the third direction --- meanas/fdfd/waveguide_mode.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/meanas/fdfd/waveguide_mode.py b/meanas/fdfd/waveguide_mode.py index 59a3f37..3dbdfd8 100644 --- a/meanas/fdfd/waveguide_mode.py +++ b/meanas/fdfd/waveguide_mode.py @@ -12,7 +12,6 @@ def solve_waveguide_mode_2d(mode_number: int, dxes: dx_lists_t, epsilon: vfield_t, mu: vfield_t = None, - dx_prop: float = 0, ) -> Dict[str, complex or field_t]: """ Given a 2d region, attempts to solve for the eigenmode with the specified mode number. @@ -22,8 +21,6 @@ def solve_waveguide_mode_2d(mode_number: int, :param dxes: Grid parameters [dx_e, dx_h] as described in meanas.types :param epsilon: Dielectric constant :param mu: Magnetic permeability (default 1 everywhere) - :param dx_prop: The cell width in the the propagation direction, used to apply a - correction to the wavenumber. Default 0 (i.e. continuous propagation direction) :return: {'E': List[numpy.ndarray], 'H': List[numpy.ndarray], 'wavenumber': complex} """ @@ -49,12 +46,6 @@ def solve_waveguide_mode_2d(mode_number: int, e, h = waveguide.normalized_fields(v, wavenumber, omega, dxes, epsilon, mu) - ''' - Perform correction on wavenumber to account for numerical dispersion. - ''' - if dx_prop != 0: - wavenumber = 2 / dx_prop * numpy.sin(wavenumber * dx_prop / 2) - shape = [d.size for d in dxes[0]] fields = { 'wavenumber': wavenumber, @@ -110,7 +101,6 @@ def solve_waveguide_mode(mode_number: int, 'dxes': [[dx[i][slices[i]] for i in order[:2]] for dx in dxes], 'epsilon': vec([epsilon[i][slices].transpose(order) for i in order]), 'mu': vec([mu[i][slices].transpose(order) for i in order]), - 'dx_prop': dx_prop, } fields_2d = solve_waveguide_mode_2d(mode_number, omega=omega, **args_2d)