kch3782 / torcwa

GPU-accelerated RCWA with automatic differentiation
Other
104 stars 22 forks source link

convergence of structured geom to homogenous layer when lattice size equals to the geom size #20

Closed MahmutRuzi closed 1 year ago

MahmutRuzi commented 1 year ago

Hello dear Changhyun Kim, Thanks for making the code available. I tried to run a simulation where the size of a rectangular strucrue slows increases to the size of the cell lattice size, which is then essentially a homogenous thin layer. However, the calculated result is different from analytical formulas. I noticed in the example that the setup for homogenous thin film is different. Can you comment why the code is designed that way? It will be great if the setup is the same where one can do simulations on structures that smoothly transition from patterned layers to homogenous layer.

kch3782 commented 1 year ago

Hi.

First, if the input is a constant rather than a grid, such as add_layer (thickness, eps=4.0), it is judged as a homogeneous layer. And, the function for faster calculation is used only for homogeneous thin film.

When testing both the dielectric and metallic thin film, there was no difference in the result when a constant or grid type was used as input. And it was confirmed that the result values are smoothly changed even when the width are slightly increased to lattice size. (We did not compare with analytic cases.)

Could you explain more specific detail about the simulation or used analytic formulas?

Also, if the example you mentioned is 'Example0.ipynb', in this case, it is not two thin flims with thickness, but the simulation and analytic formula for two different homogeneous layers with half-infinite thickness.

Thank you.

MahmutRuzi commented 1 year ago

Hello, dear Changhyun Kim Sorry it took me a while to get back. My method of comparison was wrong. So there is no issue with code regarding the question. Thanks