-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3-layers-plasmonic-reflection-coefficient.nb
3921 lines (3863 loc) · 181 KB
/
3-layers-plasmonic-reflection-coefficient.nb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 11.2' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 185490, 3913]
NotebookOptionsPosition[ 180654, 3834]
NotebookOutlinePosition[ 181052, 3850]
CellTagsIndexPosition[ 181009, 3847]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[
RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}]], "Input",
CellChangeTimes->{{3.7855067698475027`*^9, 3.7855068571920433`*^9}, {
3.785510038647949*^9, 3.785510052313773*^9}, 3.785510523069849*^9, {
3.7855106077701826`*^9, 3.7855106078778915`*^9}, {3.785512337144236*^9,
3.785512401044236*^9}, {3.7855129114139147`*^9, 3.785512915176815*^9}, {
3.7855180771060033`*^9, 3.7855180775667715`*^9}, {3.7855181148529625`*^9,
3.785518150818573*^9}, {3.7855185965082984`*^9, 3.785518613362252*^9}, {
3.7855187173393183`*^9, 3.78551878256462*^9}, {3.785519006183885*^9,
3.785519031660817*^9}, {3.785519204322954*^9, 3.7855193017007556`*^9}, {
3.785519333399299*^9, 3.7855194617217937`*^9}, {3.7855195212938614`*^9,
3.7855195279854045`*^9}, {3.7855212112781076`*^9,
3.7855212187675776`*^9}, {3.785521416487167*^9, 3.785521417052539*^9},
3.7855215541871133`*^9},ExpressionUUID->"c634ed1a-5c65-414f-ad47-\
58390a39359b"],
Cell[BoxData[
RowBox[{
RowBox[{"Layers", "=", "3"}], ";"}]], "Input",
CellChangeTimes->{
3.7893080152086473`*^9, 3.789308497929611*^9, 3.7893089844574103`*^9,
3.7893102293030553`*^9, 3.789310678406498*^9, {3.7893108760813093`*^9,
3.789310895474047*^9}, 3.789498914311472*^9,
3.789498947253589*^9},ExpressionUUID->"971af514-a3c5-4aa3-9920-\
53ece1d152e2"],
Cell[BoxData[{
StyleBox[
RowBox[{
RowBox[{"hbar", "=",
RowBox[{"1.0545717", " ",
SuperscriptBox["10",
RowBox[{"-", "27"}]]}]}], ";"}],
FontSize->12], "\[IndentingNewLine]",
StyleBox[
RowBox[{
RowBox[{"clight", "=", "29979245800."}], ";"}],
FontSize->12], "\[IndentingNewLine]",
StyleBox[
RowBox[{
RowBox[{"e", "=",
RowBox[{"4.80320425", " ",
SuperscriptBox["10",
RowBox[{"-", "10"}]]}]}], ";"}],
FontSize->12], "\[IndentingNewLine]",
StyleBox[
RowBox[{
RowBox[{"eV", "=",
RowBox[{"e", " ",
FractionBox["1.", "300."]}]}], ";"}],
FontSize->12], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"nm", "=",
SuperscriptBox["10",
RowBox[{"-", "7"}]]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input",
CellChangeTimes->{{3.7893202509474735`*^9, 3.789320253303204*^9},
3.7894793259525905`*^9, {3.7894793601511736`*^9, 3.789479373113525*^9}, {
3.7896778414220953`*^9, 3.789677841834751*^9}},
Background->RGBColor[
0.88, 1, 0.88],ExpressionUUID->"ff166fa1-dbce-45c2-a190-d0e3d516f3aa"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Graphics", "[",
RowBox[{
RowBox[{"{",
RowBox[{"Orange", ",",
RowBox[{"Disk", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"-", ".5"}], ",", "0"}], "}"}], ",", "2.5", ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", "Pi"}], ",", "Pi"}], "}"}]}], "]"}], ",",
RowBox[{"(*",
RowBox[{"Thick", ",", "Green", ",",
RowBox[{"Rectangle", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"-", "3"}], ",",
RowBox[{"-", "1"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"2", ",", ".3"}], "}"}]}], "]"}], ","}], "*)"}], "Thick",
",", "Cyan", ",",
RowBox[{"Rectangle", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"-", "3"}], ",", "2.5"}], "}"}], ",",
RowBox[{"{",
RowBox[{"2", ",", ".3"}], "}"}]}], "]"}], ",", "Thick", ",", "Red",
",",
RowBox[{"Rectangle", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"-", "3"}], ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"2", ",", ".5"}], "}"}]}], "]"}], ",", "Orange", ",", "Black",
",", "Dashed", ",",
RowBox[{"Line", "[",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"-", "1"}], ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"4", ",", "0"}], "}"}]}], "}"}], "]"}], ",",
RowBox[{"Line", "[",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"-", "1"}], ",", ".5"}], "}"}], ",",
RowBox[{"{",
RowBox[{"4", ",", ".5"}], "}"}]}], "}"}], "]"}]}], "}"}], ",",
RowBox[{"Epilog", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"Text", "[",
RowBox[{
RowBox[{"Style", "[", "\"\<\[Epsilon]m\>\"", "]"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", "0.5"}], ",", ".25"}], "}"}]}], "]"}], ",",
RowBox[{"Text", "[",
RowBox[{
RowBox[{"Style", "[", "\"\<\[Epsilon]1\>\"", "]"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", ".5"}], ",",
RowBox[{"-", "1"}]}], "}"}]}], "]"}], ",",
RowBox[{"Text", "[",
RowBox[{
RowBox[{"Style", "[", "\"\<\[Epsilon]3\>\"", "]"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", ".5"}], ",", "1"}], "}"}]}], "]"}], ",",
RowBox[{"Text", "[",
RowBox[{
RowBox[{"Style", "[", "\"\<z=-d\>\"", "]"}], ",",
RowBox[{"{",
RowBox[{"3", ",",
RowBox[{"-", ".2"}]}], "}"}]}], "]"}], ",",
RowBox[{"Text", "[",
RowBox[{
RowBox[{"Style", "[", "\"\<z=0\>\"", "]"}], ",",
RowBox[{"{",
RowBox[{"3", ",", ".7"}], "}"}]}], "]"}]}], "}"}]}], ",",
RowBox[{"BaseStyle", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"FontFamily", "\[Rule]", "\"\<Helvetica\>\""}], ",",
RowBox[{"FontSize", "\[Rule]", "16"}], ",", "Black"}], "}"}]}]}],
"]"}]], "Input",
CellChangeTimes->{{3.7894801090177765`*^9, 3.789480125830837*^9}, {
3.789480158042726*^9, 3.7894802832667065`*^9}, {3.7894803331264286`*^9,
3.78948050731155*^9}, {3.7894806286468563`*^9, 3.7894806290667615`*^9}, {
3.7894807018202763`*^9, 3.789480732384093*^9}, {3.789480795069541*^9,
3.7894808024608*^9}, {3.7894809637339892`*^9, 3.789481412160551*^9}, {
3.7894820057713113`*^9, 3.7894820068335123`*^9}, {3.7894820452128935`*^9,
3.7894821917889595`*^9}, {3.7894822298133154`*^9, 3.789482489905508*^9}, {
3.7894825311697235`*^9, 3.78948265185065*^9}, {3.7894827905609136`*^9,
3.7894828181731043`*^9}, {3.789482854506982*^9, 3.789482937177146*^9}, {
3.7897612863537292`*^9,
3.789761292329392*^9}},ExpressionUUID->"c655446d-0767-4591-9960-\
ff6a954f7afd"],
Cell[BoxData[
GraphicsBox[{
{RGBColor[1, 0.5, 0],
DiskBox[{-0.5, 0}, 2.5,
NCache[{-Pi, Pi}, {-3.141592653589793, 3.141592653589793}]]},
{RGBColor[0, 1, 1], Thickness[Large], RectangleBox[{-3, 2.5}, {2, 0.3}]},
{RGBColor[1, 0, 0], Thickness[Large], RectangleBox[{-3, 0}, {2, 0.5}],
{GrayLevel[0], Dashing[{Small, Small}], LineBox[{{-1, 0}, {4, 0}}],
LineBox[{{-1, 0.5}, {4, 0.5}}]}}},
BaseStyle->{FontFamily -> "Helvetica", FontSize -> 16,
GrayLevel[0]},
Epilog->{
InsetBox[
FormBox[
StyleBox["\"\[Epsilon]m\"", StripOnInput -> False],
TraditionalForm], {-0.5, 0.25}],
InsetBox[
FormBox[
StyleBox["\"\[Epsilon]1\"", StripOnInput -> False],
TraditionalForm], {-0.5, -1}],
InsetBox[
FormBox[
StyleBox["\"\[Epsilon]3\"", StripOnInput -> False],
TraditionalForm], {-0.5, 1}],
InsetBox[
FormBox[
StyleBox["\"z=-d\"", StripOnInput -> False], TraditionalForm], {
3, -0.2}],
InsetBox[
FormBox[
StyleBox["\"z=0\"", StripOnInput -> False], TraditionalForm], {
3, 0.7}]}]], "Output",
CellChangeTimes->{
3.7894821009334126`*^9, {3.789482152540874*^9, 3.789482192514021*^9}, {
3.789482233908369*^9, 3.789482490479972*^9}, {3.7894825317771387`*^9,
3.7894825922534432`*^9}, {3.78948263258113*^9, 3.789482672781699*^9}, {
3.789482802480054*^9, 3.7894828188792157`*^9}, {3.7894828581654015`*^9,
3.78948293768379*^9}, 3.78948298227672*^9, 3.7894832276270227`*^9,
3.789483410484091*^9, {3.789483460812882*^9, 3.7894835012427797`*^9},
3.789484012567274*^9, 3.7894840844820375`*^9, 3.7894841596357765`*^9,
3.789484575134444*^9, 3.789485037492123*^9, 3.789485103528571*^9,
3.789485158801381*^9, 3.7894852020587497`*^9, 3.7894852751201935`*^9,
3.7894853107688985`*^9, 3.789485470691461*^9, 3.7894855362631655`*^9, {
3.789485585121532*^9, 3.7894856085708494`*^9}, 3.789488360560873*^9,
3.7894904595870066`*^9, 3.789490525963574*^9, 3.789490625494171*^9,
3.789490671078679*^9, 3.789492233861788*^9, 3.789492352191515*^9,
3.7894931706573877`*^9, {3.789493377784125*^9, 3.7894933972530513`*^9},
3.789493495645465*^9, 3.789493912406863*^9, {3.789494102442272*^9,
3.78949412694976*^9}, {3.789494195297959*^9, 3.789494218832049*^9}, {
3.789494274724222*^9, 3.7894942994697556`*^9}, {3.7894944067862678`*^9,
3.7894944753769226`*^9}, {3.7894945186703978`*^9,
3.7894946099673815`*^9}, {3.789494677234165*^9, 3.7894947121847196`*^9}, {
3.7894952093571415`*^9, 3.789495225045138*^9}, 3.7894952700697813`*^9,
3.789496578657816*^9, {3.7894966209699554`*^9, 3.7894966489322524`*^9}, {
3.7894967823255577`*^9, 3.789496816390652*^9}, 3.7894968728649635`*^9,
3.7894969697667007`*^9, 3.7894971529250293`*^9, {3.7894971869171658`*^9,
3.7894972074514694`*^9}, {3.7894972520632315`*^9, 3.7894972819563246`*^9},
3.789497430136055*^9, {3.78949763905451*^9, 3.789497656488905*^9},
3.7894977321735888`*^9, 3.789497801400739*^9, {3.7894978878041687`*^9,
3.7894979229162884`*^9}, 3.7894980601789713`*^9, {3.789498106667272*^9,
3.789498130268183*^9}, 3.789498183597681*^9, 3.789498299949815*^9,
3.7894983591661654`*^9, 3.789498407859976*^9, 3.7894984543976326`*^9,
3.7894985139266524`*^9, 3.7894985543984585`*^9, {3.7894986240868526`*^9,
3.7894986362533*^9}, 3.789498707433014*^9, {3.7894988170315075`*^9,
3.789498879138487*^9}, {3.7894989154863253`*^9, 3.7894989486149817`*^9},
3.7894995952111425`*^9, 3.7894996511346793`*^9, {3.789500036853959*^9,
3.7895000615170317`*^9}, {3.7895001314261255`*^9, 3.789500150110282*^9},
3.7895002465734634`*^9, 3.7895004161597013`*^9, 3.7895004704535656`*^9,
3.789500563805435*^9, 3.7895006857248755`*^9, 3.789500800863197*^9, {
3.789500843208997*^9, 3.7895008550693216`*^9}, {3.7895008962981305`*^9,
3.78950090569411*^9}, 3.789500989385478*^9, 3.789501075059957*^9,
3.7895013859381847`*^9, 3.789501542861123*^9, 3.7895015866137323`*^9,
3.7895016916781025`*^9, 3.789501975891876*^9, 3.7895020811883516`*^9, {
3.789502136514825*^9, 3.7895021594465256`*^9}, 3.789502250086292*^9,
3.789502334235159*^9, 3.789502385628646*^9, {3.7895024378975086`*^9,
3.7895024524466186`*^9}, {3.789502498091571*^9, 3.789502505408143*^9},
3.7895025517184973`*^9, 3.789565457430685*^9, 3.7895655780356793`*^9,
3.789565619365331*^9, 3.7895656949913692`*^9, 3.7895657642083426`*^9,
3.789565794907699*^9, 3.7895662952702413`*^9, {3.7895663319237328`*^9,
3.7895663544157047`*^9}, 3.789566439803854*^9, {3.789566885704457*^9,
3.789566905126539*^9}, 3.789567027054059*^9, 3.7895670723549337`*^9,
3.789567156312042*^9, 3.7895675340836267`*^9, {3.7895677446590576`*^9,
3.7895677904865537`*^9}, 3.789569078266651*^9, {3.789569108804109*^9,
3.7895691149272175`*^9}, {3.789569328462805*^9, 3.789569346879553*^9},
3.789569408158553*^9, 3.789569516284746*^9, 3.789569667606873*^9,
3.7895697490057964`*^9, 3.7895700932874856`*^9, 3.7895702134038577`*^9, {
3.7895703826065135`*^9, 3.7895704561764936`*^9}, 3.7895705058629055`*^9,
3.789570586037654*^9, 3.7895707807444935`*^9, 3.7895709153554897`*^9,
3.789570952496356*^9, 3.789571023310028*^9, 3.789571093157468*^9,
3.7895716279184227`*^9, 3.7895718444303823`*^9, 3.78957194881706*^9,
3.7895720405970945`*^9, 3.789572080193921*^9, 3.7895722210631814`*^9, {
3.789572259559587*^9, 3.7895722736106215`*^9}, {3.789572307493022*^9,
3.7895723547516923`*^9}, 3.789572397482295*^9, {3.789572448250903*^9,
3.789572495033016*^9}, 3.7895739751184053`*^9, {3.7895852238010736`*^9,
3.789585258205358*^9}, 3.7895855388479304`*^9, {3.7895856368963723`*^9,
3.7895856528237963`*^9}, 3.789585693532298*^9, 3.789585727078625*^9, {
3.7895862845864735`*^9, 3.789586301490259*^9}, {3.7895863413918176`*^9,
3.78958636558515*^9}, 3.789586400355203*^9, {3.7895864586524806`*^9,
3.789586487556241*^9}, 3.7895865323724155`*^9, 3.789587857799858*^9,
3.789587976951124*^9, 3.7895880218831816`*^9, 3.789588278216159*^9,
3.789588909620867*^9, 3.789659148814599*^9, 3.7896749855881124`*^9,
3.789676125577442*^9, {3.78967627098007*^9, 3.7896762995840235`*^9},
3.789676928716036*^9, 3.7896775691859202`*^9, {3.789677754920843*^9,
3.789677782047138*^9}, 3.789678143297882*^9, 3.7896784348885584`*^9,
3.789678528605591*^9, {3.7896786859027157`*^9, 3.789678713997141*^9},
3.7896787611147313`*^9, 3.7896788235826473`*^9, 3.789678989860408*^9,
3.7896796590708003`*^9, 3.789679752846371*^9, {3.78967993553296*^9,
3.7896799839982586`*^9}, 3.7896800350036964`*^9, 3.7896803118245935`*^9,
3.789680387542113*^9, 3.789680418667269*^9, 3.789680456661158*^9, {
3.78968066288806*^9, 3.7896806990267496`*^9}, 3.789681243641185*^9,
3.7896813179503717`*^9, 3.789681448905409*^9, {3.78968154083307*^9,
3.789681572585614*^9}, 3.789681812578278*^9, 3.789681876915442*^9,
3.789681944668223*^9, 3.789682012900092*^9, 3.7897500908303967`*^9,
3.7897501370021954`*^9, 3.789750225223452*^9, {3.7897502622105722`*^9,
3.7897502843813066`*^9}, {3.789751988313095*^9, 3.7897520043364563`*^9},
3.78975397722719*^9, {3.7897568020070643`*^9, 3.789756893990237*^9}, {
3.7897612244339724`*^9, 3.789761254302616*^9}, 3.7897612937706947`*^9,
3.789762068694903*^9, {3.789762257537299*^9, 3.789762277727049*^9},
3.7897637916849575`*^9, 3.7897638447881174`*^9, 3.7897638851319523`*^9, {
3.789764000739211*^9, 3.789764028638747*^9}, 3.789764064990918*^9,
3.789764095195032*^9, {3.789764265052706*^9, 3.789764273001545*^9},
3.789764341261233*^9, {3.789764373771866*^9, 3.7897643990179815`*^9}, {
3.789764507009956*^9, 3.7897645302292705`*^9}, 3.7897645676771326`*^9,
3.789766030099624*^9, {3.789766324038123*^9,
3.789766345067096*^9}},ExpressionUUID->"bde13c44-4960-4cdb-a7d9-\
c834f31705ee"]
}, Open ]],
Cell[BoxData[""], "Input",
CellChangeTimes->{{3.7894815251069455`*^9,
3.789481527967328*^9}},ExpressionUUID->"338dd63c-8d50-411f-8b34-\
4fd577058cd4"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"(*",
RowBox[{"Defining", " ", "the", " ", "variables"}], "*)"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"\[Mu]", "[", "i_", "]"}], ":=", "1"}], ";"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{"params", "=",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"\[Epsilon]", "[", "1", "]"}], "\[Rule]", "3.2"}],
RowBox[{"(*", "glass", "*)"}], ",",
RowBox[{
RowBox[{"\[Epsilon]", "[", "3", "]"}], "\[Rule]", "2"}],
RowBox[{"(*",
RowBox[{"heavy", " ", "glass"}], "*)"}], ",",
RowBox[{
RowBox[{"\[Epsilon]", "[", "2", "]"}], "\[Rule]",
RowBox[{"(",
RowBox[{
RowBox[{"-", "10.91"}], "+",
RowBox[{"0.83", "\[ImaginaryI]"}]}], ")"}]}]}],
RowBox[{"(*",
RowBox[{"(*",
RowBox[{"-", "15"}], "*)"}],
RowBox[{"(",
RowBox[{"1", "-",
SuperscriptBox[
RowBox[{"(",
RowBox[{"\[Omega]p", "/", "\[Omega]"}], ")"}], "2"]}], ")"}],
"*)"}],
RowBox[{"(*", "metal", "*)"}], "}"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"vars1", "=",
RowBox[{"Flatten", "[",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"\[Epsilon]", "[", "i", "]"}],
RowBox[{"(*",
RowBox[{",",
RowBox[{"\[Kappa]", "[", "i", "]"}]}], "*)"}], ",",
RowBox[{"u", "[", "i", "]"}], ",",
RowBox[{"A", "[", "i", "]"}], ",",
RowBox[{"B", "[", "i", "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",",
RowBox[{"Layers", "+", "3"}]}], "}"}]}], "]"}], "]"}]}], ";"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{"vars2", "=",
RowBox[{"ToExpression", "[",
RowBox[{"Flatten", "[",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"StringJoin", "[",
RowBox[{
RowBox[{"ToString", "[", "\[Epsilon]", "]"}], ",",
RowBox[{"ToString", "[", "i", "]"}]}], "]"}],
RowBox[{"(*",
RowBox[{",",
RowBox[{"StringJoin", "[",
RowBox[{
RowBox[{"ToString", "[", "\[Kappa]", "]"}], ",",
RowBox[{"ToString", "[", "i", "]"}]}], "]"}]}], "*)"}], ",",
RowBox[{"StringJoin", "[",
RowBox[{
RowBox[{"ToString", "[", "u", "]"}], ",",
RowBox[{"ToString", "[", "i", "]"}]}], "]"}], ",",
RowBox[{"StringJoin", "[",
RowBox[{
RowBox[{"ToString", "[", "A", "]"}], ",",
RowBox[{"ToString", "[", "i", "]"}]}], "]"}], ",",
RowBox[{"StringJoin", "[",
RowBox[{
RowBox[{"ToString", "[", "B", "]"}], ",",
RowBox[{"ToString", "[", "i", "]"}]}], "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",",
RowBox[{"Layers", "+", "3"}]}], "}"}]}], "]"}], "]"}], "]"}]}],
";"}], "\n",
RowBox[{
RowBox[{"vars11", "=",
RowBox[{"Flatten", "[",
RowBox[{"Append", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"E0", "[",
RowBox[{"y", ",", "0"}], "]"}], ",",
RowBox[{"E0", "[",
RowBox[{"0", ",", "z"}], "]"}]}], "}"}], ",", "vars1"}], "]"}],
"]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"vars12", "=",
RowBox[{"Flatten", "[",
RowBox[{"Append", "[",
RowBox[{
RowBox[{"{",
RowBox[{"E0y", ",", "E0z"}], "}"}], ",", "vars2"}], "]"}], "]"}]}],
";"}], "\n",
RowBox[{
RowBox[{"Evaluate", "[", "vars11", "]"}], "=", "vars12"}]}]}]], "Input",
CellChangeTimes->{{3.7888705661914897`*^9, 3.7888705767702456`*^9}, {
3.788871197818219*^9, 3.7888713710740185`*^9}, {3.7888728313168807`*^9,
3.78887289645376*^9}, {3.788872938317853*^9, 3.7888729400602245`*^9}, {
3.7888729754961596`*^9, 3.7888731538881865`*^9}, {3.788873658191519*^9,
3.788873701680309*^9}, 3.788876220176854*^9, {3.7888806953695345`*^9,
3.7888807060819287`*^9}, {3.7890775181283503`*^9, 3.789077539938979*^9}, {
3.789302609853362*^9, 3.7893026260405583`*^9}, {3.7893027060496545`*^9,
3.789302737500264*^9}, {3.78930278645337*^9, 3.7893027972834682`*^9}, {
3.789302967913125*^9, 3.7893029880981636`*^9}, {3.789303019116247*^9,
3.7893031240415163`*^9}, {3.789303156102813*^9, 3.789303170841423*^9}, {
3.7893033575579176`*^9, 3.78930336964557*^9}, {3.789303694478507*^9,
3.7893037120943837`*^9}, {3.789306133759498*^9, 3.7893061378525295`*^9}, {
3.789316245577607*^9, 3.789316296585269*^9}, {3.7893164874610004`*^9,
3.7893164897967606`*^9}, {3.7893170907295446`*^9,
3.7893172586087904`*^9}, {3.7893172889705973`*^9,
3.7893173587061872`*^9}, {3.7893201746245117`*^9, 3.78932019084756*^9}, {
3.789474217878276*^9, 3.7894742287462244`*^9}, {3.7894742628181868`*^9,
3.789474277714363*^9}, {3.789474802253723*^9, 3.789474806563205*^9}, {
3.789477665730548*^9, 3.789477670480852*^9}, {3.789477710446376*^9,
3.789477711900486*^9}, {3.789477767397137*^9, 3.789477790061551*^9}, {
3.789477899102829*^9, 3.7894779245857077`*^9}, {3.78947916937883*^9,
3.78947917252242*^9}, {3.789479641190981*^9, 3.7894796680621505`*^9}, {
3.7894798679677043`*^9, 3.7894798696024055`*^9}, {3.789494093617895*^9,
3.7894941153836784`*^9}, {3.789501534438636*^9, 3.7895015409591756`*^9}, {
3.789569507292762*^9, 3.789569512588605*^9}, {3.7895696578818645`*^9,
3.789569665253131*^9}, {3.7895855334503574`*^9, 3.78958553703378*^9}, {
3.789585683714223*^9, 3.7895856875320196`*^9}, {3.789585721260179*^9,
3.7895857252205925`*^9}, {3.789586524720869*^9, 3.789586528713197*^9}, {
3.789677748652076*^9, 3.7896777796622005`*^9}, {3.7897500825505295`*^9,
3.789750084539212*^9}, {3.789751986149954*^9, 3.789752002640031*^9}},
Background->RGBColor[
1, 0.85, 0.85],ExpressionUUID->"d3f9ea3a-b5d2-479e-8f12-bc3a61158db2"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
"E0y", ",", "E0z", ",", "\[Epsilon]1", ",", "u1", ",", "A1", ",", "B1", ",",
"\[Epsilon]2", ",", "u2", ",", "A2", ",", "B2", ",", "\[Epsilon]3", ",",
"u3", ",", "A3", ",", "B3", ",", "\[Epsilon]4", ",", "u4", ",", "A4", ",",
"B4", ",", "\[Epsilon]5", ",", "u5", ",", "A5", ",", "B5", ",",
"\[Epsilon]6", ",", "u6", ",", "A6", ",", "B6"}], "}"}]], "Output",
CellChangeTimes->{{3.7893166929746494`*^9, 3.789316738923155*^9},
3.789316838167962*^9, 3.7893172672207375`*^9, {3.789317349190622*^9,
3.789317359098138*^9}, {3.7893185558076735`*^9, 3.789318571172188*^9},
3.7893208734957466`*^9, {3.7893209115094075`*^9, 3.7893209148544674`*^9},
3.789474282699999*^9, 3.7894746274699154`*^9, 3.789474810134654*^9,
3.7894766724376926`*^9, 3.7894775433742824`*^9, 3.7894777169649467`*^9,
3.7894777952367177`*^9, {3.7894779112802863`*^9, 3.7894779270710616`*^9}, {
3.7894790537269816`*^9, 3.7894790775822144`*^9}, {3.7894791743175883`*^9,
3.789479215514868*^9}, {3.7894796457657514`*^9, 3.789479669653899*^9},
3.7894797821682262`*^9, 3.7894798714713717`*^9, 3.7894826728614855`*^9,
3.7894829823505225`*^9, 3.7894832276848683`*^9, 3.7894834105359516`*^9, {
3.7894834608776827`*^9, 3.7894835012966447`*^9}, {3.7894840063947735`*^9,
3.7894840126241217`*^9}, 3.7894840845408792`*^9, 3.7894841596856422`*^9,
3.7894845751863055`*^9, 3.789485037548033*^9, 3.789485103588411*^9,
3.7894851588562355`*^9, 3.7894852021136036`*^9, 3.789485275173051*^9,
3.789485310828742*^9, 3.7894854707493067`*^9, 3.7894855363269653`*^9, {
3.7894855851813726`*^9, 3.7894856086267023`*^9}, 3.7894883606147294`*^9,
3.789490459646848*^9, 3.7894905260114465`*^9, 3.789490625544038*^9,
3.7894906711295424`*^9, 3.789492233922626*^9, 3.7894923522393875`*^9,
3.789493170708252*^9, {3.7894933778379498`*^9, 3.7894933973159094`*^9},
3.7894934956963296`*^9, 3.7894939124557295`*^9, {3.7894941024901423`*^9,
3.789494127002618*^9}, {3.789494195351815*^9, 3.7894942188898993`*^9}, {
3.789494274780072*^9, 3.789494299522602*^9}, {3.7894944068401237`*^9,
3.7894944754287834`*^9}, {3.789494518725251*^9, 3.7894946100262237`*^9}, {
3.789494677286008*^9, 3.7894947122395735`*^9}, {3.789495209407008*^9,
3.789495225098998*^9}, 3.789495270118658*^9, 3.7894965787026634`*^9, {
3.7894966210208564`*^9, 3.789496648989057*^9}, {3.7894967823743997`*^9,
3.789496816439502*^9}, 3.7894968729228153`*^9, 3.7894969698165655`*^9,
3.7894971529818797`*^9, {3.789497186975009*^9, 3.789497207506319*^9}, {
3.7894972521160917`*^9, 3.789497282018159*^9}, 3.789497430193901*^9, {
3.7894976391083765`*^9, 3.789497656545783*^9}, 3.7894977322294397`*^9,
3.7894978014476414`*^9, {3.7894978878600225`*^9, 3.7894979229741287`*^9},
3.789498060232832*^9, {3.7894981067221236`*^9, 3.7894981303190536`*^9},
3.789498183652568*^9, 3.789498300015671*^9, 3.7894983592210245`*^9,
3.789498407918844*^9, 3.789498454454484*^9, 3.789498513977481*^9,
3.789498554454312*^9, {3.7894986241476603`*^9, 3.789498636320122*^9},
3.789498707498807*^9, {3.7894988170923615`*^9, 3.789498879186388*^9}, {
3.7894989155402164`*^9, 3.7894989486628485`*^9}, 3.7894995952679887`*^9,
3.789499651180552*^9, {3.789500036902828*^9, 3.78950006157089*^9}, {
3.7895001314690113`*^9, 3.7895001501502123`*^9}, 3.789500246614383*^9,
3.7895004162006207`*^9, 3.7895004704984465`*^9, 3.78950056384935*^9,
3.789500685775729*^9, 3.7895008009316015`*^9, {3.7895008432648773`*^9,
3.789500855123148*^9}, {3.78950089635102*^9, 3.7895009057511735`*^9},
3.7895009894383464`*^9, 3.789501075125811*^9, 3.789501385981036*^9,
3.7895015429100065`*^9, 3.78950158665565*^9, 3.7895016917244716`*^9,
3.7895019759557047`*^9, 3.7895020812511864`*^9, {3.789502136570676*^9,
3.789502159500414*^9}, 3.789502250137186*^9, 3.789502334295001*^9,
3.7895023856805377`*^9, {3.7895024379573174`*^9, 3.7895024525044622`*^9}, {
3.7895024981445265`*^9, 3.789502505462962*^9}, 3.7895025517743797`*^9,
3.789565457471593*^9, 3.789565578079564*^9, 3.7895656194141984`*^9,
3.78956569503528*^9, 3.7895657642572126`*^9, 3.789565794959564*^9,
3.7895662953290825`*^9, {3.789566331976592*^9, 3.7895663544645743`*^9},
3.7895664398586783`*^9, {3.789566885750335*^9, 3.7895669051724167`*^9},
3.7895670271078863`*^9, 3.789567072402834*^9, 3.7895671563698597`*^9,
3.7895675341335106`*^9, {3.789567744714887*^9, 3.789567790536392*^9},
3.7895690783145237`*^9, {3.7895691088549423`*^9, 3.789569114981099*^9}, {
3.78956932852264*^9, 3.789569346928449*^9}, 3.7895694082113824`*^9,
3.7895695163375826`*^9, 3.789569667655739*^9, 3.789569749057692*^9,
3.789570093341369*^9, 3.7895702134617043`*^9, {3.78957038265242*^9,
3.789570456230316*^9}, 3.7895705059157915`*^9, 3.7895705860845304`*^9,
3.789570780807326*^9, 3.7895709154033623`*^9, 3.7895709525472174`*^9,
3.7895710233678737`*^9, 3.789571093209304*^9, 3.7895716279652967`*^9,
3.789571844476259*^9, 3.7895719488619685`*^9, 3.789572040645966*^9,
3.789572080249771*^9, 3.7895722211219935`*^9, {3.7895722596154375`*^9,
3.7895722736764174`*^9}, {3.7895723075478745`*^9, 3.7895723548115616`*^9},
3.7895723975401196`*^9, {3.7895724483067565`*^9, 3.7895724950868673`*^9},
3.7895739751753287`*^9, {3.7895852238469515`*^9, 3.7895852582611723`*^9},
3.7895855388958006`*^9, {3.78958563695123*^9, 3.7895856528746605`*^9},
3.7895856935761847`*^9, 3.7895857271324816`*^9, {3.7895862846343465`*^9,
3.7895863015471077`*^9}, {3.7895863414466705`*^9, 3.7895863656409965`*^9},
3.7895864004090576`*^9, {3.7895864587033463`*^9, 3.7895864876030903`*^9}, {
3.789586530637083*^9, 3.7895865324222813`*^9}, 3.7895878578507223`*^9,
3.7895879769960113`*^9, 3.789588021933016*^9, 3.789588278263033*^9,
3.7895889096767178`*^9, 3.789659148904319*^9, 3.7896749857844706`*^9,
3.7896761256845274`*^9, {3.7896762713766537`*^9, 3.7896763000302134`*^9},
3.7896769289856973`*^9, 3.789677569438424*^9, {3.789677755170806*^9,
3.7896777823052087`*^9}, 3.789678143581736*^9, 3.789678435060438*^9,
3.7896785289114046`*^9, {3.789678686138528*^9, 3.7896787142266192`*^9},
3.7896787613690577`*^9, 3.789678823790359*^9, 3.7896789899972167`*^9,
3.7896796591709695`*^9, 3.7896797531021786`*^9, {3.7896799357640686`*^9,
3.789679984104739*^9}, 3.789680035221595*^9, 3.7896803122086754`*^9,
3.789680387754656*^9, 3.7896804189036756`*^9, 3.7896804571367645`*^9, {
3.7896806631246557`*^9, 3.789680699218648*^9}, 3.7896812438921385`*^9,
3.7896813182723794`*^9, 3.789681449238704*^9, {3.789681540996845*^9,
3.7896815728212895`*^9}, 3.7896818128023443`*^9, 3.7896818771221704`*^9,
3.7896819449474*^9, 3.7896820131659365`*^9, 3.7897500909042*^9,
3.7897501370740767`*^9, 3.7897502253012357`*^9, {3.7897502622873654`*^9,
3.7897502844590983`*^9}, {3.789751988382909*^9, 3.7897520044052725`*^9},
3.7897539772840385`*^9, {3.7897568020708914`*^9, 3.789756894056076*^9}, {
3.789761224478881*^9, 3.7897612543338428`*^9}, 3.789761293817562*^9,
3.78976206874477*^9, {3.789762257596506*^9, 3.7897622777639494`*^9},
3.7897637917298374`*^9, 3.7897638448419724`*^9, 3.789763885163167*^9, {
3.78976400078808*^9, 3.789764028690609*^9}, 3.7897640650221586`*^9,
3.7897640952263064`*^9, 3.7897642650995693`*^9, 3.789764341306115*^9, {
3.7897643738187532`*^9, 3.7897643990718107`*^9}, {3.78976450707241*^9,
3.7897645302771096`*^9}, 3.7897645677170687`*^9, 3.789766030156471*^9, {
3.789766324100644*^9,
3.7897663451139607`*^9}},ExpressionUUID->"abb0f270-f1c8-4442-bd3b-\
0be9549442fd"]
}, Open ]],
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"params1", "=",
RowBox[{"{",
RowBox[{
RowBox[{"A1", "\[Rule]", "1"}], ",",
RowBox[{"B1", "\[Rule]", "r"}], ",",
RowBox[{"A3", "\[Rule]", "t"}], ",",
RowBox[{"A4", "\[Rule]", "0"}], ",",
RowBox[{"B4", "\[Rule]", "r"}], ",",
RowBox[{"A6", "\[Rule]", "t"}]}], "}"}]}], ";"}],
"\[IndentingNewLine]"}]], "Input",
CellChangeTimes->{{3.7894743102463646`*^9, 3.7894743581410913`*^9}, {
3.78947439206042*^9, 3.7894743974151077`*^9}, 3.7894746243741927`*^9, {
3.7894749382007136`*^9, 3.789474942027482*^9}, {3.789475059149993*^9,
3.789475091862548*^9}, {3.789496565642573*^9, 3.7894965678975134`*^9},
3.789497605565069*^9, {3.7894977925940933`*^9, 3.7894977973164577`*^9}, {
3.7895000340514517`*^9, 3.7895000343346643`*^9}, {3.78950012540824*^9,
3.7895001294174953`*^9}, {3.7895021216475945`*^9, 3.789502151097845*^9},
3.7895022449818726`*^9},ExpressionUUID->"75ff96c5-180f-43a3-9879-\
a389e0d44cc2"],
Cell[BoxData[
RowBox[{"(*",
RowBox[{"Field", " ", "Equations"}], "*)"}]], "Input",ExpressionUUID->\
"23f610d2-4a51-4403-8c30-6b53523b6709"],
Cell[BoxData[
RowBox[{
RowBox[{"(*",
RowBox[{
RowBox[{"Helmholtz1", "[", "index_", "]"}], ":=",
RowBox[{
RowBox[{
SuperscriptBox["k0", "2"],
RowBox[{"\[Epsilon]", "[", "index", "]"}],
RowBox[{"\[Mu]", "[", "index", "]"}]}], "-",
SuperscriptBox["k", "2"], "+",
SuperscriptBox[
RowBox[{"\[Kappa]", "[", "index", "]"}], "2"]}]}], " ",
RowBox[{"(*",
RowBox[{"helmholtz", " ", "equation"}], "*)"}], "*)"}], "\n",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"Hfieldin", "[",
RowBox[{"z_", ",", "index_"}], "]"}], ":=",
RowBox[{"{",
RowBox[{
RowBox[{"Piecewise", "[",
RowBox[{
RowBox[{"{",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"A", "[", "index", "]"}], " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", " ",
RowBox[{"\[Kappa]", "[", "index", "]"}],
RowBox[{"(", "z",
RowBox[{"(*",
RowBox[{"-", "d"}], "*)"}], ")"}]}]],
SuperscriptBox["\[ExponentialE]",
RowBox[{" ",
RowBox[{"\[ImaginaryI]", " ", "k", " ", "y", " ",
RowBox[{"(*",
RowBox[{
RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Omega]", " ", "t"}],
"*)"}]}]}]]}],
RowBox[{"(*",
RowBox[{"E0", "[", "z", "]"}], "*)"}], ",",
RowBox[{"index", "\[Equal]", "3"}]}], "}"}], "}"}], ",",
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{
RowBox[{"A", "[", "index", "]"}], " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", " ",
RowBox[{"\[Kappa]", "[", "index", "]"}], "z"}]]}], "+",
RowBox[{
RowBox[{"B", "[", "index", "]"}], " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-", " ", "\[ImaginaryI]"}], " ",
RowBox[{"\[Kappa]", "[", "index", "]"}], "z"}]]}]}], ")"}],
SuperscriptBox["\[ExponentialE]",
RowBox[{" ",
RowBox[{"\[ImaginaryI]", " ", "k", " ", "y", " ",
RowBox[{"(*",
RowBox[{
RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Omega]", " ", "t"}],
"*)"}]}]}]]}]}], "]"}], ",", "0", ",", "0"}], "}"}]}], " ",
RowBox[{"(*",
RowBox[{"Transverse", " ", "field", " ", "along", " ", "x"}], "*)"}],
"\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{
RowBox[{"Hfieldsc", "[",
RowBox[{"z_", ",", "index_"}], "]"}], ":=",
RowBox[{"{",
RowBox[{
RowBox[{"Piecewise", "[",
RowBox[{
RowBox[{"{",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"A", "[",
RowBox[{"index", "+", "Layers"}], "]"}], " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", " ",
RowBox[{"\[Kappa]", "[",
RowBox[{"index", "+", "Layers"}], "]"}],
RowBox[{"(",
RowBox[{"z", "-", "d"}], ")"}]}]], " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{" ",
RowBox[{"\[ImaginaryI]", " ", "k", " ", "y", " ",
RowBox[{"(*",
RowBox[{
RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Omega]", " ", "t"}],
"*)"}]}]}]]}],
RowBox[{"(*",
RowBox[{"E0", "[", "z", "]"}], "*)"}], ",",
RowBox[{"index", "\[Equal]", "3"}]}], "}"}], "}"}], ",",
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{
RowBox[{"A", "[",
RowBox[{"index", "+", "Layers"}], "]"}], " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", " ",
RowBox[{"\[Kappa]", "[",
RowBox[{"index", "+", "Layers"}], "]"}], "z"}]]}], "+",
RowBox[{
RowBox[{"B", "[",
RowBox[{"index", "+", "Layers"}], "]"}], " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-", " ", "\[ImaginaryI]"}], " ",
RowBox[{"\[Kappa]", "[",
RowBox[{"index", "+", "Layers"}], "]"}], "z"}]]}]}], ")"}],
SuperscriptBox["\[ExponentialE]",
RowBox[{" ",
RowBox[{"\[ImaginaryI]", " ", "k", " ", "y", " ",
RowBox[{"(*",
RowBox[{
RowBox[{"-", "\[ImaginaryI]"}], " ", "\[Omega]", " ", "t"}],
"*)"}]}]}]]}]}], "]"}], ",", "0", ",", "0"}], "}"}]}], " ",
RowBox[{"(*",
RowBox[{"Transverse", " ", "field", " ", "along", " ", "x"}], "*)"}],
"*)"}], "\[IndentingNewLine]", "\n",
RowBox[{"(*",
RowBox[{
"Efields", " ", "corresponding", " ", "to", " ", "it", " ", "in", " ",
"different", " ", "directions"}], "*)"}], "\n",
RowBox[{
RowBox[{
RowBox[{"Efieldin", "[",
RowBox[{"z_", ",", "index_"}], "]"}], "=",
RowBox[{
RowBox[{
FractionBox[
RowBox[{"\[ImaginaryI]", " "}],
RowBox[{"k0", " ",
RowBox[{"\[Epsilon]", "[", "index", "]"}]}]],
RowBox[{"Curl", "[",
RowBox[{
RowBox[{"Hfieldin", "[",
RowBox[{"z", ",", "index"}], "]"}], ",",
RowBox[{"{",
RowBox[{"x", ",", "y", ",", "z"}], "}"}]}], "]"}]}], "/.",
RowBox[{"{",
RowBox[{
RowBox[{"D", "[",
RowBox[{
RowBox[{"E0", "[", "z", "]"}], ",", "z"}], "]"}], "\[RuleDelayed]",
"0"}], "}"}]}]}], ";"}], "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{
RowBox[{
RowBox[{"Efield2", "[",
RowBox[{"z_", ",", "index_"}], "]"}], "=",
RowBox[{
RowBox[{
FractionBox[
RowBox[{"\[ImaginaryI]", " "}],
RowBox[{"k0", " ",
RowBox[{"\[Epsilon]", "[", "index", "]"}]}]],
RowBox[{"Curl", "[",
RowBox[{
RowBox[{"Hfieldsc", "[",
RowBox[{"z", ",", "index"}], "]"}], ",",
RowBox[{"{",
RowBox[{"x", ",", "y", ",", "z"}], "}"}]}], "]"}]}], "/.",
RowBox[{"{",
RowBox[{
RowBox[{"D", "[",
RowBox[{
RowBox[{"E0", "[", "z", "]"}], ",", "z"}], "]"}], "\[RuleDelayed]",
"0"}], "}"}]}]}], ";"}], "*)"}]}]}]], "Input",
CellChangeTimes->{{3.789316324683137*^9, 3.7893164396408606`*^9}, {
3.7893167111623716`*^9, 3.78931673330617*^9}, {3.7893168089191475`*^9,
3.7893168155464582`*^9}, {3.789473905295864*^9, 3.789473905468407*^9}, {
3.7894739354801702`*^9, 3.789473969217964*^9}, 3.789474003763954*^9, {
3.789474142152649*^9, 3.789474184670553*^9}, {3.789474414099507*^9,
3.7894744479460297`*^9}, {3.7894745528511343`*^9, 3.78947459484313*^9}, {
3.7894746784586153`*^9, 3.7894746832418604`*^9}, {3.78947471684503*^9,
3.7894747641236477`*^9}, {3.7894748325753746`*^9,
3.7894748912758603`*^9}, {3.789475110502718*^9, 3.789475120908901*^9}, {
3.7894753921453795`*^9, 3.789475410908225*^9}, {3.7894754923014555`*^9,
3.7894755125243683`*^9}, 3.789483200098431*^9, {3.789483381044786*^9,
3.7894834079927783`*^9}, {3.78948348227551*^9, 3.789483496904377*^9}, {
3.789490456013559*^9, 3.789490457533498*^9}, {3.7894906164822617`*^9,
3.789490624058011*^9}, 3.7894933954269323`*^9, 3.789493493843311*^9, {
3.7894952073175945`*^9, 3.789495223298807*^9}, {3.789496618196401*^9,
3.7894966197322645`*^9}, 3.789497596200101*^9, 3.789497730224839*^9,
3.78949781572149*^9, {3.7894981047613664`*^9, 3.7894981396601453`*^9},
3.7895023743009253`*^9, 3.789762066414955*^9},
Background->RGBColor[
0.94, 0.88, 0.94],ExpressionUUID->"123f0ae6-d7d5-4b5c-a632-8ad1ed7d2091"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"Table", "[",
RowBox[{
RowBox[{
RowBox[{"Hfieldin", "[",
RowBox[{"z", ",", "i"}], "]"}], "/.", "params1"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}],
RowBox[{"(*",
RowBox[{"Magnetic", " ", "Field"}], " ", "*)"}]}]], "Input",
CellChangeTimes->{
3.789316308529315*^9, {3.78947463020763*^9, 3.7894747022111783`*^9},
3.7894782175343313`*^9, 3.7894840802942314`*^9, {3.789488352872427*^9,
3.7894883571460023`*^9}, 3.789490559879568*^9, 3.78949066444641*^9, {
3.789491066520259*^9, 3.7894910932198873`*^9}, {3.7894923318235316`*^9,
3.7894923470392885`*^9}, {3.7897523563391666`*^9,
3.789752367444583*^9}},ExpressionUUID->"e1bd07e3-1bde-48ff-ab9b-\
46f16140e6aa"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", " ", "k", " ", "y"}]], " ",
RowBox[{"(",
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", " ", "z", " ",
RowBox[{"\[Kappa]", "[", "1", "]"}]}]], "+",
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-", "\[ImaginaryI]"}], " ", "z", " ",
RowBox[{"\[Kappa]", "[", "1", "]"}]}]], " ", "r"}]}], ")"}]}], ",",
"0", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", " ", "k", " ", "y"}]], " ",
RowBox[{"(",
RowBox[{
RowBox[{"B2", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-", "\[ImaginaryI]"}], " ", "z", " ",
RowBox[{"\[Kappa]", "[", "2", "]"}]}]]}], "+",
RowBox[{"A2", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", " ", "z", " ",
RowBox[{"\[Kappa]", "[", "2", "]"}]}]]}]}], ")"}]}], ",", "0", ",",
"0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"\[ImaginaryI]", " ", "k", " ", "y"}], "+",
RowBox[{"\[ImaginaryI]", " ", "z", " ",
RowBox[{"\[Kappa]", "[", "3", "]"}]}]}]], " ", "t"}], ",", "0", ",",
"0"}], "}"}]}], "}"}]], "Output",
CellChangeTimes->{
3.789488360713465*^9, 3.7894904597405963`*^9, 3.7894905261091847`*^9,
3.789490567518201*^9, 3.7894906256378145`*^9, {3.7894906650916824`*^9,
3.7894906712272935`*^9}, {3.789491067197447*^9, 3.789491093908046*^9},
3.789492234022359*^9, {3.7894923475110273`*^9, 3.7894923523401184`*^9},
3.7894931708079853`*^9, {3.789493377952643*^9, 3.7894933974016533`*^9},
3.7894934957850924`*^9, 3.789493912558457*^9, {3.7894941025779085`*^9,
3.789494127097366*^9}, {3.7894941954475584`*^9, 3.789494218985639*^9}, {
3.7894942748867874`*^9, 3.7894942996203413`*^9}, {3.789494406945842*^9,
3.789494475525526*^9}, {3.789494518823987*^9, 3.78949461012097*^9}, {
3.789494677381753*^9, 3.7894947123353176`*^9}, {3.7894952094947734`*^9,
3.7894952251987276`*^9}, 3.7894952702233715`*^9, 3.7894965788721795`*^9, {
3.789496621113601*^9, 3.789496649088791*^9}, {3.78949677789839*^9,
3.7894968165342703`*^9}, 3.789496873036541*^9, 3.7894969699192767`*^9,
3.78949715307859*^9, {3.78949718706976*^9, 3.7894972076060343`*^9}, {
3.7894972522257977`*^9, 3.7894972821208878`*^9}, 3.789497430300616*^9, {
3.789497621020746*^9, 3.789497656642521*^9}, 3.7894977323341613`*^9, {
3.7894978015453844`*^9, 3.7894978279906607`*^9}, {3.7894978879667387`*^9,
3.7894979230778823`*^9}, 3.7894980603325653`*^9, {3.789498106815872*^9,
3.7894981304227705`*^9}, 3.789498183752267*^9, 3.7894983001253448`*^9,
3.78949835932574*^9, 3.789498408026559*^9, 3.7894984545641603`*^9,
3.7894985140852227`*^9, 3.7894985545610237`*^9, {3.789498624256398*^9,
3.789498636445792*^9}, 3.7894987076045256`*^9, {3.789498817207038*^9,
3.789498879282132*^9}, {3.7894989156449337`*^9, 3.789498948764581*^9},
3.7894995953607397`*^9, 3.78949965126932*^9, {3.7895000369776344`*^9,
3.7895000616556315`*^9}, {3.789500131545806*^9, 3.789500150228033*^9},
3.789500246696196*^9, 3.789500416279415*^9, 3.7895004705752716`*^9,
3.7895005639390793`*^9, 3.7895006858585405`*^9, 3.7895008010462737`*^9, {
3.789500843372587*^9, 3.7895008552298627`*^9}, {3.7895008964527454`*^9,
3.789500905862913*^9}, 3.789500989543068*^9, 3.789501075238487*^9,
3.789501386058829*^9, 3.789501542983795*^9, 3.7895015867324467`*^9,
3.7895016918082495`*^9, 3.7895019760674076`*^9, 3.7895020813728585`*^9, {
3.789502136670409*^9, 3.789502163246465*^9}, 3.789502253746525*^9,
3.7895023344036784`*^9, 3.789502385815629*^9, {3.7895024380700164`*^9,
3.7895024526131563`*^9}, {3.789502498253236*^9, 3.789502505570142*^9},
3.7895025518920374`*^9, 3.7895654576131887`*^9, 3.7895655819442315`*^9,
3.789565619505924*^9, 3.789565695116064*^9, 3.7895657643529825`*^9,
3.789565795057479*^9, 3.789566295432308*^9, {3.789566332080347*^9,
3.7895663545622835`*^9}, 3.7895664399634*^9, {3.789566885838128*^9,
3.7895669052661653`*^9}, 3.7895670272006383`*^9, 3.7895670724985785`*^9,
3.78956715647561*^9, 3.7895675342292547`*^9, {3.78956774482658*^9,
3.7895677906411443`*^9}, 3.789569078408301*^9, {3.789569108953679*^9,
3.7895691150857935`*^9}, {3.789569328627332*^9, 3.7895693470341434`*^9},
3.789569408315138*^9, 3.789569516437316*^9, 3.789569667752451*^9,
3.789569749160412*^9, 3.789570093444068*^9, 3.7895702135744505`*^9, {
3.789570382764121*^9, 3.7895704563316135`*^9}, 3.7895705060234995`*^9,
3.789570586190281*^9, 3.789570780910051*^9, 3.7895709155041018`*^9,
3.789570952655896*^9, 3.7895710234706*^9, 3.789571093312028*^9,
3.789571628060092*^9, 3.7895718445700536`*^9, 3.7895719489526973`*^9,
3.789572040740741*^9, 3.789572080357512*^9, 3.789572221236015*^9, {
3.7895722597251234`*^9, 3.7895722737811656`*^9}, {3.789572307653623*^9,
3.7895723549122934`*^9}, 3.7895723976468925`*^9, {3.7895724484075775`*^9,
3.7895724951866055`*^9}, 3.789573975274982*^9, {3.789585224028466*^9,
3.7895852583619027`*^9}, 3.789585538993539*^9, {3.7895856370529547`*^9,
3.789585652969407*^9}, 3.789585693652977*^9, 3.789585727224236*^9, {
3.7895862847350755`*^9, 3.7895863016478376`*^9}, {3.7895863415374284`*^9,
3.7895863657397327`*^9}, 3.7895864005057983`*^9, {3.7895864587921047`*^9,
3.78958648769983*^9}, 3.7895865325100574`*^9, 3.7895878579524508`*^9,
3.789587977084767*^9, 3.7895880220297575`*^9, 3.7895882783547883`*^9,
3.7895889097724705`*^9, 3.789659149357912*^9, 3.7896749861018167`*^9,
3.789676125892082*^9, {3.789676272057517*^9, 3.7896763007071075`*^9},
3.7896769293859205`*^9, 3.789677569812619*^9, {3.789677755529145*^9,
3.7896777826418467`*^9}, 3.7896781441844296`*^9, 3.789678435272921*^9,
3.78967852936489*^9, {3.7896786865679493`*^9, 3.789678714571763*^9},
3.7896787617759504`*^9, 3.789678824183297*^9, 3.7896789901754904`*^9,
3.789679659376248*^9, 3.789679753610031*^9, {3.789679936295626*^9,
3.789679984282797*^9}, 3.7896800355916877`*^9, 3.789680312841651*^9,
3.7896803881530066`*^9, 3.7896804195723906`*^9, 3.789680457875221*^9, {
3.7896806635054007`*^9, 3.789680699590537*^9}, 3.7896812445576353`*^9,
3.7896813189813504`*^9, 3.789681449482515*^9, {3.789681541184162*^9,
3.7896815732518406`*^9}, 3.789681813193755*^9, 3.7896818774547057`*^9,
3.7896819455586977`*^9, 3.7896820138008285`*^9, 3.7897500910368457`*^9,
3.7897501372196875`*^9, 3.7897502254528294`*^9, {3.7897502624220066`*^9,
3.7897502845987263`*^9}, {3.789751988521542*^9, 3.789752004544899*^9},
3.789753977398731*^9, {3.7897568022055035`*^9, 3.7897568941982117`*^9}, {
3.7897612245657144`*^9, 3.7897612544119773`*^9}, 3.789761293886591*^9,
3.7897620688375216`*^9, {3.7897622576832705`*^9, 3.789762277847756*^9},
3.7897637918166323`*^9, 3.7897638449297404`*^9, 3.789763885241282*^9, {
3.7897640008778405`*^9, 3.789764028776408*^9}, 3.789764065115885*^9,
3.789764095304412*^9, 3.789764265177676*^9, 3.7897643414048758`*^9, {
3.789764373896857*^9, 3.789764399165592*^9}, {3.78976450716617*^9,
3.7897645303768435`*^9}, 3.789764567802086*^9, 3.789766030264181*^9, {
3.789766324209959*^9,
3.789766345238963*^9}},ExpressionUUID->"9d20f56d-8d0e-42ca-be6d-\
87bdee79a086"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"Table", "[",
RowBox[{
RowBox[{
RowBox[{"Efieldin", "[",
RowBox[{"z", ",", "i"}], "]"}], "/.", "params1"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}],
RowBox[{"(*",
RowBox[{"Electric", " ", "Field"}], "*)"}], "//", "Simplify"}]], "Input",
CellChangeTimes->{{3.789483215213212*^9, 3.789483275217908*^9},
3.789483482281466*^9, 3.7894840822799273`*^9, 3.7894883537091885`*^9,
3.7894905611581497`*^9, {3.7894924026975102`*^9, 3.789492422712248*^9}, {
3.789752372980783*^9, 3.789752379905305*^9}, {3.789762247819745*^9,
3.789762270521925*^9}},ExpressionUUID->"599aae47-3807-4290-b504-\
3da1d9f22c2d"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"0", ",",
RowBox[{"-",
FractionBox[
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{"\[ImaginaryI]", " ",
RowBox[{"(",
RowBox[{
RowBox[{"k", " ", "y"}], "-",
RowBox[{"z", " ",
RowBox[{"\[Kappa]", "[", "1", "]"}]}]}], ")"}]}]], " ",
RowBox[{"(",
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{"2", " ", "\[ImaginaryI]", " ", "z", " ",
RowBox[{"\[Kappa]", "[", "1", "]"}]}]], "-", "r"}], ")"}], " ",