GSvit documentation

open source FDTD solver with GPU support

User Tools

Site Tools


docs:become

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
docs:become [2020/04/14 14:09]
pklapetek
docs:become [2020/04/22 15:43]
pklapetek
Line 9: Line 9:
 ===== 2D calculation ===== ===== 2D calculation =====
  
-Calculations in 2D are performed using the GSvit2D solver which is an almost unused extension of GSvit to 2D calculations. As this was very outdated, most of the algorithms had to be implemented,​ incuding near-to-far field calculation and various materials treatment including dispersive metal treatment via PLRC algorithm. To test the correctness of the newly implemented code we compared a simple transmission grating diffraction pattern to the analytically known solution.  +Calculations in 2D are performed using the GSvit2D solver which is an almost unused extension of GSvit to 2D calculations. As this was very outdated, most of the algorithms had to be implemented,​ incuding near-to-far field calculation and various materials treatment including dispersive metal treatment via PLRC algorithm. ​ 
-There are at least two possible ways how to treat the grating in FDTD calculation. First of all, we can setup the grating physically in the computation domain, as large as possible, run the calculation and evaluated the far field response. As we are usually interested in an infinite grating response, this would mean an infinite computational domain. Instead, we can use periodic boundary conditions, compute only one motive and evaluate the far field data. This still does not provide the results if the far field data are evaluated only from the single motive, we need to evaluate it from many virtual repetitions to get the impact of some number of motives.+ 
 + 
 +---- 
 + 
 + 
 +To test the correctness of the newly implemented code we compared a simple ​**transmission grating** diffraction pattern to the analytically known solution. ​ 
 +Total/​scattered field approach was used to inject the plane wave normally to the plane containing the aperture or multiple apertures. TE mode calculation was used, which should mean the p-polarisation case as requested. Near-to-far field calculation domain was set up to be outside of the plane wave source region, so only transmitted field was propagated to the far-field. Time domain far field calculation was used. Far field data were calculated for wide range of angles for debugging purposes (i.e. not only for the directions of the particular diffraction orders). 
 + 
 +There are at least two possible ways how to treat the grating in FDTD calculation. First of all, we can setup the grating physically in the computation domain, as large as possible, run the calculation and evaluated the far field response. As we are usually interested in an infinite grating response, this would mean an infinite computational domain. Instead, we can use periodic boundary conditions, compute only one motive and evaluate the far field data. This still does not provide the results if the far field data are evaluated only from the single motive, we need to evaluate it from many virtual repetitions to get the impact of some number of motives. We call this 
 +//periodic NFFF// in the next text.
 In most of the graphs here we show complete diffraction pattern. In most of the graphs here we show complete diffraction pattern.
-However, if we are interested in the maximum in some diffraction order direction, it is much simpler and it seems that this is the preferably used approach - we calculate the far field value only at the diffraction order maximum. Luckily enough, this value is dependent on the aperture only, which constructs the envelope for the diffraction pattern, so in this case one could work only with a single aperture. However, to construct the diffraction pattern is a good way how to debug the problem.+However, if we are interested in the maximum in some diffraction order direction, it is much simpler and it seems that this is the preferably used approach - we calculate the far field value only at the diffraction order maximum. Luckily enough, this value is dependent on the aperture only, which constructs the envelope for the diffraction pattern, so in this case one could work only with a single aperture. However, to construct the diffraction pattern is a good way how to debug the problem. ​The schematics of 
 +the calculations is here:
  
-A comparison of the different evaluation methods is shown below, followed by a technical explanation for our reference.+{{:​docs:​schematics.png?600|}}
  
-{{:​docs:​methods_explanation.png?​600|}} 
  
-//Technical remarks: To calculate single aperture correctly it is important to add the side boundaries. It is also crucial to use CPML throughout all the+A comparison of the different evaluation methods is shown below, also showing the first 
 +diffraction order direction by a vertical line. 
 +It shows a transmission grating that is evaluated different ways. First of all, analytical results for single aperture, for three apertures and nine apertures are shown. Results from 
 +periodic calculation (based on a single motive) where the far field is evaluated from three 
 +and nine virtual repetitions are then compared to the case where the calculation is not periodic 
 +and three apertures are physically existing in the computational domain.  
 + 
 +An important message is that 
 +using the periodic approach for only a small number of repetitions does not work as it does not take into account the field on sides of the computational domain. For large number of periodic approach repetitions we get results that are same as analytical results. 
 +If we manually extend the computational domain and include all the apertures, results agree with the analytical results also for small number of apertures. See the technical explanation listed below for our reference. 
 + 
 +{{:​docs:​methods_explanation_humanized.png?​600|}} 
 + 
 +//Technical remarks: To calculate single aperture ​or three apertures in one computational domain ​correctly it is important to add the side boundaries. It is also crucial to use CPML throughout all the
 calculations,​ otherwise we get everything dependent on the computational volume. calculations,​ otherwise we get everything dependent on the computational volume.
 If we manually setup the few apertures grating, result corresponds to the theory. If we manually setup the few apertures grating, result corresponds to the theory.
-However, using periodic boundary conditions and virtual repetitions are valid only if we sum many virtual repetitions for far field calculation.  +However, using periodic boundary conditions and virtual repetitions are valid only if we sum many virtual repetitions for far field calculation, at least about 7
-Using this approach for only few apertures (e.g. 3) leads to wrong result (even if it looks fine at the diffraction order angle, by chance?). +Using this approach for only few apertures (e.g. 3) leads to wrong result (even if it still looks fine at the diffraction order angle, ​is it only by chance?). 
-On the other hand, summing virtual repetitions without periodic BCs does not lead to anything reasonablewe have to have them, to get the +On the other hand, summing virtual repetitions without periodic BCs does not lead to anything reasonable ​we have to use periodic BCs, to get the 
-correct fields. +correct fields ​in the near field
-When higher ​orders ​are evaluated, the values of the central maximum can drop and using a smaller time step helps to correct this effect.+When higher ​numbers of apertures ​are evaluated ​(e.g. 11), the values of the central maximum can drop and using a smaller time step helps to correct this effect.
 This might be related to the far field integration (linear interpolation works better when signal is not changing so rapidly), ​ This might be related to the far field integration (linear interpolation works better when signal is not changing so rapidly), ​
-however it is still unclear if this is the only effect.//+however it is still unclear if this is the only effect. The backup files for this calculation are {{ :​docs:​2d_transmission_aperture_backup_files.tar.gz |here}}.//
  
 +Accuracy aspects (evaluated on the single aperture transmission): ​
 +   * effect of time step is small, prolonging it from dt=0.5 Courant limit to 0.25 does not change the shape of the curve in a detectable way.
 +   * effect of absorbing boundary type smaller or distance to the boundary much smaller (mostly invisible, below percent?). The transmission around zero order is larger slightly when Liao condition is used instead of CPML. 
 +   * effect of NFFF box size is up to 6 percent for the maximum difference of intensities at the first diffraction order (NFFF box sizes from 100x20 to 340x130, when y size is evaluated from the aperture plane and even for maximum NFFF the boundary in x is about 200 voxels far). Smaller NFFF box seems to be better; when it is enlarged artefacts can be seen. There is always a difference between analytical model that does not go to zero for maximum angles, and numerical model that goes to almost zero.
  
 +----
  
-The Become ​benchmark ​grating ​was setup with voxel spacing ​of 5 nm in every directionThe total computational ​domain size was 240x100 voxels. The grating was formed by silver, using the PLRC metal handling approachPeriodic boundary conditions were used to introduce ​the grating periodicity. Total/​scattered field approach was used to inject ​the plane wave normally to the surface. TE mode calculation was used for this 2D case, which should be the p-polarisation case as requested. Near-to-far field calculation domain was set up to be outside of the plane wave source region, so only reflected and scattered electric field was propagated to the far-field. Time domain far field calculation was used. Far field data were calculated for wide range of angles for debugging purposes ​(i.e. not only for the directions of the particular diffraction orders)+The transition from transition geometry to reflection geometry was done first with perfect electric conductor as a grating material. The same motive as in the Become grating ​is used and also 
-The model setup and a calculation snapshot of the periodic area are shown in the following figure. +the same voxel spacing ​(5 nm), it is only from a different materials for calculation speed and simplicityAll the computational ​details were same as in the previous example. 
-The far field was evaluated from a fixed number of repetitions of the near-field values, the presented results therefore represent scattering by a finite size grating. The far field value in the direction ​of the maxima is however not affected by size of grating (number of repetitions),​ only its sharpness is affected.+To get the data normalization ​to the incident ​wave intensity we used perfect electric conductor ​plane only (no grating motives) and evaluated ​the electric field intensity ​in 
 +the far field point corresponding to surface normal ​direction.
  
-{{:docs:model.png?600|}}+Here, we don't have any analytical result to which  
 +we could compare. We could therefore only compare the periodic calculation (using field from single motive with periodic boundary conditions and periodic NFFF) and the manual calculation (big model with all the motives). 
 + 
 +The two models that were compared are shown below.  
 +{{:docs:schematics_reflection_pec.png?600|}} 
 + 
 +The periodic calculation was done the same 
 +way as for the transmission grating, only the position of the NFFF integration area was changed. I 
 +For the large manual calculation,​ in contrast to the previous case, we could not use the simple plane wave to illuminate the grating as this would lead the source to cross the NFFF domain, which leads to wrong results (all sources must be inside to get physically valid result). ​ We have therefore truncated the plain wave at the edges with a Gaussian decay function, so whole 
 +source is now inside the NFFF domain. This leads to a diffraction effect due to finite source size, which is however small and has minor impact on the result. 
 + 
 +The results show that the correspondence between the 19 apertures manual model and the periodic model with evaluating 19 near-field repetitions for the far field calculation are comparable to about 4 percents. Better correspondence could be obtained if the manual domain would be further extended (as seen from the smaller domain calculations trends). 
 + 
 +{{:​docs:​validation.png?​800|}} 
 + 
 +The backup files are {{ :​docs:​2d_reflection_cpml_backup_files.tar.gz |here}}. 
 + 
 +---- 
 + 
 + 
 +The **Become benchmark grating** was setup the same way as the above test example.  
 +The grating was now formed by silver, using the PLRC metal handling approach. 
 +All the other parameters we kept from the previous case. Normalization was again  
 +done via reflection from a perfect electric conductor surface.
  
  
-To get the data normalization to the incident wave intensity we used a similar model where the grating was replaced by a perfect electric conductor plane. The electric field intensity in 
-the far field point corresponding to surface normal direction was evaluated and used as a reference 
-in all the other calculations. 
  
 The image below shows the normalized angular dependence of the diffraction from the (finite size) grating. The image below shows the normalized angular dependence of the diffraction from the (finite size) grating.
Line 56: Line 104:
    * default metal setting: 6 0.89583 0 13.8737e15 0.0207332e15 1.3735 -0.504659 7.59914e15 4.28431e15 0.304478 -1.48944 6.15009e15 0.659262e15 means n=(0.036 + 4.147i) and leads to first order diffraction of 0.178    * default metal setting: 6 0.89583 0 13.8737e15 0.0207332e15 1.3735 -0.504659 7.59914e15 4.28431e15 0.304478 -1.48944 6.15009e15 0.659262e15 means n=(0.036 + 4.147i) and leads to first order diffraction of 0.178
  
-Dependence ​on problem ​size:+ 
 +After improving nearly everything (CPML, periodic borders, source) the result is even worse, 0.148 for the fitted metal, spacing 10 nm. However, now the result is fully symmetric and does not depend ​on voxel size (0.147 for spacing 5 nm).
  
  
docs/become.txt · Last modified: 2020/04/24 12:27 by pklapetek