Skip to content

Conversation

@ColwynGulliford
Copy link

@ColwynGulliford ColwynGulliford commented Feb 10, 2025

This PR adds the ability to use PySuperFish on 2D problems with rectangular geometry.

  1. Superfish object autodetects the geometry type, and .geometry is a now a member parameter.
  2. Interpolation for rectangular geometries is done using the grid command to SF7. The data is parsed and returned as a dictionary with similar structure to cylindrical problems. Input to the interpolation functions requires defining the interpolation grid, which is done here using xmin, xmax, nx (and similarly for y). The function is backwards compatible with cylindrical problems.
  3. Plotting was updated to work with rectangular geometry. Additionally, the user can choose to plot a specific field component, not just the magnitude of the field.

Here's an example of a 2D electrostatic problem show the new interpolation commands and plotting features:

Screenshot 2025-02-10 at 3 44 18 PM Screenshot 2025-02-10 at 3 53 15 PM Screenshot 2025-02-10 at 3 53 30 PM Screenshot 2025-02-10 at 3 54 09 PM Screenshot 2025-02-10 at 3 54 23 PM

@ColwynGulliford ColwynGulliford marked this pull request as draft February 10, 2025 22:04
@ColwynGulliford ColwynGulliford marked this pull request as ready for review February 11, 2025 03:41
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.

1 participant