analysis-tutorial.html

来自「麻省理工的计算光子晶体的程序」· HTML 代码 · 共 504 行 · 第 1/2 页

HTML
504
字号
</tr><tr><td><img src="tri-rods-ez1.gif" border="1" width="83" height="96"></td><td><img src="tri-rods-ez2.gif" border="1" width="83" height="96"></td><td><img src="tri-rods-ez3.gif" border="1" width="83" height="96"></td><td><img src="tri-rods-ez4.gif" border="1" width="83" height="96"></td><td><img src="tri-rods-ez5.gif" border="1" width="83" height="96"></td><td><img src="tri-rods-ez6.gif" border="1" width="83" height="96"></td><td><img src="tri-rods-ez7.gif" border="1" width="83" height="96"></td><td><img src="tri-rods-ez8.gif" border="1" width="83" height="96"></td></tr></table><p>Your images should look the same as the ones above.  If we hadn'tincluded <code>fix-efield-phase</code> before<code>output-efield-z</code> in the ctl file, on the other hand, yourswould have differed slightly (e.g. by a sign or a lattice shift),because by default the phase is <em>random</em>.<p>When we look at the real parts of the fields, we are really lookingat the fields of the modes at a particular instant in time (and theimaginary part is half a period later).  The point in time (relativeto the periodic oscillation of the state) is determined by the phaseof the eigenstate.  The <code>fix-efield-phase</code> band functionpicks a canonical phase for the eigenstate, giving us a deterministicpicture.<p>We can see several things from these plots:<p>First, the origin of the band gap is apparent.  The lowest band isconcentrated within the dielectric rods in order to minimize itsfrequency.  The next bands, in order to be orthogonal, are forced tohave a node within the rods, imposing a large "kinetic energy" (and/or"potential energy") cost and hence a gap.  Successive bands have moreand more complex nodal structures in order to maintain orthogonality.(The contrasting absence of a large TE gap has to do with boundaryconditions.  The perpendicular component of the displacement fieldmust be continuous across the dielectric boundary, but the parallelcomponent need not be.)<p>We can also see the deep impact of symmetry on the states.  The Kpoint has C<sub>3v</sub> symmetry (not quite the full C<sub>6v</sub>symmetry of the dielectric structure).  This symmetry group has onlyone two-dimensional representation--that is what gives rise to thedegenerate pairs of states (2/3, 4/5, and 7/8), all of which fall intothis "p-like" category (where the states transform like two orthogonaldipole field patterns, essentially).  The other two bands, 1 and 6,transform under the trivial "s-like" representation (with band 6 justa higher-order version of 1).<h2><a name="diamond">Diamond Lattice of Spheres</a></h2><blockquote>"Then were the entrances of this world made narrow, full of sorrow andtravail: they are but few and evil, full of perils, and verypainful." (<i>Ezra</i> 4:7)</blockquote><p>Now, let us turn to a three-dimensional structure, a diamondlattice of dielectric spheres in air.  The basic techniques to computeand analyze the modes of this structure are the same as in twodimensions, but of course, everything becomes more complicated in 3d.It's harder to find a structure with a complete gap, the modes are nolonger polarized, the computations are far bigger, and visualizationis much more difficult, for starters.<p>(The band gap of the diamond structure was first identified in:K. M. Ho, C. T. Chan, and C. M. Soukoulis, "Existence of a photonicgap in periodic dielectric structures," <i>Phys. Rev. Lett.</i><b>65</b>, 3152 (1990).)<p>The control file for this calculation, which can also be found in<code>mpb-ctl/examples/diamond.ctl</code>, consists of:<h3><a name="diamond-ctl">Diamond control file</a></h3><pre>(set! geometry-lattice (make lattice                         (basis-size (sqrt 0.5) (sqrt 0.5) (sqrt 0.5))                         (basis1 0 1 1)                         (basis2 1 0 1)                         (basis3 1 1 0))); Corners of the irreducible Brillouin zone for the fcc lattice,; in a canonical order:(set! k-points (interpolate 4 (list                               (vector3 0 0.5 0.5)            ; X                               (vector3 0 0.625 0.375)        ; U                               (vector3 0 0.5 0)              ; L                               (vector3 0 0 0)                ; Gamma                               (vector3 0 0.5 0.5)            ; X                               (vector3 0.25 0.75 0.5)        ; W                               (vector3 0.375 0.75 0.375))))  ; K; define a couple of parameters (which we can set from the command-line)(define-param eps 11.56) ; the dielectric constant of the spheres(define-param r 0.25)    ; the radius of the spheres(define diel (make dielectric (epsilon eps))); A diamond lattice has two "atoms" per unit cell:(set! geometry (list (make sphere (center 0.125 0.125 0.125) (radius r)                           (material diel))                     (make sphere (center -0.125 -0.125 -0.125) (radius r)                           (material diel)))); (A simple fcc lattice would have only one sphere/object at the origin.)(set-param! resolution 16) ; use a 16x16x16 grid(set-param! mesh-size 5)(set-param! num-bands 5); run calculation, outputting electric-field energy density at the U point:(run (output-at-kpoint (vector3 0 0.625 0.375) output-dpwr))</pre><p>As before, run the calculation, directing the output to a file.This will take a few minutes (2 minutes on our Pentium-II); we'll putit in the background with <code>nohup</code> so that it will finisheven if we log out:<pre>unix% nohup mpb diamond.ctl &gt;&amp; diamond.out &amp;</pre><p>Note that, because we used <code>define-param</code> and <code>set-param!</code> to define/set somevariables (see the <ahref="http://ab-initio.mit.edu/libctl/doc/user-ref.html">libctlmanual</a>), we can change them from the command line.  For example,to use a radius of 0.3 and a resolution of 20, we can just type <code>mpbr=0.3 resolution=20 diamond.ctl</code>.  This is an extremely useful feature,because it allows you to use one generic control file for manyvariations on the same structure.<h3><a name="fccunits">Important note on units for the diamond/fcclattice</a></h3><p><a href="user-tutorial.html#units">As usual,</a> all distances arein the "dimensionless" units determined by the length of the latticevectors.  We refer to these units as <i>a</i>, and frequencies aregiven in units of <i>c/a</i>.  By default, the lattice/basis vectors areunit vectors, but in the case of fcc lattices this conflicts with theconvention in the literature.  In particular, the canonical <i>a</i>for fcc is the edge-length of a cubic supercell containing the lattice.<p>In order to follow this convention, we set the length of our basisvectors appropriately using the <code>basis-size</code> property of<code>geometry-lattice</code>.  (The lattice vectors default to thesame length as the basis vectors.)  If the cubic supercell edge hasunit length (<i>a</i>), then the fcc lattice vectors have lengthsqrt(0.5), or <code>(sqrt 0.5)</code> in Scheme.<h3><a name="diamond-bands">Gaps and and band diagram for the diamond lattice</a></h3><p>The diamond lattice has a complete band gap:<pre>unix% grep Gap diamond.outGap from band 2 (0.396348703007373) to band 3 (0.440813418580596), 10.6227251392791%</pre><p>We can also plot its band diagram, much as for the tri-rods caseexcept that now we can't classify the bands by polarization.<pre>unix% grep freqs diamond.out > diamond.dat</pre><p>The resulting band diagram, with the complete band gap shadedyellow, is shown below.  Note that we only computed 5 bands, so inreality the upper portion of the plot would contain a lot more bands(which are of less interest than the bands adjoining the gap).<p align="center"><img src="diamond-bands.gif" width="446"height="346" alt="diamond band diagram"><h3><a name="diamond-vis">Visualizing the diamond lattice structure and bands</a></h3><p>Visualizing fields in a useful way for general three-dimensionalstructures is fairly difficult, but we'll show you what we can withthe help of the free <ahref="http://www.ssec.wisc.edu/~billh/vis5d.html">Vis5D</a>volumetric-visualization program, and the <code>h5tov5d</code>conversion program from <ahref="http://ab-initio.mit.edu/h5utils/">h5utils</a>.<p>First, of course, we've got to rectangularize the unit cell using<code>mpb-data</code>, as before.  We'll also expand it to twoperiods in each direction.<pre>unix% mpb-data -m 2 -r -n 32 epsilon.h5 dpwr.k06.b*.h5</pre><p>Then, we'll use <code>h5tov5d</code> to convert the resultingdatasets to Vis5D format, joining all the datasets into a single file(<code>diamond.v5d</code>) so that we can view them simultaneously ifwe want to:<pre>unix% h5tov5d -o diamond.v5d -d data-new epsilon.h5 dpwr.k06.b*.h5</pre><p>Note that all of the datasets are named <code>data-new</code> (fromthe original datasets called <code>data</code>) since we are lookingat scalar data (the time-averaged electric-field energy density).  Nomessy field components or real and imaginary parts this time; we haveenough to deal with already.<p>Now we can open the file with Vis5D and play around with variousplots of the data:<pre>unix% vis5d diamond.v5d &amp;</pre><p>If you stare at the dielectric function long enough from variousangles, you can convince yourself that it is a diamond lattice:<p align="center"><img src="diamond-eps.gif" width="394" height="394" alt="diamond epsilon plot"><p>The lowest two bands have their fields concentrated within thespheres as you might expect, flowing along more-or-less linear paths.The second band differs from the first mainly by the orientation ofits field paths.  The fields for the first band at U are depictedbelow, with the strongest fields (highest energy density) shown as themost opaque, blue pixels.  Next to it is the same plot but with anisosurface at the boundary of the dielectric superimposed, so you cansee that the energy is concentrated inside the dielectric.<p align="center"><img src="diamond-b1.gif" width="394" height="394" alt="diamond band 1 plot"><img src="diamond-b1-eps.gif" width="394" height="394" alt="diamond band 1 plot, epsilon superimposed"><p>The first band above the gap is band 3.  Its field energy densitiesare depicted below in the same manner as above.  The field patternsare considerably harder to make out than for the lower band, but theyseem to be more diffuse and "clumpy," the latter likely indicating theexpected field oscillations for orthogonality with the lower bands.<p align="center"><img src="diamond-b3.gif" width="394" height="394" alt="diamond band 3 plot"><img src="diamond-b3-eps.gif" width="394" height="394" alt="diamond band 3 plot, epsilon superimposed"><hr>Go to the <a href="user-ref.html">next</a>, <a href="user-tutorial.html">previous</a>, or <a href="index.html">main</a> section.</BODY></HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?