Skip to content
Snippets Groups Projects
Commit a932a9fe authored by Guillaume Demesy's avatar Guillaume Demesy
Browse files

test all

parent 664ec806
No related branches found
No related tags found
No related merge requests found
Showing
with 70 additions and 49 deletions
...@@ -28,10 +28,10 @@ Macro SetPBCs ...@@ -28,10 +28,10 @@ Macro SetPBCs
// Printf("slaveY surf %g",slaveY(k)); // Printf("slaveY surf %g",slaveY(k));
// EndFor // EndFor
If (tag_geom==6) // bi-sin : BoundingBox does not catch BSpline Surfaces? If (tag_geom==6) // bi-sin : BoundingBox does not catch BSpline Surfaces?
masterX()+={48,52}; masterX()+={17,12};
slaveX()+={50,54}; slaveX()+={19,14};
masterY()+={51,55}; masterY()+={15,20};
slaveY()+={49,53}; slaveY()+={13,18};
EndIf EndIf
Periodic Surface{slaveX()} = {masterX()} Translate{period_x, 0, 0}; Periodic Surface{slaveX()} = {masterX()} Translate{period_x, 0, 0};
Periodic Surface{slaveY()} = {masterY()} Translate{ dys, dyc, 0}; Periodic Surface{slaveY()} = {masterY()} Translate{ dys, dyc, 0};
...@@ -40,6 +40,7 @@ Return ...@@ -40,6 +40,7 @@ Return
If (tag_geom==6) If (tag_geom==6)
// Bi-sinusoidal profile by Spline surface filling // Bi-sinusoidal profile by Spline surface filling
// not the most general way to implement a freesurface height=f(x,y) and relies on multiple Coherence calls // not the most general way to implement a freesurface height=f(x,y) and relies on multiple Coherence calls
// several hacks are used, one of them is to do all this at the very begining
nsin = 20; nsin = 20;
For i In {0:nsin} For i In {0:nsin}
xx1~{i} = -period_x/2+i*period_x/2/(nsin-1); xx1~{i} = -period_x/2+i*period_x/2/(nsin-1);
...@@ -107,13 +108,14 @@ If (tag_geom==6) ...@@ -107,13 +108,14 @@ If (tag_geom==6)
Curve Loop(30) = {31, -23, 32, 4, 10}; Curve Loop(30) = {31, -23, 32, 4, 10};
Surface(18) = {30}; Surface(18) = {30};
Surface Loop(3) = {5, 16, 18, 12, 11, 9, 8, 7, 10}; Surface Loop(3) = {5, 16, 18, 12, 11, 9, 8, 7, 10};
Volume(9) = {3}; Volume(1) = {3};
Surface Loop(2) = {6, 15, 14, 10, 7, 8, 9, 13, 17}; Surface Loop(2) = {6, 15, 14, 10, 7, 8, 9, 13, 17};
Volume(10) = {2}; Volume(2) = {2};
EndIf EndIf
For k In {7:0:-1} For k In {7:0:-1}
If (tag_geom==6 && k!=3) If (tag_geom==6)
If (k!=3)
p=newp; l=newl; ll=newll; s=news; p=newp; l=newl; ll=newll; s=news;
Point(p) = {0.5*(-period_x-dys), -dyc/2, hh_L~{k}}; Point(p) = {0.5*(-period_x-dys), -dyc/2, hh_L~{k}};
Point(p+1) = {0.5*( period_x-dys), -dyc/2, hh_L~{k}}; Point(p+1) = {0.5*( period_x-dys), -dyc/2, hh_L~{k}};
...@@ -123,6 +125,9 @@ For k In {7:0:-1} ...@@ -123,6 +125,9 @@ For k In {7:0:-1}
Curve Loop(ll) = {l,l+1,l+2,l+3}; Curve Loop(ll) = {l,l+1,l+2,l+3};
Surface(s) = {ll}; Surface(s) = {ll};
Extrude {0, 0, thick_L~{k}} {Surface{s};} Extrude {0, 0, thick_L~{k}} {Surface{s};}
Else
v=newv;
EndIf
Else Else
p=newp; l=newl; ll=newll; s=news; p=newp; l=newl; ll=newll; s=news;
Point(p) = {0.5*(-period_x-dys), -dyc/2, hh_L~{k}}; Point(p) = {0.5*(-period_x-dys), -dyc/2, hh_L~{k}};
...@@ -192,10 +197,18 @@ EndIf ...@@ -192,10 +197,18 @@ EndIf
Coherence; Coherence;
// // // Physical Surface("ENDPML",770) = {69,37};
Call SetPBCs; Call SetPBCs;
If (tag_geom==6)
Physical Volume("PMLBOT" ,1) = {3};
Physical Volume("LAYER_L6_SUBS" ,2) = {4};
Physical Volume("LAYER_L5" ,3) = {5};
Physical Volume("LAYER_L4" ,4) = {6};
Physical Volume("LAYER_L3" ,5) = {2};
Physical Volume("LAYER_L2" ,6) = {7};
Physical Volume("LAYER_L1_SUPER",7) = {8};
Physical Volume("PMLTOP" ,8) = {9};
Physical Volume("SCAT" ,9) = {1};
Else
Physical Volume("PMLBOT" ,1) = {1}; Physical Volume("PMLBOT" ,1) = {1};
Physical Volume("LAYER_L6_SUBS" ,2) = {2}; Physical Volume("LAYER_L6_SUBS" ,2) = {2};
Physical Volume("LAYER_L5" ,3) = {3}; Physical Volume("LAYER_L5" ,3) = {3};
...@@ -205,7 +218,7 @@ Physical Volume("LAYER_L2" ,6) = {6}; ...@@ -205,7 +218,7 @@ Physical Volume("LAYER_L2" ,6) = {6};
Physical Volume("LAYER_L1_SUPER",7) = {7}; Physical Volume("LAYER_L1_SUPER",7) = {7};
Physical Volume("PMLTOP" ,8) = {8}; Physical Volume("PMLTOP" ,8) = {8};
Physical Volume("SCAT" ,9) = {9}; Physical Volume("SCAT" ,9) = {9};
EndIf
Physical Surface("BXM" ,101 ) = masterX(); Physical Surface("BXM" ,101 ) = masterX();
Physical Surface("BXP" ,102 ) = slaveX(); Physical Surface("BXP" ,102 ) = slaveX();
Physical Surface("BYM" ,201 ) = masterY(); Physical Surface("BYM" ,201 ) = masterY();
......
...@@ -18,7 +18,7 @@ DefineConstant[ ...@@ -18,7 +18,7 @@ DefineConstant[
thick_L_4 = {150 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]}, thick_L_4 = {150 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
thick_L_5 = {150 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]}, thick_L_5 = {150 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
thick_L_6 = {100 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]}, thick_L_6 = {100 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 0}, xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 1},
tag_geom = { 7 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}}, tag_geom = { 7 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
rx = { 0 , Name StrCat[pp3,"/1rx"]}, rx = { 0 , Name StrCat[pp3,"/1rx"]},
......
...@@ -18,7 +18,7 @@ DefineConstant[ ...@@ -18,7 +18,7 @@ DefineConstant[
thick_L_4 = {100 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]}, thick_L_4 = {100 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
thick_L_5 = {100 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]}, thick_L_5 = {100 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
thick_L_6 = {200 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]}, thick_L_6 = {200 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 0}, xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 1},
tag_geom = { 6 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}}, tag_geom = { 6 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
rx = {1.25*lambda0, Name StrCat[pp3,"/1rx"]}, rx = {1.25*lambda0, Name StrCat[pp3,"/1rx"]},
......
...@@ -18,7 +18,7 @@ DefineConstant[ ...@@ -18,7 +18,7 @@ DefineConstant[
thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]}, thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]}, thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]}, thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 0}, xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 1},
tag_geom = { 5 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}}, tag_geom = { 5 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
rx = {1.25*lambda0, Name StrCat[pp3,"/1rx"]}, rx = {1.25*lambda0, Name StrCat[pp3,"/1rx"]},
......
...@@ -18,7 +18,7 @@ DefineConstant[ ...@@ -18,7 +18,7 @@ DefineConstant[
thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]}, thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]}, thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]}, thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 0}, xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 1},
tag_geom = { 4 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}}, tag_geom = { 4 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
rx = {107 , Name StrCat[pp3,"/1rx"]}, rx = {107 , Name StrCat[pp3,"/1rx"]},
......
...@@ -18,7 +18,7 @@ DefineConstant[ ...@@ -18,7 +18,7 @@ DefineConstant[
thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]}, thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]}, thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]}, thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 0}, xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 1},
tag_geom = { 4 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}}, tag_geom = { 4 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
rx = {107 , Name StrCat[pp3,"/1rx"]}, rx = {107 , Name StrCat[pp3,"/1rx"]},
......
...@@ -18,7 +18,7 @@ DefineConstant[ ...@@ -18,7 +18,7 @@ DefineConstant[
thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]}, thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
thick_L_5 = {100 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]}, thick_L_5 = {100 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
thick_L_6 = {100 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]}, thick_L_6 = {100 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 0}, xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 1},
tag_geom = { 2 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}}, tag_geom = { 2 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
rx = {250 , Name StrCat[pp3,"/1rx"]}, rx = {250 , Name StrCat[pp3,"/1rx"]},
......
...@@ -18,7 +18,7 @@ DefineConstant[ ...@@ -18,7 +18,7 @@ DefineConstant[
thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]}, thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]}, thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]}, thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 0}, xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 1},
tag_geom = { 1 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}}, tag_geom = { 1 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
rx = {107 , Name StrCat[pp3,"/1rx"]}, rx = {107 , Name StrCat[pp3,"/1rx"]},
......
...@@ -18,7 +18,7 @@ DefineConstant[ ...@@ -18,7 +18,7 @@ DefineConstant[
thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]}, thick_L_4 = {50 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]}, thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]}, thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
xsideg = {30 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 0}, xsideg = {30 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 1},
tag_geom = { 4 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}}, tag_geom = { 4 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
rx = {100 , Name StrCat[pp3,"/1rx"]}, rx = {100 , Name StrCat[pp3,"/1rx"]},
......
...@@ -20,7 +20,7 @@ DefineConstant[ ...@@ -20,7 +20,7 @@ DefineConstant[
thick_L_4 = {25 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]}, thick_L_4 = {25 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
thick_L_5 = {25 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]}, thick_L_5 = {25 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
thick_L_6 = {25 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]}, thick_L_6 = {25 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 0}, xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 1},
tag_geom = { 2 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}}, tag_geom = { 2 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
rx = { 50 , Name StrCat[pp3,"/1rx"]}, rx = { 50 , Name StrCat[pp3,"/1rx"]},
......
...@@ -18,7 +18,7 @@ DefineConstant[ ...@@ -18,7 +18,7 @@ DefineConstant[
thick_L_4 = {100 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]}, thick_L_4 = {100 , Name StrCat[pp2,"/6thickness layer 4 [nm]"]},
thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]}, thick_L_5 = {50 , Name StrCat[pp2,"/7thickness layer 5 [nm]"]},
thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]}, thick_L_6 = {50 , Name StrCat[pp2,"/8thickness layer 6 [nm] (substrate)"]},
xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 0}, xsideg = {0 , Name StrCat[pp2,"/9skew angle [deg]"],Visible 1},
tag_geom = { 3 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}}, tag_geom = { 3 , Name StrCat[pp3,"/0Shape"], Choices {1="Pyramid",2="Cylindrical Hole",3="Torus",4="HalfEllipspoid",5="Checkerboard",6="bi-sinusoidal",7="2D lamellar"}},
rx = {150/2 , Name StrCat[pp3,"/1rx"]}, rx = {150/2 , Name StrCat[pp3,"/1rx"]},
......
...@@ -11,10 +11,9 @@ def dtrap_poy(fname_in,nx,ny): ...@@ -11,10 +11,9 @@ def dtrap_poy(fname_in,nx,ny):
myDir = sys.argv[1] myDir = sys.argv[1]
intpoyz_tot = dtrap_poy(myDir+'/Poy_tot_gd.pos',50,50) #*np.cos(float(sys.argv[2])*np.pi/180) intpoyz_tot = abs(dtrap_poy(myDir+'/Poy_tot_gd.pos',50,50))
intpoyz_ref = dtrap_poy(myDir+'/Poy_ref_gd.pos',50,50) #*np.cos(float(sys.argv[2])*np.pi/180) intpoyz_ref = abs(dtrap_poy(myDir+'/Poy_ref_gd.pos',50,50))
intpoyz_inc = dtrap_poy(myDir+'/Poy_inc_gd.pos',50,50) #*np.cos(float(sys.argv[2])*np.pi/180) intpoyz_inc = abs(dtrap_poy(myDir+'/Poy_inc_gd.pos',50,50))
Ascat2 = np.loadtxt(myDir+'/temp-Q_scat2.txt')[1]
Rnm = np.loadtxt(myDir+'/eff_r.txt',ndmin=2)[:,1] + 1j*np.loadtxt(myDir+'/eff_r.txt',ndmin=2)[:,2] Rnm = np.loadtxt(myDir+'/eff_r.txt',ndmin=2)[:,1] + 1j*np.loadtxt(myDir+'/eff_r.txt',ndmin=2)[:,2]
Tnm = np.loadtxt(myDir+'/eff_t.txt',ndmin=2)[:,1] + 1j*np.loadtxt(myDir+'/eff_t.txt',ndmin=2)[:,2] Tnm = np.loadtxt(myDir+'/eff_t.txt',ndmin=2)[:,1] + 1j*np.loadtxt(myDir+'/eff_t.txt',ndmin=2)[:,2]
...@@ -24,6 +23,7 @@ Q=np.array(Q) ...@@ -24,6 +23,7 @@ Q=np.array(Q)
TOT = Rnm.real.sum()+Tnm.real.sum()+Q.sum() TOT = Rnm.real.sum()+Tnm.real.sum()+Q.sum()
if myDir[6:]=='solarcell': if myDir[6:]=='solarcell':
print('cf pdf')
Nmax=2 Nmax=2
tab_lambdas=np.loadtxt(myDir+'/temp_lambda_step.txt',ndmin=2)[:,8] tab_lambdas=np.loadtxt(myDir+'/temp_lambda_step.txt',ndmin=2)[:,8]
nb_lambdas=len(tab_lambdas) nb_lambdas=len(tab_lambdas)
...@@ -44,13 +44,21 @@ if myDir[6:]=='solarcell': ...@@ -44,13 +44,21 @@ if myDir[6:]=='solarcell':
pl.legend() pl.legend()
pl.xlabel(r'$\lambda$ [nm]') pl.xlabel(r'$\lambda$ [nm]')
pl.ylabel('fraction of incident energy') pl.ylabel('fraction of incident energy')
pl.savefig('solar_balance.pdf') pl.savefig('fig_solar_balance.pdf')
elif myDir[6:]=='conv':
print('cf pdf')
pl.figure()
pl.plot(np.loadtxt(myDir+'/temp-Q_scat.txt',ndmin=2)[:,1])
pl.savefig('fig_convergence_absorption.pdf')
else: else:
print('===> Computed from diffraction efficiencies')
print('Rtot ',Rnm.real.sum()) print('Rtot ',Rnm.real.sum())
print('Rtot2',-intpoyz_ref/intpoyz_inc)
print('Ttot ',Tnm.real.sum()) print('Ttot ',Tnm.real.sum())
print('Ttot2',intpoyz_tot/intpoyz_inc)
print('Atot ',Q.sum()) print('Atot ',Q.sum())
print('Atot2 ',Ascat2/-intpoyz_inc)
print('TOT ',TOT) print('TOT ',TOT)
print('TOT2 ',(-Ascat2+intpoyz_tot-intpoyz_ref)/intpoyz_inc) print('===> Computed from trapz on Poynting vector')
print('(expected to be less precise)')
print('Rtot2',intpoyz_ref/intpoyz_inc)
print('Ttot2',intpoyz_tot/intpoyz_inc)
print('Atot ',Q.sum())
print('TOT2 ',Q.sum()+(intpoyz_tot+intpoyz_ref)/intpoyz_inc)
...@@ -8,6 +8,6 @@ done ...@@ -8,6 +8,6 @@ done
for t in bisin checker halfellipsoid hole pyramid torus 2Dlamellar solarcell conv skew for t in bisin checker halfellipsoid hole pyramid torus 2Dlamellar solarcell conv skew
do do
$GMSHDIR/gmsh grating3D.geo -setstring test_case $t res3D_$t/*.pos & $GMSHDIR/gmsh grating3D.geo -setstring test_case $t res3D_$t/*.pos &
echo "\n"$t echo "____________\n"$t
python grating3D_postplot.py res3D_$t python grating3D_postplot.py res3D_$t
done done
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment