flexcompute / tidy3d

Fast electromagnetic solver (FDTD) at scale.
https://docs.flexcompute.com/projects/tidy3d/en/latest/
GNU Lesser General Public License v2.1
181 stars 41 forks source link

Time permittivity monitor #1645

Open alec-flexcompute opened 5 months ago

alec-flexcompute commented 5 months ago

A permittivity monitor, just in the time domain instead of frequency domain. This should be useful now that our nonlinear capabilities are what they are.

momchil-flex commented 5 months ago

I am not sure this makes sense in general. Maybe for some type of nonlinearities? But generally permittivity is chi-1, and nonlinearities are higher-order-chi-s. I guess when there is no frequency mixing, an effective epsilon can be written, which is maybe what you have in mind?

alec-flexcompute commented 5 months ago

I'm mainly thinking about checking how a nonlinear material's permittivity would be different at different times

tylerflex commented 5 months ago

Maybe one way to do this while still being rigorous could be to consider a method that returns the polarization of a medium as a function of FieldData or FieldTimeData?

image

https://en.wikipedia.org/wiki/Nonlinear_optics

class Medium(...):

     def polarization(field_data: FieldData | FieldTimeData) -> FieldData | FieldTimeData:
         """Compute polarization density of this medium when an electric field is present."""
         # compute all chi terms
         # construct field data with the polarization?

Then the user could add a FieldTimeMonitor to the simulation and call this method if they want to see the effect of the nonlinear medium?