Comments (3)
Looks like a great start @Kunyuan-LI !
Three quick things on the first look:
-
I'd not unfreeze the
mode
(it's normalized to power=1), but include the factors for the normalization directly in the calculation, i.e. just divide the calculated number by the three normalization factors. There's so many ways to normalize a mode, it might be hard to store all of them π€
If we see in the end that we need them more often, we could add it as acached_property
to the mode object π€
what do you think? -
About the integrals:
@Functional
def E2(w):
return (w["E"][0] * np.conj(w["E"][0]))
I'm actually a bit confused that this doesn't fail π E[0] should be a 2d vector field. I'd guess what you want to do here is
@Functional
def E2(w):
return dot(w["E"][0],np.conj(w["E"][0]))
to get the scalar product of the E.
But this also confuses me a bit - the integral you posted in the end doesn't seem to have any vectors inside but uses scalars.
Do we just need there to use the dominant component? (i.e. ['E'][0][0 or 1]
)
Do you know how that integral is derived?
- As long as you use complex epsilons the E-fields' phases will also be complex with a random global phase. While this is nothing to worry about and it can just be ignored, there's no reason for this example to go to complex epsilons.
Just use
epsilon_p = basis0.zeros()
epsilon_s = basis0.zeros()
epsilon_i = basis0.zeros()
and you'll get real fields. While this can still give a random sign to the integral (as the sign of the eigenmode is not defined), we'll get something real :)
Could you make a PR out of this like @elizaleung830 ? That's easiest to discuss/test/improve and in the end we would also get a nice extra example :)
from femwell.
Thank you for your answer!
Indeed, the mistake about the normalization of E is quite obviousπ . However, maybe getting it right could be helpful for the subsequent calculations?π
In the numerical integration of finite elements, for normalization, what we actually consider is the sum of the
calculated separately on each element of the basis. Considering
needs to be modified as well because function.assemble?
π
And for the complex epsilons, yes I think you are right. As we just concern about the effective refractive index
For the PR sure I'll make it ASAP.π
from femwell.
Hello,
I've just made a PR, you can now critique my coding.π
And for the overlap in SFWM, in this case
So do you have a good idea to multiply them then intergrate them in the xy-plane?π€
from femwell.
Related Issues (20)
- Calculation of effective mode area or nonlinear coefficent HOT 13
- efficient wide sweeps for waveguide dispersion HOT 2
- mode solver neff jumps HOT 6
- treating quasi-TE mode in overlap with the mode of an optical fiber HOT 1
- Capillary waveguide help HOT 14
- incorrect neff in long wavelength HOT 10
- Possible issue with modes / overlap integrals in complex systems HOT 1
- Example to reproduce
- Add symmetry planes for simulation to filter TE and TM for optics, or even and odd modes for RF HOT 3
- mesh_from_Dict does not handle MultiLineStrings() HOT 4
- Plasmonic waveguide example HOT 3
- Improvements on RF waveguide design tutorial HOT 15
- Bibliography file is a bit messy
- References in docs can contain both URL and doi HOT 2
- Maximum number of iterations taken when calling eigen solver from Arpack HOT 2
- plotting Waveguide mode components HOT 2
- Windows installation of femwell HOT 3
- How to Install the Julia version of femwell HOT 6
- Adjust propagation loss example to paper
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from femwell.