Open Kunyuan-LI opened 6 months ago
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 :thinking:
If we see in the end that we need them more often, we could add it as a cached_property
to the mode object :thinking:
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 :sweat_smile: 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?
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 :)
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
$$ E(x,y) \cdot E^*(x,y) $$
calculated separately on each element of the basis. Considering $u_v(x,y)$ where $v=p,s,i$ represents our normalized electric field distribution on the xy-plane, I believe the method of calculation for
{\iint u_p(x, y) u_p(x, y) u_s^*(x, y) u_i^*(x, y)\, dx\,dy}
needs to be modified as well because $u_v(x,y)$ is just a normalized $E(x,y)$ and the product inside should be a three-time dot, then function.assemble?
π
And for the complex epsilons, yes I think you are right. As we just concern about the effective refractive index $n_{eff}$, which is the real part given by femwell for TE and TM modes, so no need to use complex epsilons.
For the PR sure I'll make it ASAP.π
Hello,
I've just made a PR, you can now critique my coding.π And for the overlap in SFWM, in this case $E(x,y)$ and $u_v(x,y)$ have a shape of (2318, 3). So do you have a good idea to multiply them then intergrate them in the xy-plane?π€
Hello,
Just as @elizaleung830 I'm trying to calculate the effective area, but for Spontaneous Four-wave Mixing (SFWM), which is a third-order non-linear effect and the Aeff needs to take into account the interaction between the electric field distributions of three modes (we consider a degenerate pump, which means there are two identical pumps).
The goal is to replicate the results found in the Ansys Lumerical tutorial on Spontaneous Four-Wave Mixing (SFWM) in a Microring Resonator Photon Source, as documented at https://optics.ansys.com/hc/en-us/articles/15100783091731, following the methodology outlined in the publication https://doi.org/10.1070/QEL16511:
Where $u_p$, $u_s$, $u_i$ are the mode function describing the transverse spatial distribution of the field and normalised $\int|u(x, y)|^{2} \mathrm{~d} x \mathrm{~d} y=1$.
So, for a mode in femwell, does mode.E correspond to the unnormalized electric field distribution? I added normalization in femwell.maxwell.waveguide and calculated the method for Aeff, but I obtained a rather strange result.
Function added (for testing I unfreeze the class to add a E0 for the normalized electric field):
And for the main code:
After confirming that the electric field distribution was normalized, I obtained a complex number with a negative real part for
?According to the comparison with Lumerical's results, the Aeff should be on the order of $0.469 \ \text{um}^2$.