├── .gitignore ├── LICENSE ├── MANIFEST.in ├── README.md ├── _config.yml ├── docs ├── Makefile ├── rtfd-requirements.txt └── source │ ├── api.rst │ ├── conf.py │ ├── images │ └── slabs.svg │ ├── index.rst │ └── intro.rst ├── examples ├── dc-gap-sweep.py ├── dc-sweep-soi-3db-index-profile-200nm-gap.png ├── dc-sweep-soi-3db.png ├── example1.py ├── example2.py ├── gc-sweep-soi.png ├── gc-sweep-soi.py ├── modes_full_vec_ex2 │ ├── material_index │ │ ├── material_index_xx.png │ │ ├── material_index_xy.png │ │ ├── material_index_yx.png │ │ ├── material_index_yy.png │ │ └── material_index_zz.png │ ├── mode_0 │ │ ├── mode_Ex_0.png │ │ ├── mode_Ey_0.png │ │ ├── mode_Ez_0.png │ │ ├── mode_Hx_0.png │ │ ├── mode_Hy_0.png │ │ └── mode_Hz_0.png │ ├── mode_1 │ │ ├── mode_Ex_1.png │ │ ├── mode_Ey_1.png │ │ ├── mode_Ez_1.png │ │ ├── mode_Hx_1.png │ │ ├── mode_Hy_1.png │ │ └── mode_Hz_1.png │ ├── mode_2 │ │ ├── mode_Ex_2.png │ │ ├── mode_Ey_2.png │ │ ├── mode_Ez_2.png │ │ ├── mode_Hx_2.png │ │ ├── mode_Hy_2.png │ │ └── mode_Hz_2.png │ ├── mode_3 │ │ ├── mode_Ex_3.png │ │ ├── mode_Ey_3.png │ │ ├── mode_Ez_3.png │ │ ├── mode_Hx_3.png │ │ ├── mode_Hy_3.png │ │ └── mode_Hz_3.png │ ├── mode_4 │ │ ├── mode_Ex_4.png │ │ ├── mode_Ey_4.png │ │ ├── mode_Ez_4.png │ │ ├── mode_Hx_4.png │ │ ├── mode_Hy_4.png │ │ └── mode_Hz_4.png │ ├── mode_5 │ │ ├── mode_Ex_5.png │ │ ├── mode_Ey_5.png │ │ ├── mode_Ez_5.png │ │ ├── mode_Hx_5.png │ │ ├── mode_Hy_5.png │ │ └── mode_Hz_5.png │ ├── mode_6 │ │ ├── mode_Ex_6.png │ │ ├── mode_Ey_6.png │ │ ├── mode_Ez_6.png │ │ ├── mode_Hx_6.png │ │ ├── mode_Hy_6.png │ │ └── mode_Hz_6.png │ ├── mode_7 │ │ ├── mode_Ex_7.png │ │ ├── mode_Ey_7.png │ │ ├── mode_Ez_7.png │ │ ├── mode_Hx_7.png │ │ ├── mode_Hy_7.png │ │ └── mode_Hz_7.png │ ├── mode_info │ └── wavelength_n_effs.png ├── modes_semi_vec_ex1 │ ├── example_modes_1_Ey_0.png │ ├── example_modes_1_Ey_1.png │ └── example_structure_1.png ├── width-sweep-soi.py └── width-sweep │ ├── width-sweep-end-n-profile.png │ ├── width-sweep-soi.png │ └── width-sweep-start-n-profile.png ├── modesolverpy ├── __init__.py ├── _analyse.py ├── _mode_solver_lib.py ├── coupling_efficiency.py ├── design.py ├── fractions.gpi ├── mode.gpi ├── mode_solver.py ├── n_effs.gpi ├── structure.gpi ├── structure.py └── structure_base.py ├── setup.cfg └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | Pipfile.lock 2 | .idea/ 3 | notebooks/ 4 | scripts/maketags 5 | 6 | examples/example_structure_1.png 7 | examples/modes_semi_vec/ 8 | 9 | *.cprof 10 | *.ipynb 11 | .ipynb_checkpoints/ 12 | 13 | # Sphinx documentation 14 | doc/_build/ 15 | doc/tutorial_ipkiss/_build/ 16 | doc/tutorial_psi/_build/ 17 | doc/tutorial_picazzo/_build/ 18 | tutorial/notebooks/.ipynb_checkpoints/ 19 | tutorial/notebooks/lumerical/3_crossing_optimization/.ipynb_checkpoints/ 20 | 21 | Icon? 22 | *.prf 23 | *.h5 24 | *.log 25 | *.DS_Store 26 | *.lyrdb 27 | *.7z 28 | *.mpg 29 | *.txt 30 | *.pdf 31 | *.fsp 32 | *.lms 33 | *.icp 34 | *.ldf 35 | *.bak 36 | *.dat 37 | *.mat 38 | 39 | *.xml 40 | *.tar.gz 41 | *.gds 42 | *.json 43 | *.zip 44 | *.rdb 45 | *.sty 46 | *.blg 47 | *.aux 48 | *.bbl 49 | *.bib 50 | *.bst 51 | *.ppt 52 | *.gif 53 | *.pptx 54 | *.js 55 | *.prj 56 | *.swp 57 | *.lms 58 | *.wpr 59 | *.wpu 60 | .pytest_cache 61 | 62 | # Fab-specific 63 | *.gds 64 | *.gds2 65 | 66 | # Random stuff 67 | .noseids 68 | .tags 69 | 70 | # Byte-compiled / optimized / DLL files 71 | __pycache__/ 72 | *.py[cod] 73 | 74 | # C extensions 75 | *.so 76 | 77 | # Distribution / packaging 78 | .Python 79 | env/ 80 | build/ 81 | develop-eggs/ 82 | dist/ 83 | downloads/ 84 | eggs/ 85 | lib/ 86 | lib64/ 87 | parts/ 88 | sdist/ 89 | var/ 90 | *.egg-info/ 91 | .installed.cfg 92 | *.egg 93 | 94 | # PyInstaller 95 | # Usually these files are written by a python script from a template 96 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 97 | *.manifest 98 | *.spec 99 | 100 | # Installer logs 101 | pip-log.txt 102 | pip-delete-this-directory.txt 103 | 104 | # Unit test / coverage reports 105 | htmlcov/ 106 | .tox/ 107 | .coverage 108 | .cache 109 | nosetests.xml 110 | coverage.xml 111 | 112 | # Translations 113 | *.mo 114 | *.pot 115 | 116 | # Django stuff: 117 | *.log 118 | 119 | 120 | # PyBuilder 121 | target/ 122 | 123 | # PYC 124 | *.pyc 125 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 jtambasco 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include modesolverpy/*.gpi 2 | include examples/* 3 | include README.md 4 | include LICENSE 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # modesolverpy 2 | Photonic mode solver with a nice interface and output. 3 | * semi-vectorial and fully vectorial options, 4 | * simple structure drawing, 5 | * automated data saving and plotting via Gnuplot, 6 | * some limited (at this stage) data processing (finding MFD of fundamental mode), and 7 | * easily extensible library 8 | 9 | The documentation for this project can be found [here](http://modesolverpy.rtfd.io). 10 | 11 | ## Examples 12 | * [Ex1: Semi-vectorial mode solving of a ridge waveguide](#example-1-semi-vectorial-mode-solving-of-a-ridge-waveguide) 13 | * [Ex2: Fully vectorial mode solving of an anisotropic material waveguide](#example-2-fully-vectorial-mode-solving-of-anisotropic-material) 14 | * [Ex3: Grating-coupler period](#example-3-grating-coupler-period) 15 | * [Ex4: Mode Hybridisation In SOI](#example-4-mode-hybridisation-in-soi) 16 | * [Ex6: Directional Coupler 3dB Length In SOI](#example-5-directional-coupler-3db-length-in-soi) 17 | 18 | ## Example 1: Semi-vectorial mode solving of a ridge waveguide 19 | The following example finds the first two modes of a waveguide with the following, arbitrary, parameters: 20 | 21 | * thin-film thickness: 500nm 22 | * waveguide height: 400nm, 23 | * waveguide width: 500nm, 24 | * refractive index of waveguide: 3, 25 | * refractive index of substrate: 1.4, 26 | * refractive index of cladding: 1, and 27 | * wavelength: 1550nm. 28 | 29 | #### Python script 30 | ```python 31 | import modesolverpy.mode_solver as ms 32 | import modesolverpy.structure as st 33 | import numpy as np 34 | 35 | # All units are relative. [um] were chosen in this case. 36 | x_step = 0.02 37 | y_step = 0.02 38 | wg_height = 0.4 39 | wg_width = 0.5 40 | sub_height = 0.5 41 | sub_width = 2. 42 | clad_height = 0.5 43 | n_sub = 1.4 44 | n_wg = 3. 45 | n_clad = 1. 46 | film_thickness = 0.5 47 | wavelength = 1.55 48 | angle = 75. 49 | 50 | structure = st.RidgeWaveguide(wavelength, 51 | x_step, 52 | y_step, 53 | wg_height, 54 | wg_width, 55 | sub_height, 56 | sub_width, 57 | clad_height, 58 | n_sub, 59 | n_wg, 60 | angle, 61 | n_clad, 62 | film_thickness) 63 | 64 | structure.write_to_file('example_structure_1.dat') 65 | 66 | mode_solver = ms.ModeSolverSemiVectorial(2, semi_vectorial_method='Ey') 67 | mode_solver.solve(structure) 68 | mode_solver.write_modes_to_file('example_modes_1.dat') 69 | ``` 70 | 71 | #### Structure 72 | 73 | 74 | ### Modes 75 | 76 | 77 | ## Example 2: Fully vectorial mode solving of an anisotropic material waveguide 78 | The following looks at a contrived ridge waveguide in Z-cut KTP. 79 | 80 | The simulation outputs: 81 | * 5 plots for each refractive index axis (n_xx, n_xy, n_yx, n_yy and n_zz), 82 | * 48 plots for Ex, Ey, Ez, Hx, Hy and Hz, 83 | * 8 effective index values, one for each mode, 84 | * a wavelength sweep of the waveguide (plotting n_eff vs wavelength for each mode), 85 | * whether a mode is qTE or qTM and the percentage overlap with TE and TM, and 86 | * the group velocity of the mode. 87 | 88 | The waveguide parameters are: 89 | * thin-film thickness: 1.2um, 90 | * waveguide height: 800nm, 91 | * waveguide width: 1.2um, 92 | * refractive index of waveguide: used Sellmeier equations to get n_xx, n_yy, n_zz at 1550nm, 93 | * refractive index of substrate: used Sellmeier equation to get SiO2 at 1550nm, 94 | * refractive index of cladding: 1, and 95 | * wavelength: 1550nm. 96 | 97 | ### Python script 98 | ```python 99 | import modesolverpy.mode_solver as ms 100 | import modesolverpy.structure as st 101 | import opticalmaterialspy as mat 102 | import numpy as np 103 | 104 | wl = 1.55 105 | x_step = 0.06 106 | y_step = 0.06 107 | wg_height = 0.8 108 | wg_width = 1.8 109 | sub_height = 1.0 110 | sub_width = 4. 111 | clad_height = 1.0 112 | film_thickness = 1.2 113 | angle = 60. 114 | 115 | def struct_func(n_sub, n_wg, n_clad): 116 | return st.RidgeWaveguide(wl, x_step, y_step, wg_height, wg_width, 117 | sub_height, sub_width, clad_height, 118 | n_sub, n_wg, angle, n_clad, film_thickness) 119 | 120 | n_sub = mat.SiO2().n(wl) 121 | n_wg_xx = mat.Ktp('x').n(wl) 122 | n_wg_yy = mat.Ktp('y').n(wl) 123 | n_wg_zz = mat.Ktp('z').n(wl) 124 | n_clad = mat.Air().n() 125 | 126 | struct_xx = struct_func(n_sub, n_wg_xx, n_clad) 127 | struct_yy = struct_func(n_sub, n_wg_yy, n_clad) 128 | struct_zz = struct_func(n_sub, n_wg_zz, n_clad) 129 | 130 | struct_ani = st.StructureAni(struct_xx, struct_yy, struct_zz) 131 | struct_ani.write_to_file() 132 | 133 | solver = ms.ModeSolverFullyVectorial(8) 134 | solver.solve(struct_ani) 135 | solver.write_modes_to_file() 136 | 137 | solver.solve_ng(struct_ani, 1.55, 0.01) 138 | 139 | solver.solve_sweep_wavelength(struct_ani, np.linspace(1.501, 1.60, 21)) 140 | ``` 141 | 142 | ### Group Velocity 143 | The group velocity at 1550nm for each mode is: 144 | ``` 145 | # modes_full_vec/ng.dat 146 | # Mode idx, Group index 147 | 0,1.776 148 | 1,1.799 149 | 2,1.826 150 | 3,1.847 151 | 4,1.841 152 | 5,1.882 153 | 6,1.872 154 | 7,1.871 155 | ``` 156 | 157 | ### Structure 158 | 159 | 160 | 161 | ### Modes 162 | Only the first 4 (out of 8) modes are shown, and only the E-fields are shown (not H-fields). For the rest of the images, look in the example folder or run the script. 163 | 164 | A_{x,y,z} give the percentage power of that particular E-field component with respect to the total of all components. 165 | 166 | Mode types: 167 | ``` 168 | # modes_full_vec/mode_info 169 | # Mode idx, Mode type, % in major direction, n_eff 170 | 0,qTE,97.39,1.643 171 | 1,qTM,92.54,1.640 172 | 2,qTE,90.60,1.576 173 | 3,qTM,91.41,1.571 174 | 4,qTE,89.48,1.497 175 | 5,qTM,86.70,1.475 176 | 6,qTE,89.47,1.447 177 | 7,qTM,68.35,1.437 178 | ``` 179 | 180 | 181 | 182 | 183 | 184 | ### Wavelength Sweep 185 | 186 | 187 | ## Example 3: Grating-coupler period 188 | Analytic calculation of the grating coupler period for various duty-cycles in SOI. 189 | 190 | Seems to match well with the periods in [Taillaert et al., _Grating Couplers for 191 | Coupling between Optical Fibers and Nanophotonic Waveguides_, IOP Science, 2006](http://iopscience.iop.org/article/10.1143/JJAP.45.6071/meta). 192 | 193 | ```python 194 | import modesolverpy.mode_solver as ms 195 | import modesolverpy.structure as st 196 | import modesolverpy.design as de 197 | import opticalmaterialspy as mat 198 | import numpy as np 199 | 200 | wls = [1.5, 1.55, 1.6] 201 | x_step = 0.05 202 | y_step = 0.05 203 | etch_depth = 0.07 204 | wg_width = 10 205 | sub_height = 0.5 206 | sub_width = 14. 207 | clad_height = 0.5 208 | film_thickness = 0.22 209 | polarisation = 'TE' 210 | dcs = np.linspace(20, 80, 61) / 100 211 | 212 | ed1 = etch_depth 213 | ft1 = film_thickness 214 | ed2 = ft1 - ed1 215 | ft2 = ed2 216 | 217 | periods = [] 218 | periods.append(dcs) 219 | 220 | for wl in wls: 221 | ngc = [] 222 | for ed, ft in [(ed1, ft1), (ed2, ft2)]: 223 | def struct_func(n_sub, n_wg, n_clad): 224 | return st.RidgeWaveguide(wl, x_step, y_step, ed, wg_width, 225 | sub_height, sub_width, clad_height, 226 | n_sub, n_wg, None, n_clad, ft) 227 | 228 | n_sub = mat.SiO2().n(wl) 229 | n_wg_xx = 3.46 230 | n_wg_yy = 3.46 231 | n_wg_zz = 3.46 232 | n_clad = mat.Air().n() 233 | 234 | struct_xx = struct_func(n_sub, n_wg_xx, n_clad) 235 | struct_yy = struct_func(n_sub, n_wg_yy, n_clad) 236 | struct_zz = struct_func(n_sub, n_wg_zz, n_clad) 237 | 238 | struct_ani = st.StructureAni(struct_xx, struct_yy, struct_zz) 239 | #struct_ani.write_to_file() 240 | 241 | solver = ms.ModeSolverFullyVectorial(4) 242 | solver.solve(struct_ani) 243 | #solver.write_modes_to_file() 244 | 245 | if polarisation == 'TE': 246 | ngc.append(np.round(np.real(solver.n_effs_te), 4)[0]) 247 | elif polarisation == 'TM': 248 | ngc.append(np.round(np.real(solver.n_effs_tm), 4)[0]) 249 | 250 | period = de.grating_coupler_period(wl, dcs*ngc[0]+(1-dcs)*ngc[1], n_clad, 8, 1) 251 | periods.append(period) 252 | 253 | filename = 'dc-sweep-%s-%inm-etch-%i-film.dat' % (polarisation, etch_depth*1000, film_thickness*1000) 254 | np.savetxt(filename, np.array(periods).T, delimiter=',', header=','.join([str(val) for val in wls])) 255 | print(np.c_[periods]) 256 | ``` 257 | 258 | 259 | 260 | ## Example 4: Mode Hybridisation In SOI 261 | Simulation of mode hybridisation in 220nm thick fully-etched SOI ridge 262 | waveguides. 263 | 264 | Results look the same as those found in [Daoxin Dai and Ming Zhang, "Mode hybridization and conversion in silicon-on-insulator nanowires with angled sidewalls," Opt. Express 23, 32452-32464 (2015)](https://www.osapublishing.org/oe/abstract.cfm?uri=oe-23-25-32452). 265 | 266 | ```python 267 | import modesolverpy.mode_solver as ms 268 | import modesolverpy.structure as st 269 | import opticalmaterialspy as mat 270 | import numpy as np 271 | 272 | wl = 1.55 273 | x_step = 0.02 274 | y_step = 0.02 275 | etch_depth = 0.22 276 | wg_widths = np.arange(0.3, 2., 0.05) 277 | sub_height = 1. 278 | sub_width = 4. 279 | clad_height = 1. 280 | film_thickness = 0.22 281 | 282 | n_sub = mat.SiO2().n(wl) 283 | n_clad = mat.Air().n(wl) 284 | n_wg = mat.RefractiveIndexWeb( 285 | 'https://refractiveindex.info/?shelf=main&book=Si&page=Li-293K').n(wl) 286 | 287 | r = [] 288 | for w in wg_widths: 289 | r.append( 290 | st.RidgeWaveguide(wl, x_step, y_step, etch_depth, w, sub_height, 291 | sub_width, clad_height, n_sub, n_wg, None, n_clad, 292 | film_thickness)) 293 | 294 | r[0].write_to_file('start_n_profile.dat') 295 | r[-1].write_to_file('end_n_profile.dat') 296 | 297 | solver = ms.ModeSolverFullyVectorial(6) 298 | solver.solve_sweep_structure(r, wg_widths, x_label='Taper width', fraction_mode_list=[1,2]) 299 | solver.write_modes_to_file() 300 | ``` 301 | 302 | 303 | 304 | 305 | ## Example 5: Directional Coupler 3dB Length In SOI 306 | Analytic calculation of 3dB coupling length into two parallel SOI waveguides 307 | with a varying gap at 3 different TE wavelengths. 308 | 309 | An example refractive index profile for the two waveguides spaced 200nm is 310 | shown. 311 | 312 | ```python 313 | import modesolverpy.mode_solver as ms 314 | import modesolverpy.structure as st 315 | import modesolverpy.design as de 316 | import opticalmaterialspy as mat 317 | import numpy as np 318 | import tqdm 319 | 320 | wls = [1.5, 1.55, 1.6] 321 | x_step = 0.02 322 | y_step = 0.02 323 | etch_depth = 0.22 324 | wg_width = 0.44 325 | sub_height = 0.5 326 | sub_width = 2. 327 | clad_height = 0.5 328 | film_thickness = 0.22 329 | gaps = np.linspace(0.1, 0.5, 11) 330 | 331 | for wl in wls: 332 | lengths = [] 333 | 334 | n_sub = mat.SiO2().n(wl) 335 | n_clad = mat.Air().n(wl) 336 | n_wg = 3.476 337 | 338 | for gap in tqdm.tqdm(gaps): 339 | r = st.WgArray(wl, x_step, y_step, etch_depth, [wg_width, wg_width], gap, 340 | sub_height, sub_width, clad_height, n_sub, n_wg, None) 341 | #r.write_to_file() 342 | 343 | solver = ms.ModeSolverFullyVectorial(2) 344 | solver.solve(r) 345 | n1 = solver.n_effs_te[0] 346 | n2 = solver.n_effs_te[1] 347 | lengths.append(de.directional_coupler_lc(wl*1000, n1, n2)/2) 348 | 349 | filename = 'dc-sweep-%inm-%s-%inm-etch-%i-film.dat' % (wl*1000, 'TE', etch_depth*1000, film_thickness*1000) 350 | np.savetxt(filename, np.c_[gaps, lengths], delimiter=',', header='Coupling lengths (50\%)') 351 | ``` 352 | 353 | 354 | 355 | 356 | ## Installation 357 | It is recommend to install `modesolverpy` either via: 358 | 359 | ### Ubuntu/Mint/Debian: 360 | ```bash 361 | pip3 install modesolverpy # or pip2 install modesolverpy 362 | apt install gnuplot 363 | ``` 364 | 365 | ### Arch Linux: 366 | ```bash 367 | yaourt -S python-modesolverpy 368 | ``` 369 | 370 | ### Dependencies 371 | If installing using the [Arch Linux AUR package](https://aur.archlinux.org/packages/python-modesolverpy/) or `pip`, dependencies will be automatically downloaded and installed, if not, one should ensure the following dependencies are installed: 372 | 373 | Either Gnuplot or Matplotlib can be used for plotting; I am a Gnuplot user to the code was written with it in mind. If both Gnuplot and Matplotlib are installed, the code will default to Gnuplot. 374 | 375 | * [setuptools](https://pypi.python.org/pypi/setuptools), 376 | * [numpy](http://www.numpy.org/), 377 | * [scipy](https://www.scipy.org/), 378 | * [tqdm](https://pypi.python.org/pypi/tqdm), and 379 | * [opticalmaterialspy](https://github.com/jtambasco/opticalmaterialspy). 380 | 381 | #### Plotting 382 | EITHER: 383 | 384 | * [Gnuplot](http://www.gnuplot.info/). 385 | * [gnuplotpy](https://github.com/jtambasco/gnuplotpy), 386 | 387 | OR: 388 | 389 | * [matplotlib](https://matplotlib.org/), 390 | 391 | ## Acknowledgments 392 | This finite difference mode solver is based on a modified version of [EMpy](https://github.com/lbolla/EMpy). 393 | 394 | Thank you to [Inna Krasnokutska](https://github.com/ikrasnokutska) for testing. 395 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SPHINXPROJ = modesolverpy 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /docs/rtfd-requirements.txt: -------------------------------------------------------------------------------- 1 | modesolverpy 2 | sphinx-automodapi 3 | -------------------------------------------------------------------------------- /docs/source/api.rst: -------------------------------------------------------------------------------- 1 | API documentation 2 | ================= 3 | 4 | ************ 5 | Mode Solvers 6 | ************ 7 | 8 | .. automodapi:: modesolverpy.mode_solver 9 | 10 | :inherited-members: 11 | :no-heading: 12 | 13 | ********************** 14 | Pre-defined Structures 15 | ********************** 16 | 17 | .. automodapi:: modesolverpy.structure 18 | 19 | :inherited-members: 20 | :no-heading: 21 | 22 | ****************** 23 | Structure Creation 24 | ****************** 25 | 26 | .. automodapi:: modesolverpy.structure_base 27 | 28 | :inherited-members: 29 | :no-heading: 30 | 31 | ************ 32 | Design Tools 33 | ************ 34 | 35 | .. automodapi:: modesolverpy.design 36 | 37 | :inherited-members: 38 | :no-heading: 39 | 40 | ******************* 41 | Coupling Efficiency 42 | ******************* 43 | 44 | .. automodapi:: modesolverpy.coupling_efficiency 45 | 46 | :inherited-members: 47 | :no-heading: 48 | -------------------------------------------------------------------------------- /docs/source/conf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # 4 | # modesolverpy documentation build configuration file, created by 5 | # sphinx-quickstart on Fri May 11 13:21:10 2018. 6 | # 7 | # This file is execfile()d with the current directory set to its 8 | # containing dir. 9 | # 10 | # Note that not all possible configuration values are present in this 11 | # autogenerated file. 12 | # 13 | # All configuration values have a default; values that are commented out 14 | # serve to show the default. 15 | 16 | # If extensions (or modules to document with autodoc) are in another directory, 17 | # add these directories to sys.path here. If the directory is relative to the 18 | # documentation root, use os.path.abspath to make it absolute, like shown here. 19 | 20 | import os 21 | import sys 22 | sys.path.insert(0, os.path.abspath('../..')) 23 | 24 | 25 | # -- General configuration ------------------------------------------------ 26 | 27 | # If your documentation needs a minimal Sphinx version, state it here. 28 | # 29 | # needs_sphinx = '1.0' 30 | 31 | # Add any Sphinx extension module names here, as strings. They can be 32 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 33 | # ones. 34 | extensions = ['sphinx.ext.autodoc', 35 | 'sphinx.ext.mathjax', 36 | 'sphinx.ext.viewcode', 37 | 'sphinx.ext.githubpages', 38 | 'sphinx.ext.napoleon', 39 | 'sphinx_automodapi.automodapi', 40 | 'sphinx_automodapi.smart_resolver'] 41 | 42 | # Add any paths that contain templates here, relative to this directory. 43 | templates_path = ['_templates'] 44 | 45 | # The suffix(es) of source filenames. 46 | # You can specify multiple suffix as a list of string: 47 | # 48 | # source_suffix = ['.rst', '.md'] 49 | source_suffix = '.rst' 50 | 51 | # The master toctree document. 52 | master_doc = 'index' 53 | 54 | # General information about the project. 55 | project = 'modesolverpy' 56 | copyright = '2018, Jean-Luc Tambasco' 57 | author = 'Jean-Luc Tambasco' 58 | 59 | # The version info for the project you're documenting, acts as replacement for 60 | # |version| and |release|, also used in various other places throughout the 61 | # built documents. 62 | # 63 | # The short X.Y version. 64 | version = '0.4.4' 65 | # The full version, including alpha/beta/rc tags. 66 | release = '0.4.4' 67 | 68 | # The language for content autogenerated by Sphinx. Refer to documentation 69 | # for a list of supported languages. 70 | # 71 | # This is also used if you do content translation via gettext catalogs. 72 | # Usually you set "language" from the command line for these cases. 73 | language = None 74 | 75 | # List of patterns, relative to source directory, that match files and 76 | # directories to ignore when looking for source files. 77 | # This patterns also effect to html_static_path and html_extra_path 78 | exclude_patterns = [] 79 | 80 | # The name of the Pygments (syntax highlighting) style to use. 81 | pygments_style = 'tango' 82 | 83 | # If true, `todo` and `todoList` produce output, else they produce nothing. 84 | todo_include_todos = False 85 | 86 | 87 | # -- Options for HTML output ---------------------------------------------- 88 | 89 | # The theme to use for HTML and HTML Help pages. See the documentation for 90 | # a list of builtin themes. 91 | # 92 | html_theme = 'sphinx_rtd_theme' 93 | 94 | # Theme options are theme-specific and customize the look and feel of a theme 95 | # further. For a list of options available for each theme, see the 96 | # documentation. 97 | # 98 | # html_theme_options = {} 99 | 100 | # Add any paths that contain custom static files (such as style sheets) here, 101 | # relative to this directory. They are copied after the builtin static files, 102 | # so a file named "default.css" will overwrite the builtin "default.css". 103 | html_static_path = ['_static'] 104 | 105 | 106 | # -- Options for HTMLHelp output ------------------------------------------ 107 | 108 | # Output file base name for HTML help builder. 109 | htmlhelp_basename = 'modesolverpydoc' 110 | 111 | 112 | # -- Options for LaTeX output --------------------------------------------- 113 | 114 | latex_elements = { 115 | # The paper size ('letterpaper' or 'a4paper'). 116 | # 117 | # 'papersize': 'letterpaper', 118 | 119 | # The font size ('10pt', '11pt' or '12pt'). 120 | # 121 | # 'pointsize': '10pt', 122 | 123 | # Additional stuff for the LaTeX preamble. 124 | # 125 | # 'preamble': '', 126 | 127 | # Latex figure (float) alignment 128 | # 129 | # 'figure_align': 'htbp', 130 | } 131 | 132 | # Grouping the document tree into LaTeX files. List of tuples 133 | # (source start file, target name, title, 134 | # author, documentclass [howto, manual, or own class]). 135 | latex_documents = [ 136 | (master_doc, 'modesolverpy.tex', 'modesolverpy Documentation', 137 | 'Jean-Luc Tambasco', 'manual'), 138 | ] 139 | 140 | 141 | # -- Options for manual page output --------------------------------------- 142 | 143 | # One entry per manual page. List of tuples 144 | # (source start file, name, description, authors, manual section). 145 | man_pages = [ 146 | (master_doc, 'modesolverpy', 'modesolverpy Documentation', 147 | [author], 1) 148 | ] 149 | 150 | 151 | # -- Options for Texinfo output ------------------------------------------- 152 | 153 | # Grouping the document tree into Texinfo files. List of tuples 154 | # (source start file, target name, title, author, 155 | # dir menu entry, description, category) 156 | texinfo_documents = [ 157 | (master_doc, 'modesolverpy', 'modesolverpy Documentation', 158 | author, 'modesolverpy', 'One line description of project.', 159 | 'Miscellaneous'), 160 | ] 161 | 162 | # If true, the current module name will be prepended to all description 163 | # unit titles (such as .. function::). 164 | add_module_names = True 165 | -------------------------------------------------------------------------------- /docs/source/images/slabs.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 23 | 25 | 33 | 39 | 40 | 48 | 54 | 55 | 63 | 69 | 70 | 79 | 85 | 86 | 94 | 100 | 101 | 110 | 116 | 117 | 125 | 131 | 132 | 140 | 146 | 147 | 155 | 161 | 162 | 170 | 176 | 177 | 185 | 191 | 192 | 200 | 206 | 207 | 215 | 221 | 222 | 230 | 236 | 237 | 245 | 251 | 252 | 253 | 277 | 282 | 283 | 285 | 286 | 288 | image/svg+xml 289 | 291 | 292 | 293 | 294 | 295 | 300 | 305 | 308 | 313 | 318 | 323 | x 334 | 335 | 338 | 343 | 348 | 353 | y 364 | 365 | Slab 0 376 | Slab 1 387 | Slab 2 398 | 404 |