Hi Dr. Johnson and Meep Users, I have been attempting to realize non-uniform resolution in Meep; however, I have run
into a few problems (even after consulting the seminal paper by Dr. Pendry and the 18.369 course paper written by Dr. Johnson). To simplify the process, I have constructed a two dimensional model. In this model, I have a background medium of n=1 (default), and a rectangular box (n = 1.8) with a small, square aperture cut into its center. I then launch a plane- wave whose k-vector is fully along +x, by creating E and H continuous sources along the -z and +y directions, respectively. The low resolution model (which I am modifying with the transformation) is defined to have ten samples per wavelength. I am attempting to introduce a transformation which increases the resolution such that 100 samples are taken per wavelength - however, I do not intend to adjust the resolution along z (only along x and y). As a result, I have done the following: Set my Jacobian, J = diag(0.1 0.1 1). Therefore, the transpose, J' = diag(0.1 0.1 1) and det(J) = 0.01. Following the methodology proposed in the 18.369 course document I have scaled my epsilon and mu tensors as follows: e' = JeJ'/det(J) = e*diag(1 1 100) //where e is the orginal epsilon tensor u' = JuJ'/det(J) = u*diag(1 1 100) //where u is the original mu tensor Similarly, I have attempted to scale E and H: E' = E(J')^-1 = E*diag(10 10 1) H' = H(J')^-1 = H*diag(10 10 1) Since there are no current densities or free charge, I made no other alterations to the program. Regardless, when comparing the results of my low- res model (after being modified with a co-ordinate transform) to a model with the desired resolution under no transform, I have vastly different results. Additionally, the Ez field in the former model appears greatly attenuated (not sure why?). I'm not sure why I am not achieving correct results - are there some detail(s) I am missing? Or is there some aspect of this process I am overlooking entirely? I have pasted my code below for your convenience. Thank you for your time/help - I really do appreciate it immensely! Best Regards, Duke Anderson - SMU ------------------------------------------------------------------------------- ;This program performs the following operations: ; ; 1. Defines a two-dimensional system with a small square aperture in the middle of rectangle with a high refractive index ; ; 2. The wavelength of the system is 1.55 um, while the resolution is 10 data ;points per wavelength, or 6.45162 per um. ; BUT, we introduce a Jacobian to perform a transformation to 100 data ;points per wavelength (and scale the ; the permittivity, permeability, E and H fields accordingly). ; ; 3. The background medium is a vaccuum ; ;------------------------------------------------------------------------------ ;The following code defines key geometric parameters which may be changed to meet desired specifications. (define RESOLUTION 6.45162) ; (In this model 1 unit = 1 um) (define CellX 24) ; grid length (um) along the x-axis (define CellY 16) ; grid length (um) along the y-axis (define PmlThickness 2.0) (define BlockX 0.75) ; size of rectangular box (um) along the x-axis (define BlockY 10) ; size of rectangular box (um) along the y-axis (define BCenterX 4) ; center of box along the x-axis (define BCenterY 0) ; center of box along the y-axis (define ApertureX BlockX) ; size of aperture (um) along the x-axis (define ApertureY BlockX) ; size of aperture (um) along the y-axis (define ACenterX BCenterX) (define ACenterY BCenterY) ;------------------------------------------------------------------------------ ;The following code sets resolution of the grid space, the refractive index of ;the background medium, instantiates the ;lattice-size/grid-space, creates the pml layers and all geometric structures (set! resolution RESOLUTION) (set! default-material (make dielectric (epsilon-diag 1 1 100) (mu-diag 1 1 100))) (set! geometry-lattice (make lattice (size CellX CellY no-size))) (set! pml-layers (list (make pml (thickness PmlThickness)))) (set! geometry (list (make block (center BCenterX BCenterY) (size BlockX BlockY infinity) (material (make dielectric (epsilon-diag 3.24 3.24 324) (mu-diag 1 1 100)))) (make block (center ACenterX ACenterY) (size ApertureX ApertureY infinity) (material (make dielectric (epsilon-diag 1 1 100) (mu- diag 1 1 100)))))) ;------------------------------------------------------------------------------ ;The following Code Defines a plane-wave whose k-vector points along the +x ;direction (define WAVELENGTH 1.55) (define SourceX -8) (define SourceY 0) (define tstop 500) (set! sources (list (make source (src (make continuous-src (wavelength WAVELENGTH))) (component (* -1 Ez)) (center SourceX SourceY) (amplitude 1) (size 0 (- CellY PmlThickness PmlThickness))) (make source (src (make continuous-src (wavelength WAVELENGTH))) (component Hy) (center SourceX SourceY) (amplitude 10) (size 0 (- CellY PmlThickness PmlThickness))))) (use-output-directory) (run-until tstop (at-beginning output-epsilon) (at-beginning output-mu) (to-appended "ez" (at-every 1.0 output-efield-z))) ;------------------------------------------------------------------------------ ------------------------------------------ ;END OF PROGRAM ;------------------------------------------------------------------------------ ------------------------------------------ Nathan R. Huntoon, Ph.D. Director Innovatoin Gymnasium Southern Methodist University Lyle School of Engineering Caruth Institute for Engineering Education nhunt...@lyle.smu.edu<mailto:nhunt...@lyle.smu.edu> 214-768-1402 (office)
_______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss