flaport / fdtd

A 3D electromagnetic FDTD simulator written in Python with optional GPU support
https://fdtd.readthedocs.io
MIT License
454 stars 116 forks source link

automated type promotion with complex permeability #63

Closed hajanssen closed 1 year ago

hajanssen commented 1 year ago

Hey, i want to add the capability of simulating metals, with complex refractive index.

The proposed changes just promote the Field and Boundary to Complex type, if a complex permittivity has passed. Not sure if it's just enough to make it physically correct?

One simple test to see the effect of complex epsilon:

complex epsilon complex epsilon

real epsilon real epsilon

flaport commented 1 year ago

This looks good! Thanks :)

flaport commented 1 year ago

This will be available in fdtd==0.3.0