Ansys Learning Forum › Forums › Discuss Simulation › Photonics › DGTD script error › Reply To: DGTD script error
Hi Shashank,
This is a different question to the original post. Later please write a new post. Since I will be away for some time from next week, if you still have questions please write a new post since no others in support will come here to check.
In order to plot the phase, you will need get the complex farfield for the grating: https://optics.ansys.com/hc/en-us/articles/360034407034-gratingpolar-Script-command however most often there will have s and p (theta and phi) components and they may be not the same. So you will need to choose which one is to use. However, the gratingpolar gives the phase from the monitor to 1m away sphere, and there propagation phases from source to grating front, and from grating back to monitor, plus the far field 1m. You will need to compensate those phases analytically:Â
https://optics.ansys.com/hc/en-us/articles/360042095873-Metamaterial-S-parameter-extraction
https://optics.ansys.com/hc/en-us/articles/360042097393-Metamaterial-parameter-extraction-Smith
Due to numerical error, I would suggest to have the source and the monitor close to the grating (maybe 2 or few mesh distance).
TO create Fig.a and FIg.b plosts, you will need to sweep the period and width: https://optics.ansys.com/hc/en-us/articles/360034922873-Parameter-sweep-utilityÂ
Please try and write a new post for any questions. Thank you!
Â
Â