add_plasmon_monitors.lsf 873 B

123456789101112131415161718192021222324252627
  1. groupscope("::model");
  2. select("FDTD");
  3. min_mesh_step=get("min mesh step");
  4. select("sub-Au");
  5. sub_Au_z_max = get("z max");
  6. #remove old monitors
  7. groupscope("::model::mon");
  8. selectall;
  9. delete;
  10. #########################################
  11. mkm = 1e-6;
  12. z_arr = [5, 20, 200, 400, 600, 700];
  13. for(x=1:10) {
  14. for (media=1:2){
  15. if (media == 1){shift_sign = 1;} else {shift_sign = -1;}
  16. for(i=1:length(z_arr)){
  17. addpower;
  18. zshift_all = z_arr(i)*1e-9;
  19. set("name","mon_x"+num2str(x)+"mkm_media"+num2str(media)+"_zshift"
  20. +num2str(z_arr(i))+"nm");
  21. 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
  22. set("x",x*mkm);
  23. set("y",0);
  24. set("z",sub_Au_z_max + shift_sign*zshift_all);
  25. }
  26. }
  27. }