Good conductor draft (just for discussion)
Here is a draft on SIBC just to give more context on https://github.com/flexcompute/tidy3d/pull/1773 and hopefully be helpful in making decisions on how to structure the code. In this draft, I just added it in a separate file for now, to avoid massive difference in the code. One plan later is to split Medium.py.
As you can see, SubpixelSpec now has four fields: dielectric, metal, PEC, and lossy_metal. When lossy_metal takes SIBC, solver will apply SIBC to structures made of td.LossyMetal. We don't validate if the metal is lossy enough, as it heavily depends on the geometries.
Example
mat = td.LossyMetal(conductivity=1e2, frequency_range=(2e14, 3e14))
mat.plot()
And the result:
The fitting is applied to the medium frequency_range. So the frequency_range must not be None, and it must be finite and positive.