.
---------------------------------
Bring your gang together - do your thing. Start your group.--- Begin Message ---
Hello Steven and Meep Users
I am simulating a bragg reflector. However, when i convert
the epsilon.h5 file to .png, i just get a black slab. Is there any way/ command
to visualize the grating structure.
Reagrds
Shiv
;Simulate propagation of Gausian Pulse in dielctric slab
; AND Calculating Electric Field Component at the end of a dielectric slab
;Consider propagation in Z direction and width of slab in X direction
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(reset-meep)
(define-param a 1e-6) ; base unit in meters (1e-6 = 1 um)
(define-param wavelength-center 1.535) ; central wavelength in micrometer
;define the largest wavelength in the gaussian spectrum, in base units
(define fc (/ 1 wavelength-center)) ; source center frequency
(define-param delta_index 0.003) ; the difference in refractive index
(define base_index 3.248) ; the base refractive index
(define-param eps-lo 1) ; the surrounding low-dielectric material
(define-param w 1.1) ; the thickness of the waveguide
(set! Courant 0.5)
;(define material 1)
;(define-param mat1_n 12.5);material1 index
(define mat1 (make dielectric (index (+ base_index delta_index))))
;(define material 2)
(define mat2 (make dielectric (index (- base_index delta_index))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Define the structure and the computational cell
; Here we define the size of the computational cell. Since it is 2d,
; it has no-size in the z direction.
(set! geometry-lattice (make lattice (size 450 6 no-size)))
; the default-material is what fills space where we haven't placed objects
(set! default-material (make dielectric (epsilon eps-lo)))
; a list of geometric objects to create structures in our computational cell:
; (in this case,we have a periodic medium with high and low refractive indices)
(set! geometry(append
(list
(make block
(center -200.2 0 0)
(size 50 w infinity)
(material (make dielectric (index base_index))))
(make block
(center 200.1 0 0)
(size 49.8 w infinity)
(material (make dielectric (index base_index)))))
(geometric-object-duplicates (vector3 0.24 0 0) 0 1459
(make block ; a dielectric block (a rectangle)
(center -175.14 0 0)
(size 0.12 w infinity) ; block is finite only in x & y direction
(material mat1)))
(geometric-object-duplicates(vector3 0.24 0 0) 0 1459
(make block
(center -175.02 0 0)
(size 0.12 w infinity)
(material mat2)))
))
(set-param! resolution 20)
(set! pml-layers (list (make pml (thickness 1))))
(set! sources (list (make source
(src (make gaussian-src (frequency fc) (width 303.03 )))
(component Ez) (center -220 0) (amplitude 1) (size 0
w))))
(use-output-directory "/home/shiv/Desktop/examples/FDTD/Output")
(define (Field)
(print "Field:, " (meep-time) ", " (get-field-point Ez (vector3 -200
0 0))", "(get-field-point Ez (vector3 -150 0 0))", "(get-field-point Ez
(vector3 -100 0 0))", "(get-field-point Ez (vector3 -50 0 0))",
"(get-field-point Ez (vector3 0 0 0)) ", "(get-field-point Ez (vector3 50 0
0))" , "(get-field-point Ez (vector3 100 0 0))", "(get-field-point Ez (vector3
150 0 0))", "(get-field-point Ez (vector3 200 0 0))", "(get-field-point Ez
(vector3 220 0 0)) "\n"))
(define refl ;reflected flux
(add-flux fc 0.0033 2000
(make flux-region
(center -215 0) (size 0 (* w 2)))))
(define trans ;transmitted flux
(add-flux fc 0.0033 2000
(make flux-region
(center 220 0) (size 0 (* w 2)))))
(run-until 5500 (at-beginning output-epsilon))
(display-fluxes trans refl)
;(at-every 10 Field)
;(at-every 100 (output-png Ez "-Zc dkbluered")))
---------------------------------
Bring your gang together - do your thing. Start your group.
--- End Message ---
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss