Skip to content
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

Imaginary Chi3 (Nonlinear absorption) #1099

Open
pierreluc-plt opened this issue Jan 10, 2020 · 4 comments
Open

Imaginary Chi3 (Nonlinear absorption) #1099

pierreluc-plt opened this issue Jan 10, 2020 · 4 comments

Comments

@pierreluc-plt
Copy link

Hi all,
Is there a way to simulate an imaginary chi3 (3rd order susceptibility) in a material? I am trying to simulate nonlinear absorption. When I input a complex value for the chi3 of a material, my session crashes (using google colab) so my guess is that complex chi3 are not implemented. Are there any workarounds?

Thanks

@stevengj
Copy link
Collaborator

No, this is not supported yet.

You can't simply put in a complex number for χ⁽³⁾ in the time domain — it would be unphysical. One physically reasonable way to implement a lossy nonlinearity is probably to put a nonlinearity into the polarization equation (dP/dt). A similar scheme (albeit using a first-order ODE for the nonlinear polarization) was implemented in this paper, for example.

(It should give an error, not crash?)

@danielwboyce
Copy link

@pierreluc-plt If you've got Meep working on Google Colab, maybe you would consider sharing some of your secrets on Issue #460? Some of the more active contributors use Meep on macOS or a flavor of Linux, so supporting users with Google Colab isn't something we're familiar with.

@pierreluc-plt
Copy link
Author

@stevengj Thanks for the answer. I will try it.

As for the "crash", it does crash my Colab session (it resets my environment and I have to reinstall meep). Here is what it displays (sorry, it's in French but it means "Your session as crashed for an unknown reason"):
image

Here is the logging information:
image

It's not a big problem but I just thought I would give you the information.

@danielwboyce I just added an answer to Issue 460. Thanks for pointing it out to me.

@stevengj
Copy link
Collaborator

stevengj commented Jan 13, 2020

Would be good to check the job output if that is possible. A lot of Meep routines call abort with error messages if they encounter invalid parameters, which is different from a crash resulting from a bug. Python type-conversion failures also abort (#699).

(Single-processor jobs in Python now throw exceptions instead: #953.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants