esa / NIDN

Neural Inverse Design of Nanostructures
GNU General Public License v3.0
38 stars 6 forks source link

Zirconium creates some numerical instability / signal grows exponentially to e253 #73

Closed torbjornstoro closed 2 years ago

torbjornstoro commented 2 years ago

Issue

Problem Description

As title

Expected Behavior

The same as other materials

What Needs to be Done

How Can It Be Tested or Reproduced

3 layers of TiO, zirconium and SiN to reproduce, wavelengths between 600 and 800 nm

torbjornstoro commented 2 years ago

Also reproduced with single layer zirconium between 600 nm and 1 um wavelengths

torbjornstoro commented 2 years ago

Also happens for Germanium at 600 nm wavelength

gomezzz commented 2 years ago

with FDTD I presume? Or also TRCWA?

Eps is computed here https://github.com/esa/NIDN/blob/98112c7d33827706d36959454b51b20d5ff96f4b/nidn/materials/material_collection.py#L90

So basically if you go below the values in the database it should just give you lowest one, thus my suspicion is bug has to be somewhere else :thinking:

torbjornstoro commented 2 years ago

Yeah seems to work fine with TRCWA, will do some more debugging

gomezzz commented 2 years ago

Maybe because Zirconium is a metal?

gomezzz commented 2 years ago

Additionally, as zirconium goes into negative eps it could be that at the transition from negative to positive values eps gets to close to 0 due to the interpolation we use

gomezzz commented 2 years ago

I have also had some problems with zirconium, removed it for now from the DB