# 如何在孔洞型光子晶体中填充材料

(1) 孔洞的直径大小；
(2) 蒸发台金属蒸发的速率；
(3) 蒸发台腔体的气压；
(4) 衬底的温度；
(5) 蒸发气态金属入射衬底的角度。

1. deleteall; # Clear everything in the view;

2. clear; # Clear all the variables in the workspace;

3. # Create a cylinder with an inclined plane

4. R =2e-6; # Radius of the cylinder;

5. h1=0.5e-6; # Height of the low point (R,0,h1) on the inclined plane;

6. h2=2e-6; # Height of the up point (-R,0,h2) on the inclined plane;

7. N=150; # Number of vector;

8. #theta=linspace(0,2*pi,N); # theta vector;

9. #x=R*cos(theta);

10. #y=R*sin(theta);

11. x=linspace(-R,R,N);

12. y=linspace(-R,R,N);

13. X=meshgridx(x,y);

14. Y=meshgridy(x,y);

15. Z=zeros(N,N);

16. # Equation for discribing the inclined plane;

17. #Z=-(h2-h1)/2/R*X+(h1+h2)/2; # Points on the inclined plane;

19. # otherwise, the height will be assigned 0.

20. for (i=1:N)

21. {for (j=1:N)

22. {if (X(i,j)^2+Y(i,j)^2<=R^2) # Control condition

23.     {Z(i,j)=-(h2-h1)/2/R*X(i,j)+(h1+h2)/2;}

24.     }

25.     }


27. set(“name”,“inclinedcylinder”);

28. importsurface2(Z,x,y,1);

29. set(“z min”,0);

30. set(“material”,“etch”);

34. set(“z min”,0);

35. set(“z max”,h2);

36. set(“material”,“Ag (Silver) - CRC”);

37. set(“override mesh order from material database”,2);

39. # Create holes array

40. Nx=10;

41. Ny=10;

42. d=3*R; # The distance between each circle, centre to centre distance;

43. selectall;

44. for (i=1:Nx)

45. {for (j=1:Ny)

46. {copy(0,0);

47.  set("x",(i-1)*d);

48.  set("y",(j-1)*d);}

49. }

50. selectall;

51. move(-Nxd/2+R,-Nyd/2+R);

52. # Before creating GaN layer, add GaN material into the database at first.

53. cd(“E:\Lumerical\Literatures\Materials_database-2019-02-11\database\data\main\GaN”);

55. sigma=matrix(length(data(:,1)),2);

56. sigma=[c/data(:,1)*1e6,(data(:,2)+sqrt(-1)*data(:,3))^2];

58. setmaterial(temp,“name”,“GaN”);

59. setmaterial(“GaN”,“anisotropy”,0);

60. setmaterial(“GaN”,“sampled data”,sigma);

61. # Create substrate

62. Lx=Nxd+2R;

63. Ly=Nyd+2R;

65. set(“z min”,-5*h2);

66. set(“z max”,h2);

67. set(“x”,0);

68. set(“y”,0);

69. set(“x span”,Lx);

70. set(“y span”,Ly);

71. set(“name”,“GaN”);

72. set(“material”,“GaN”);

73. set(“override mesh order from material database”,3);

1 Like