123456789101112131415161718192021222324252627 |
- groupscope("::model");
- select("FDTD");
- min_mesh_step=get("min mesh step");
- select("sub-Au");
- sub_Au_z_max = get("z max");
- #remove old monitors
- groupscope("::model::mon");
- selectall;
- delete;
- #########################################
- mkm = 1e-6;
- z_arr = [5, 20];
- for(x=1:10) {
- for (media=1:2){
- if (media == 1){shift_sign = 1;} else {shift_sign = -1;}
- for(i=1:length(z_arr)){
- addpower;
- zshift_all = z_arr(i)*1e-9;
- set("name","mon_x"+num2str(x)+"mkm_media"+num2str(media)+"_zshift"
- +num2str(z_arr(i))+"nm");
- 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
- set("x",x*mkm);
- set("y",0);
- set("z",sub_Au_z_max + shift_sign*zshift_all);
- }
- }
- }
|