Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add antenna gain and efficiency figures of merit #2190

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

dmarek-flex
Copy link
Contributor

@dmarek-flex dmarek-flex commented Jan 21, 2025

added more fields to DirectivityData to allow for retrieving the partial radiation intensities, directivities, and helpers to compute gain given a supplied power. Radiated power is based on flux but now includes the direction of the projection monitor, when it is 2D.

Antenna parameters can be extracted by using the TerminalComponentModeler, where the concept of a port is needed to calculate the incident and reflected powers.

For more advanced antennas, we will need the ability to calculate results with a linear combination of ports excited.

Checklist:

  • Make gain and efficiency calculations available
  • Fix backend tests with new API
  • Simplify notebooks by using new API
  • Add post processing support for generating far field response using multiple ports with different complex amplitudes
  • Add tests and example to notebook demonstrating post processing step for multiple port excitations

Relevant PRs:

@dmarek-flex dmarek-flex changed the title add antenna gain and efficiency add antenna gain and efficiency figures of merit Jan 22, 2025
@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch 3 times, most recently from c6f06f3 to eb0377d Compare February 3, 2025 22:01
@dmarek-flex dmarek-flex marked this pull request as ready for review February 3, 2025 22:03
@dmarek-flex
Copy link
Contributor Author

Let's start of the review with RF. Not too complicated of changes, but maybe there is room for improvement on how we package the data. See this notebook PR for how the changes can be used.

@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch from eb0377d to 08e522b Compare February 4, 2025 15:11
@weiliangjin2021
Copy link
Collaborator

1st round of review. All look nice!

@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch from 08e522b to f620fc0 Compare February 6, 2025 14:49
@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch 5 times, most recently from e5ec458 to d4dec80 Compare February 14, 2025 19:50
@dmarek-flex
Copy link
Contributor Author

@weiliangjin2021 @dbochkov-flexcompute Assuming all tests pass I am done the main changes I wanted to make to enable these features. Anything else I do will be typos and docstring improvements if I see any.

Copy link
Collaborator

@weiliangjin2021 weiliangjin2021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very remarkable work! A few minor comments below

@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch from d4dec80 to 9f0584a Compare February 20, 2025 15:56
@weiliangjin2021
Copy link
Collaborator

One architecture question: AntennaParametersData seems more suitable to be placed in monitor_data.py?

@dmarek-flex
Copy link
Contributor Author

One architecture question: AntennaParametersData seems more suitable to be placed in monitor_data.py?

I think that is not a bad idea, but it seems like monitor data is usually associated with a monitor that directly creates it, which is the main reason I did not put it there. In some sense, AntennaParametersData is created by a monitor plus a TerminalComponentModeler. I am leaning towards leaving it in the microwave plugin. Alternatively, maybe I could add it to the components/microwave folder to keep it separate from the other monitor data.

@daquinteroflex @yaugenst-flex Any suggestions from outside the RF world?

@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch from 9f0584a to ba771b6 Compare February 20, 2025 20:09
@daquinteroflex
Copy link
Collaborator

daquinteroflex commented Feb 21, 2025

So there's a few reasons I'll text privately, but basically everything RF specific like this, imo should go under

tidy3d/components/microwave/
    data/
       ...
       # however we want to structure it in here.

Basically imagine that directory is a small world of its own that represents the current "tidy3d/components" and should be extended in a kind of self contained domain if possible

@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch 2 times, most recently from c61a2d0 to 6ac06dc Compare February 24, 2025 19:46
@dmarek-flex
Copy link
Contributor Author

@daquinteroflex @weiliangjin2021 Added a new commit improving docs and moving/renaming AntennaMetricsData. Does that seem consistent with other solver stuff? Later I will move the path integral code as a tool into that folder as well I think.

The one unique thing about AntennaMetricsData is that it is not directly created by a Monitor, but I ended up using the same kind of file naming scheme as other types of MonitorData. A little unsure about that.

@momchil-flex momchil-flex added the 2.8 will go into version 2.8.* label Feb 25, 2025
@daquinteroflex
Copy link
Collaborator

Nice, the reorganization makes sense! So for now, unless there's going to be a set of mixed monitor + other things data types - this still fits in logically within microwave/data/monitor_data.py.

In terms of naming, it's still a "data" container as such. If we believe this concept of "metrics data" might be extended, this could be a good name as you have it? It also kind of makes sense because it's like a "DeviceMetricsData" type. Can always refactor file location in the future depending how this changes too to device_data.py or metrics_data.py too.

@dmarek-flex
Copy link
Contributor Author

@daquinteroflex Yea I like metrics since it is shorter than what I had before and could be used in the future for other specific types of devices.

@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch from 6ac06dc to 36122f1 Compare February 25, 2025 15:15
@dmarek-flex dmarek-flex changed the base branch from pre/2.8 to develop February 25, 2025 15:15
@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch from 36122f1 to a97f919 Compare February 25, 2025 15:18
Copy link
Contributor

@dbochkov-flexcompute dbochkov-flexcompute left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little bit of nitpicking, technically functions

  • scale_fields_by_freq_array
  • get_phi_slice
  • from_spherical_field_dataset
  • calc_radiation_efficiency
  • from_directivity_data
  • compute_power_wave_amplitudes_at_each_port
  • compute_port_VI
  • compute_power_wave_amplitudes
  • compute_power_delivered_by_port

are exposed to the user, so ideally they should have Parameters and Returns sections in docstrings. Or you could just add underscore to those ones that don't really need to be accessible by the user. Otherwise everything looks great to me

@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch from a97f919 to 88cf00a Compare February 26, 2025 19:54
add support for calculating antenna gain and related efficiencies

revamped calcs in DirectivityMonitor allowing for different polarization bases

added functionality for combining results from multiple port excitations

reorganize smatrix plugin by adding a data module
@dmarek-flex dmarek-flex force-pushed the dmarek/add_antenna_gain_and_efficiency branch from 88cf00a to ca98bd2 Compare February 26, 2025 20:44
@dmarek-flex dmarek-flex merged commit 89a7019 into develop Feb 26, 2025
15 checks passed
@dmarek-flex dmarek-flex deleted the dmarek/add_antenna_gain_and_efficiency branch February 26, 2025 21:14
@weiliangjin2021 weiliangjin2021 removed the 2.8 will go into version 2.8.* label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants