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

CurrentDetector and FFT progress #27

Closed 0xDBFB7 closed 2 years ago

0xDBFB7 commented 2 years ago

Hi!

This is a little more towards #9. I think FrequencyRoutines.FFT() might perhaps cover #1 when it's done (prerequisite).

You can merge #23 now if desired; this PR is also unfinished, you can review later if you want.

It's such a simple procedure, (apply a pulse, measure the voltage and current at each node, FFT both V and I, divide the two spectra to get Z-param, multiply and divide conjugates to get S-param), I'm just taking a while to implement it.

Several parts might not be what you're looking for, feel free to suggest API improvements:

Thanks for your patience :)

flaport commented 2 years ago

This is amazing! I'll start reviewing this asap! (might take me a while though...)

Short answers to the points you brought up:

flaport commented 2 years ago

Hi @0xDBFB7 , thanks for this PR. What you've added so far looks good to me! I've merged it. If there are any new changes you'd like to add feel free to open a new PR 🙂

Also, would you be willing to add an example notebook going over the new features you've added?

0xDBFB7 commented 2 years ago

@flaport Wonderful! Thanks for the review and ping. I'll work on a notebook.

flaport commented 2 years ago

Thanks, @0xDBFB7 ,

I also saw you left some comments in the PR with some good ideas! I'll leave a comment here if I implement any of them.

Currently implemented: