spdcalc / spdcalc-ui

The web app for spdcalc
0 stars 0 forks source link

Phasematching angle for non-periodic poled crystals is incorrect. #3

Open kshalm opened 2 months ago

kshalm commented 2 months ago

For the new version of SPDCalc, the phasematching angle depends on the length of the bulk crystal. This isn't correct.

Expected: For the old version, I'm using the following as a test case. Crystal: BBO Type 2 PM (775->1550) theta opening angle = 3 degrees Crystal length = 1000 um The phasematching angle for the crystal optic axis should 31.6. SPDCalc.org phasematching.

For the new code with the same parameters, the wrong phasematching angle is being calculated. What's more, it varies wildly as the length changes.

New code 500 um crystal length, PM angle = 32 deg

New code 1000 um crystal length, PM angle = 73.46 deg

kshalm commented 2 months ago

We should create some unit tests for know crystal configurations to make sure that the phasematching functions are working.