Yee lattice
From AbInitio
Revision as of 21:05, 3 April 2006 (edit) Stevenj (Talk | contribs) ← Previous diff |
Revision as of 21:06, 3 April 2006 (edit) Stevenj (Talk | contribs) Next diff → |
||
Line 2: | Line 2: | ||
[[Image:Yee-cube.png|250px|center|thumb|Illustration of Yee lattice in 3d for a single grid voxel.]] | [[Image:Yee-cube.png|250px|center|thumb|Illustration of Yee lattice in 3d for a single grid voxel.]] | ||
- | In order to discretize Maxwell's equations with second-order accuracy (for homogeneous regions), FDTD methods ''store different field components at different grid locations''. This discretization is known as a '''Yee lattice'''. | + | In order to discretize Maxwell's equations with second-order accuracy (for homogeneous regions), FDTD methods ''store different field components for different grid locations''. This discretization is known as a '''Yee lattice'''. |
- | The form of the Yee lattice in 3d is shown in the illustration here for a single cubic grid voxel (<math>\Delta x \times \Delta x \times \Delta x</math>). The basic idea is that the three components of '''E''' are stored at the ''edges'' of the cube in the corresponding directions, while the components of '''H''' are stored at the ''faces'' of the cube. | + | The form of the Yee lattice in 3d is shown in the illustration here for a single cubic grid voxel (<math>\Delta x \times \Delta x \times \Delta x</math>). The basic idea is that the three components of '''E''' are stored for the ''edges'' of the cube in the corresponding directions, while the components of '''H''' are stored for the ''faces'' of the cube. |
More precisely, let a coordinate <math>(i,j,k)</math> in the grid correspond to: | More precisely, let a coordinate <math>(i,j,k)</math> in the grid correspond to: | ||
Line 10: | Line 10: | ||
:<math>\mathbf{x} = (i \hat\mathbf{e}_1 + j \hat\mathbf{e}_2 + k \hat\mathbf{e}_3) \Delta x</math>, | :<math>\mathbf{x} = (i \hat\mathbf{e}_1 + j \hat\mathbf{e}_2 + k \hat\mathbf{e}_3) \Delta x</math>, | ||
- | where <math>\hat\mathbf{e}_k</math> denotes the unit vector in the ''k''-th coordinate direction. Then, the <math>\ell</math><sup>th</sup> component of <math>\mathbf{E}</math> or <math>\mathbf{D}</math> (or <math>\mathbf{P}</math>) is stored at the locations | + | where <math>\hat\mathbf{e}_k</math> denotes the unit vector in the ''k''-th coordinate direction. Then, the <math>\ell</math><sup>th</sup> component of <math>\mathbf{E}</math> or <math>\mathbf{D}</math> (or <math>\mathbf{P}</math>) is stored for the locations |
:<math>(i,j,k)+ \frac{1}{2} \hat\mathbf{e}_\ell \Delta x</math>. | :<math>(i,j,k)+ \frac{1}{2} \hat\mathbf{e}_\ell \Delta x</math>. | ||
- | The <math>\ell</math><sup>th</sup> component of <math>\mathbf{H}</math>, on the other hand, is stored at the locations | + | The <math>\ell</math><sup>th</sup> component of <math>\mathbf{H}</math>, on the other hand, is stored for the locations |
:<math>(i+\frac{1}{2},j+\frac{1}{2},k+\frac{1}{2})-\frac{1}{2} \hat\mathbf{e}_\ell \Delta x</math>. | :<math>(i+\frac{1}{2},j+\frac{1}{2},k+\frac{1}{2})-\frac{1}{2} \hat\mathbf{e}_\ell \Delta x</math>. | ||
Line 21: | Line 21: | ||
[[Image:Yee-te.png|thumb|right|150px|Yee lattice in 2d for the TE polarization.]] | [[Image:Yee-te.png|thumb|right|150px|Yee lattice in 2d for the TE polarization.]] | ||
- | The consequence of the Yee lattice is that, whenever you need to compare or combine different field components, e.g. to find the energy density <math>(\mathbf{E}^* \cdot \mathbf{D} + |\mathbf{H}|^2)/2</math> or the flux <math>\textrm{Re}\, \mathbf{E}^* \times \mathbf{H}</math>, then the components need to be '''interpolated''' to some common point. Meep does this interpolation for you—in particular, whenever you compute energy density or flux, or whenever you output a field to a file, it is stored at the locations <math>(i+0.5,j+0.5,k+0.5)</math>: the centers of each grid voxel. | + | The consequence of the Yee lattice is that, whenever you need to compare or combine different field components, e.g. to find the energy density <math>(\mathbf{E}^* \cdot \mathbf{D} + |\mathbf{H}|^2)/2</math> or the flux <math>\textrm{Re}\, \mathbf{E}^* \times \mathbf{H}</math>, then the components need to be '''interpolated''' to some common point. Meep does this interpolation for you—in particular, whenever you compute energy density or flux, or whenever you output a field to a file, it is stored for the locations <math>(i+0.5,j+0.5,k+0.5)</math>: the centers of each grid voxel. |
[[Category:Meep]] | [[Category:Meep]] |
Revision as of 21:06, 3 April 2006
Meep |
Download |
Release notes |
FAQ |
Meep manual |
Introduction |
Installation |
Tutorial |
Reference |
C++ Tutorial |
C++ Reference |
Acknowledgements |
License and Copyright |
In order to discretize Maxwell's equations with second-order accuracy (for homogeneous regions), FDTD methods store different field components for different grid locations. This discretization is known as a Yee lattice.
The form of the Yee lattice in 3d is shown in the illustration here for a single cubic grid voxel (). The basic idea is that the three components of E are stored for the edges of the cube in the corresponding directions, while the components of H are stored for the faces of the cube.
More precisely, let a coordinate (i,j,k) in the grid correspond to:
- ,
where denotes the unit vector in the k-th coordinate direction. Then, the th component of or (or ) is stored for the locations
- .
The th component of , on the other hand, is stored for the locations
- .
In two dimensions, the idea is similar except that we set . The 2d Yee lattices for the TE polarizations (E in the xy plane and H in the z direction) is shown in the figure at right.
The consequence of the Yee lattice is that, whenever you need to compare or combine different field components, e.g. to find the energy density or the flux , then the components need to be interpolated to some common point. Meep does this interpolation for you—in particular, whenever you compute energy density or flux, or whenever you output a field to a file, it is stored for the locations (i + 0.5,j + 0.5,k + 0.5): the centers of each grid voxel.