Repository navigation
Expand file tree
/
Copy pathneuron_dbs_template.mx3
More file actions
93 lines (75 loc) · 3.21 KB
/
Copy pathneuron_dbs_template.mx3
File metadata and controls
93 lines (75 loc) · 3.21 KB
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
SetCellSize(20e-9, 5e-9, 50e-9)
SetGridSize(620, 242, 1)
B_ext = Vector(0, 0, 300e-3)
Msat = 0
Aex = 0
alpha = 0
yig := 1
excitation_region := 2
dampener_min_region := 10
dampener_max_region := 49
Msat.SetRegion(yig, 140e3)
Aex.SetRegion(yig, 3.5e-12)
alpha.SetRegion(yig, 2e-4)
input_waveguide := Cuboid(5e-6, 100e-9, 50e-9).Transl(-3.7e-6, 555e-9, 0)
// ring_ext := Cylinder(1e-6, 50e-9)
// ring_int := Cylinder(700e-9, 50e-9)
// ring := ring_ext.Sub(ring_int).Transl(-3.7e-6, 0, 0)
design_region := Cuboid(1e-6, 1e-6, 50e-9).Transl(-3.7e-6, 0, 0)
output_waveguide := Cuboid(12.4e-6, 100e-9, 50e-9).Transl(0, -555e-9, 0)
coupler := Cuboid(7.32e-6, 100e-9, 50e-9).Transl(1.04e-6, -415e-9, 0)
neuron := design_region.add(input_waveguide).add(output_waveguide).add(coupler)
SetGeom(neuron)
DefRegion(yig, neuron)
alpha_max := 0.5
damping_slice_width := 20e-9
damping_region_width := (dampener_max_region - dampener_min_region + 1) * damping_slice_width
for i := dampener_min_region; i <= dampener_max_region; i++ {
offset := (i - dampener_min_region)
input_waveguide_right_lb := -1.2e-6 - damping_region_width + offset * damping_slice_width
input_waveguide_right_rb := input_waveguide_right_lb + damping_slice_width
output_waveguide_right_lb := 6.2e-6 - damping_region_width + offset * damping_slice_width
output_waveguide_right_rb := output_waveguide_right_lb + damping_slice_width
coupler_right_lb := 4.7e-6 - damping_region_width + offset * damping_slice_width
coupler_right_rb := coupler_right_lb + damping_slice_width
right_dampener_region := xrange(input_waveguide_right_lb, input_waveguide_right_rb).
intersect(input_waveguide).
add(xrange(output_waveguide_right_lb, output_waveguide_right_rb).
intersect(output_waveguide)).
add(xrange(coupler_right_lb, coupler_right_rb).
intersect(coupler))
left_rb := -6.2e-6 + damping_region_width - offset * damping_slice_width
left_lb := left_rb - damping_slice_width
coupler_left_rb := -2.62e-6 + damping_region_width - offset * damping_slice_width
coupler_left_lb := coupler_left_rb - damping_slice_width
left_dampener_region := xrange(left_lb, left_rb).
intersect(input_waveguide).
add(xrange(left_lb, left_rb).
intersect(output_waveguide)).
add(xrange(coupler_left_lb, coupler_left_rb).
intersect(coupler))
dampener_region := right_dampener_region.add(left_dampener_region)
DefRegion(i, dampener_region)
alpha.SetRegion(i, alpha_max * (1 - exp(-5.0 * (i - dampener_min_region) / (dampener_max_region - dampener_min_region))))
Msat.SetRegion(i, 140e3)
Aex.SetRegion(i, 3.5e-12)
}
// {{ INSERT CELL CODE HERE }}
Relax()
print(m)
DefRegion(excitation_region, xrange(-2.06e-6, -2e-6).intersect(input_waveguide))
alpha.SetRegion(excitation_region, 2e-4)
Msat.SetRegion(excitation_region, 140e3)
Aex.SetRegion(excitation_region, 3.5e-12)
B_ext.SetRegion(excitation_region, Vector(45e-3 * sin(2 * pi * 6.7e9 * (t - 3e-9)), 0, 300e-3))
// B_ext.SetRegion(excitation_region, Vector(10e-3 * sinc(2*pi*10e9*(t-1e-10)), 0, 0))
Snapshot(Msat)
Snapshot(Aex)
Snapshot(alpha)
Snapshot(geom)
Snapshot(regions)
Save(m)
AutoSave(m, 50e-12)
Save(m_full)
AutoSave(m_full, 50e-12)
Run(160e-9)