Open jan-david-fischbach opened 1 year ago
Yeah there's no need to be unnecessarily restrictive with the mode solver BCs. We can work on this, but I should say it won't be very high priority. But if @lucas-flexcompute finds some time to take a stab at proposing how the API would work for this, I can help with the actual solver. In fact it should be pretty easy: a long time ago we had PBC before we changed to PEC.
The main annoying part is backwards compatibility of the API, so not sure if this will have to wait for 3.0 or not - if it proves annoying to handle currently.
I have realized, that setting the fdtd simulation to 2D the calculated modes become 1D, which essentially satisfies my need. Nonetheless other BCs can also be useful (I just don't need them right now). A potential improvement, that should be fully backwards compatible and relatively easy to implement, would be to allow for 1D planes in the ModeSolver, or to modify the error message in that case, prompting the user to use a 2D simulation region (fdtd) to calculate 1D eigenmodes.
Great. I think the error message suggestion is a good one! And we may still want to allow for PML on one side only at least in Tidy3D 3.0.
Can maybe include this in #1414, thinking of closing this.
Actually will leave it open if only for the error message
Is your feature request related to a problem? Please describe. I would like to calculate the slab modes of "1D" material stacks (e.g. for variational EIM).
Describe the solution you'd like It would be great to be able to set periodic BCs in the mode solver in order to do such calculations.
Describe alternatives you've considered Have a dedicated solver for slab modes. (Similar to https://www.computational-photonics.eu/oms.html)
Additional context Currently only PML or PEC are supported in the mode solver, afaik. Additionally it would also be nice, if one could specify PML only on one side, but not the other (x+ but not x-) (e.g. for bend waveguide simulations)