add_plasmon_monitors.lsf 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. groupscope("::model");
  2. select("FDTD");
  3. min_mesh_step=get("min mesh step");
  4. z_mon = get("z");
  5. z_span = get("z span");
  6. select("sub-Au");
  7. sub_Au_z_max = get("z max");
  8. #remove old monitors
  9. groupscope("::model::mon");
  10. selectall;
  11. delete;
  12. #########################################
  13. mkm = 1e-6;
  14. z_arr = [5, 20];
  15. for(x=1:10) {
  16. for (media=1:2){
  17. if (media == 1){shift_sign = 1;} else {shift_sign = -1;}
  18. for(i=1:length(z_arr)){
  19. addpower;
  20. zshift_all = z_arr(i)*1e-9;
  21. set("name","mon_x"+num2str(x)+"mkm_media"+num2str(media)+"_zshift"
  22. +num2str(z_arr(i))+"nm");
  23. set("monitor type",1); # 1 = point, 2 = linear x, 3 = linear y, 4 = linear z, 5 = 2D x-normal, 6 = 2D y-normal, 7 = 2D z-normal, 8 = 3D
  24. set("x",x*mkm);
  25. set("y",0);
  26. set("z",sub_Au_z_max + shift_sign*zshift_all);
  27. }
  28. }
  29. }
  30. groupscope("::model");
  31. for(i=1:2){
  32. select("monitor_"+num2str(i));
  33. delete;
  34. addpower;
  35. set("name","monitor_"+num2str(i));
  36. set("monitor type",4); # 1 = point, 2 = linear x, 3 = linear y, 4 = linear z, 5 = 2D x-normal, 6 = 2D y-normal, 7 = 2D z-normal, 8 = 3D
  37. set("x",0.15*mkm+0.650*(i-1)*mkm);
  38. set("y",0);
  39. set("z", z_mon);
  40. set("z span", z_span);
  41. }