-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capillary waveguide help #116
Comments
Hey Timothy, it seems to me that you'd just need to adjust the geometry in https://helgegehring.github.io/femwell/photonics/examples/waveguide_modes.html shapely.Point(0,0).buffer(1, resolution=6) where you can adjust resultuion to have more/less points. Would you have a paper we could reproduce in the docs? |
I'm sorry but I'm not sure I understand what you mean by 'paper'. Could you please clarify. |
Some peer-reviewed publication in a journal which deals with a structure similar to the one you want to simulate. |
No, that's the issue. I can't find any scientific papers that use this precise fiber. I have included the data sheet for the glass tube. I am hoping that by modeling this in python I can learn the launch conditions of a He-Ne laser beam into the capillary in order to obtain a gaussian like mode. |
I didn't mean the exact fiber, but just a similar one as a starting point. https://doi.org/10.3390/s20041191 seems for example to be something similar like you're working on? Easiest is usually to start by reproducing something (even through it's a different geometry) and then adjust the numbers to your case. I'd guess if you create three circles, the inner one, the outer one and an even larger one (to represent the air around the fiber) the geometry should be set up. Maybe just start and if you run into problems you can post your code here? :) |
Thanks! I will work on it and let you know if I have questions. |
Here is a link to my code: https://github.com/timothyara/test_repo/blob/2c3fd3c20a49d231d4952b67a886c244abf3560b/Capillary_Fiber_calc.ipynb I wasn't able to get the solution for the modes and I'm not sure why. When I ran compute_modes the computer was taking a really long and at some point I just interrupted the kernel. I made the buffer radius = 2 which represents the physical radius of the fiber of 350 microns. I then used this scaling and determined the wavelength to be .003617 for 633 nm. Not sure if this is the correct way of going about it so clarification on this would be nice. I appreciate your help. |
Hi @timothyara , I was able to get your geometry to work. I made a PR on your repo. Couple things:
*** Note that here this might be tricky. Since your wavelength is so small and your guiding structure so large, there are a large number of modes with an effective index almost exactly equal to the cladding index. So we cannot just use the effective index as a measure of convergence, and the eigensolver may or may not reliably return the eigenvectors in the same order as we change the matrix (number of nodes in the geometry). |
Thank you @simbilod File ~/opt/anaconda3/lib/python3.8/site-packages/meshwell/prism.py:24, in Prism() TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' I didn't change anything with the code so I'm not sure why this is happening. |
Can anyone help me understand why I'm receiving the Type error in the Prism class. I'm just trying to produce the same results as @simbilod but this error is preventing me from doing so. Here is the link to the code in my repository that displays the error: https://github.com/timothyara/test_repo/blob/710035f82d68d62b73d59cf3af9361f47f11764a/Capillary_Fiber_calc_updated.ipynb |
what is your pydantic version? When you run |
Ah nevermind this seems like it's a python version error. Can you use Python 3.10+? |
Thanks @simbilod. I got it to work after updating the interpreter in Jupyter notebooks to python 3.11. |
Great! Closing for now, feel free to reach out again if anything else comes up :) |
Hello,
I'm new to femwell and I was wondering if there's a particular example that I could use to compute the supported modes in an air filled capillary waveguide with a fused silica cladding. The internal diameter of the capillary is 700 microns and outer diameter is 850 micron. I appreciate any help!
-Timothy
The text was updated successfully, but these errors were encountered: