Konstantin Ladutenko 6 lat temu
rodzic
commit
da2bdae164
6 zmienionych plików z 31 dodań i 12 usunięć
  1. 1 1
      add_plasmon_monitors.lsf
  2. 4 2
      create_hpc_bat.lsf
  3. 13 4
      efficiency-plasmon-plot.py
  4. 9 2
      hpc.bat
  5. 2 2
      rsync.sh
  6. 2 1
      save_plasmon_data.lsf

+ 1 - 1
add_plasmon_monitors.lsf

@@ -9,7 +9,7 @@ selectall;
 delete;
 #########################################
 mkm = 1e-6;
-z_arr = [5, 20, 200, 400, 600, 700];
+z_arr = [5, 20];
 for(x=1:10) {
     for (media=1:2){
         if (media == 1){shift_sign = 1;} else {shift_sign = -1;}

+ 4 - 2
create_hpc_bat.lsf

@@ -9,16 +9,18 @@ files = splitstring(dir,endl);
 isCreated = false;
 fname = curdir+slash+"exec.bat";
 if (fileexists(fname)){rm(fname);}
-
 for(i=1:length(files)) {
     if(fileextension(files{i}) == "fsp") {
         load(files{i});
         status = layoutmode;
         if (status == 1) {
             write(fname,"\"C:\Program Files\Lumerical\FDTD\bin\fdtd-engine\" -t 32 "+files{i});
-            #add_plasmon_monitors;
+            write(fname,"exit /b 1");
+            break;
         }
     }
 }
+write(fname,"exit /b 0");
+
 redrawon;
 

+ 13 - 4
efficiency-plasmon-plot.py

@@ -143,7 +143,8 @@ def analyze(data, dist, z_vec, wl_idx):
     print(dirname)
     print("Power: plasmon %4.3g W of dipoles %4.3g W, efficiency %5.3g%%  from:"%(ppw, float(np.abs(dip_power[0])),float(np.abs( eta0))), ppw, eta0)
     plt.plot(lambd*1e9, plasmon_power/ dip_power)
-    plt.ylim(0,1.0)
+    plt.ylim(0,0.04)
+    plt.xlim(550,800)
 
     #plt.plot(lambd*1e9, np.real(eps2))
     # plt.plot(lambd*1e9, np.real(k_spp))
@@ -165,20 +166,27 @@ file_ext="pdf"
 #dirname="Au-JC-R100-Au-JC.fsp.results"
 #dirname="Au-McPeak-R100-Si-Green.fsp.results"
 #dirname="Au-McPeak-R100-Au-McPeak.fsp.results"
+dirname="sub-Au-R100-Si-wl450-800-sep10nm.fsp.results"
+
 #dirname="Au-McPeak-R0.fsp.results"
 #dirname="Au-McPeak-R100-Si-Green-1500.fsp.results"
 #dirname="Au-McPeak-R100-Si-Green-1500-l.fsp.results"
-dirname="Au-McPeak-R50-Si-Green-1500-l.fsp.results"
+#dirname="Au-McPeak-R50-Si-Green-1500-l.fsp.results"
+#dirname="Au-sub-dipole.fsp.results"
+#dirname="Au-sub-dipole-W.fsp.results"
+#dirname="Au-sub-Au-dipole-W.fsp.results"
+#dirname="Au-sub-Si-dipole-W.fsp.results"
 def main ():
     distance = [1,2,3,4,5,6,7,8,9,10] #mkm
-    zshift = ["5","20","200","400","600"]
+    zshift = ["5","20"]
+    # zshift = ["5","20","200","400","600"]
     z_vec = [int(val) for val in zshift]
 
     data = read_data(dirname, distance, zshift)
 
     #WLs=[300,350,400,450,600,700,800]
     #WLs=[600,700, 800, 450]
-    WLs=[800]#, 450]
+    WLs=[800]#,1500]#, 450]
     WLs_idx = get_WLs_idx(WLs, data)
 
 
@@ -189,6 +197,7 @@ def main ():
 
 
     # legend = []
+    # mmedia = 1
     # for shift in range(len(zshift)):
     #     for i in range(len(WLs)):
     #         pl_data = []

+ 9 - 2
hpc.bat

@@ -5,8 +5,15 @@ set "startTime=%time: =0%"
 
 REM path %path%;
 REM"C:\Program Files\Lumerical\FDTD\bin\fdtd-engine" -t 32 template-dipole-on-sphere-on-surf-z.fsp
-"C:\Program Files\Lumerical\FDTD\bin\fdtd-solutions" -nw -run create_hpc_bat.lsf
-call exec.bat
+
+echo Before loop
+:loop
+    "C:\Program Files\Lumerical\FDTD\bin\fdtd-solutions" -nw -run create_hpc_bat.lsf
+    echo before run
+    call exec.bat
+if !errorlevel! gtr 0 goto loop
+
+echo after loop
 
 REM mpiexec -n 16 python Si_cylinder_on_Al2O3_substrate.py
 REM python Si_cylinder_on_Al2O3_substrate.py

+ 2 - 2
rsync.sh

@@ -24,10 +24,10 @@ fi
 #rsync -auz --progress --no-perms --no-owner --no-group --exclude .git --exclude docs --exclude build_docs --exclude *~ --exclude *results* --exclude smuthi_nfmds_bin /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/dipole-on-surf/ /run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/dipole-on-surf
 echo Ok
 
-rsync -auz --progress --no-perms --no-owner --no-group --exclude .git --exclude docs --exclude build_docs --exclude *~ --exclude *results* /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/dipole-on-surf/ /run/user/1000/gvfs/smb-share\:server\=192.168.5.18\,share\=hpc_d/k.ladutenko/dipole-on-surf
+rsync -auz --progress --no-perms --no-owner --no-group --exclude .git --exclude docs --exclude build_docs --exclude *~ --exclude '*results*' /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/dipole-on-surf/ /run/user/1000/gvfs/smb-share\:server\=192.168.5.18\,share\=hpc_d/k.ladutenko/dipole-on-surf
 
 #gio mount smb://192.168.5.30/users
 #ls /run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/
-rsync -auz --progress --no-perms --no-owner --no-group --exclude .git --exclude docs --exclude build_docs --exclude *~ --exclude *results* /run/user/1000/gvfs/smb-share\:server\=192.168.5.18\,share\=hpc_d/k.ladutenko/dipole-on-surf/ /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/dipole-on-surf
+rsync -auz --progress --no-perms --no-owner --no-group --exclude .git --exclude docs --exclude build_docs --exclude *~ --exclude '*results*' /run/user/1000/gvfs/smb-share\:server\=192.168.5.18\,share\=hpc_d/k.ladutenko/dipole-on-surf/ /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/dipole-on-surf
 
 #rsync -auz --progress --no-perms --no-owner --no-group --exclude .git --exclude docs --exclude build_docs --exclude *~ --exclude *results* /run/user/1000/gvfs/smb-share\:server\=192.168.5.30\,share\=users/z.ladutenko/dipole-on-surf/ /home/tig/KOsty/Documents/Simulations/Belov/Bogdanov/dipole-on-surf

+ 2 - 1
save_plasmon_data.lsf

@@ -36,8 +36,9 @@ n_fdtd;
 #########################################
 ?"Save data";
 cd(dirname);
+?dirname;
 format long;
-z_arr = [5, 20, 200, 400, 600, 700];
+z_arr = [5, 20];
 for(x=1:10) {
     for (media=1:2){
         if (media == 1){shift_sign = 1;} else {shift_sign = -1;}