Skip to content

Commit 9fadf4f

Browse files
committed
update
1 parent d065c23 commit 9fadf4f

12 files changed

Lines changed: 60 additions & 453 deletions

File tree

Makefile

Lines changed: 0 additions & 258 deletions
This file was deleted.

Perso/ABAB.py

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from SuPyMode.Geometry import Geometry, Fused4, Circle
1+
from SuPyMode.Geometry import Geometry, Fused3, Circle
22
from SuPyMode.Solver import SuPySolver
33
from SuPyMode.fibers import *
44
from PyOptik import ExpData
@@ -7,49 +7,46 @@
77

88
FiberA = Fiber_DCF1300S_20(Wavelength=1.55)
99
FiberB = Fiber_DCF1300S_33(Wavelength=1.55)
10+
FiberC = Fiber_New(Wavelength=1.55)
1011

11-
nMode = 6
12-
Xbound = [-150, 0]
13-
Ybound = [-150, 0]
14-
Nx = 100
15-
Ny = 100
12+
Xbound = [-130, 130]
13+
Ybound = [-130, 130]
14+
Nx = 130
15+
Ny = 130
1616

1717
Index = ExpData('FusedSilica').GetRI(1.55e-6)
1818

19-
Clad = Fused4(Radius = 62.5, Fusion = 0.95, Index = Index)
19+
Clad = Fused3(Radius = 62.5, Fusion = 0.95, Index = Index)
2020

2121

2222
Core0 = FiberA.Get(Clad.C[0])
2323
Core1 = FiberB.Get(Clad.C[1])
24-
Core2 = FiberA.Get(Clad.C[2])
25-
Core3 = FiberB.Get(Clad.C[3])
24+
Core2 = FiberC.Get(Clad.C[2])
25+
2626

2727
Geo = Geometry(Clad = Clad,
28-
Objects = [*Core0, *Core1, *Core2, *Core3],
28+
Objects = [*Core0, *Core1, *Core2],
2929
Xbound = Xbound,
3030
Ybound = Ybound,
3131
Nx = Nx,
3232
Ny = Ny)
3333

34-
#Geo.Rotate(45)
34+
Geo.Rotate(45)
35+
36+
Geo.Plot()
37+
3538

36-
#Geo.Plot()
39+
Sol = SuPySolver(Coupler=Geo, Tolerance=1e-8, MaxIter = 10000)
40+
Sol.CreateSuperSet(Wavelength=1.55, NStep=300, ITRi=1, ITRf=0.05)
3741

42+
Sol.AddModes(Sorting = 'Field',
43+
Symmetries = {'Right': 0, 'Left': 0, 'Top': 0, 'Bottom': 0},
44+
nMode = 8,
45+
sMode = 4 )
3846

3947

40-
Sol = SuPySolver(Coupler=Geo, Tolerance=1e-8, MaxIter = 10000, nMode=8, sMode=5)
48+
Set = Sol.GetSet()
4149

42-
SuperSet = Sol.GetModes(wavelength = 1.55,
43-
Nstep = 300,
44-
ITRi = 1,
45-
ITRf = 0.05,
46-
Sorting = 'Index',
47-
RightSymmetry = 1,
48-
LeftSymmetry = 0,
49-
TopSymmetry = -1,
50-
BottomSymmetry = 0
51-
)
50+
Set.PlotAdiabatic()
5251

53-
#SuperSet.PlotFields(iter=-1)
54-
#SuperSet.Plot(Input=['Index', 'Adiabatic'], iter=[-1])
55-
SuperSet.ExportPDF(Directory='ABAB_xS_yA', iter=[0, 200, 290])
52+
# SuperSet.ExportPDF(Directory='ABAB_xS_yA', iter=[0, 200, 290])

SuPyMode/Geometry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def Plot(self):
258258

259259
self.CreateMesh()
260260

261-
Fig = Scene('SuPyMode Figure', UnitSize=(4,4))
261+
Fig = Scene('SuPyMode Figure', UnitSize=(6,6))
262262
Colorbar = ColorBar(Discreet=True, Position='right')
263263

264264
ax = Axis(Row = 0,
@@ -322,7 +322,7 @@ class BaseFused():
322322
Index: float
323323
debug: bool
324324
Gradient: object = None
325-
325+
326326
def __post_init__(self):
327327
self.hole = None
328328
self.N = len(self.Angle)

0 commit comments

Comments
 (0)