victorliu / S4

Stanford Stratified Structure Solver - Electromagnetic simulator for layered periodic structures
http://www.stanford.edu/group/fan/S4/
GNU General Public License v2.0
131 stars 149 forks source link

excite from patterned layer #79

Open 2iw31Zhv opened 5 years ago

2iw31Zhv commented 5 years ago

Hi all, is there a way to excite a fundamental mode wave from a patterned layer? I have tried a simple layer Layer *L1 = Simulation_AddLayer(S); Layer_Init(L1, "above", 0.5, "air", NULL); Simulation_AddLayerPatternCircle(S, L1, 1, center, 0.5 * w_x);

Excite it using int exg[2] = {1, 1}; double ex[2] = {1.0, 0.0}; Simulation_MakeExcitationExterior(S, 1, exg, ex);

However exciting from it will yield strange negative input flux: layer forw_r back_r forw_i back_i
L1 -0.4756 30.9501 1.11022e-15 -1.11022e-15 L3 30.4744 0 0 0