HelgeGehring / femwell

FEM mode solver for photonic waveguides
https://helgegehring.github.io/femwell/
GNU General Public License v3.0
104 stars 30 forks source link

Add example for consistency of fresnels equations #124

Open VincentLatko opened 6 months ago

simbilod commented 6 months ago

Nice! PML seems a bit thin (2-3 mesh points)

image

HelgeGehring commented 6 months ago

We might want also to start with a lower resolution, most of the examples in the docs are resolutionwise rather at low resolution to make them run fast (for understanding things) - once we want high precision we can always increase the resolution

HelgeGehring commented 6 months ago

Could you run

pip install pre-commit
pre-commit install
pre-commit run --all

that will format the code (and do it after installing always when you commit) after that I'm happy to accept the PR :)

VincentLatko commented 6 months ago

I pushed the new version. Also increased the PML thickness. I hope this is better.

HelgeGehring commented 6 months ago

Looks good now! Probably, now the resolution is a bit too low. We should aim at something like 10 elements / wavelength. That'll probably give a good runtime while representing the physics correctly. But that's something we can co-optimize as soon as we have the simulation getting started :)