Yee Lattice of meep at the boundary of two media #2623
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
The features in your "residual" image are likely due to artifacts of the bilinear interpolation Meep uses internally to center the DFT fields of the array slice on the Yee-grid voxels. (#2625 updates the docstrings for the array-slice routines to make this property explicit.) |
Beta Was this translation helpful? Give feedback.
-
Here's the code for simulation.
|
Beta Was this translation helpful? Give feedback.
-
Right. Moreover, when you get fields with So, the upshot is that neither the fields nor the ε you are getting are quite what Meep uses internally for the discretized curl equations, due to the interpolation. (Basically, the reason for all of this interpolation is that raw Yee grids are quite tricky for users to deal with.) |
Beta Was this translation helpful? Give feedback.
Right.
get_array
withmp.Dielectric
returns a kind of average scalar dielectric constant at the center of each voxel, which is much simpler than the actual dielectric constant used internally. In particular, Meep does anisotropic subpixel averaging of ε near material interfaces, as described in this paper, so internally its ε is a tensor, with different tensor components (from different averages) at every Yee lattice point.Moreover, when you get fields with
sim.get_dft_array(dft_obj, mp.Ez, …)
, it is also interpolated from the Yee lattice to the center o…