-
Notifications
You must be signed in to change notification settings - Fork 2
Fixing Mode Source in 3D & Example #37
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
Merged
Merged
+1,263
−544
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…sign structures to include Sphere. Introduce convergence analysis and Mie scattering benchmarks.
- Updated the `_process_3d_pml` method to include depth in conductivity calculations. - Added `get_conductivity` method in the PML class to compute conductivity based on 3D dimensions. - Adjusted field calculations to use maximum sigma values to prevent double-counting.
- Enhanced the Monitor class to auto-detect plane normal and adjust size and position calculations accordingly. - Improved grid slice retrieval in the Monitor class for better handling of 3D field data. - Updated the 3D dipole verification benchmark to refine power calculations and monitor setup. - Simplified the 3D Mie scattering benchmark by introducing a UniformSource class and optimizing monitor configurations for clarity and performance.
- Replaced UniformSource with GaussianBeamSource for improved wave propagation modeling. - Enhanced field injection logic to incorporate Gaussian beam profile. - Introduced DFT computation for frequency-domain analysis of scattered fields. - Updated incident intensity calculations to reflect changes in source and monitor configurations. - Improved benchmark output for clarity and accuracy in results.
- Updated ModeSource to store additional attributes for plotting, including resolution, grid shape, and 2D permittivity profile. - Improved visualization logic in ModeSource for 2D mode profiles, including axis labeling and overlaying permittivity boundaries. - Adjusted example script to position the source at the waveguide center and modified source width for better mode capture, changing polarization from "tm" to "te".
- Updated ModeSource to support injection of all 6 field components (Ex, Ey, Ez, Hx, Hy, Hz) for accurate 3D mode simulations. - Improved initialization and setup methods to handle Yee grid staggering and proper field alignment. - Enhanced visualization methods for 3D mode profiles, including plotting all field components. - Refactored injection logic to accommodate both 2D and 3D scenarios, ensuring compatibility with legacy code paths.
- Enhanced the _setup_2d_injection method to utilize mode solver output directly, improving index-based extraction for E_mode and H_mode. - Added detailed comments to clarify the order of field components based on propagation axis. - Implemented phase alignment and impedance correction for both TM and TE modes, ensuring accurate profile calculations. - Streamlined the extraction logic for 2D and 3D scenarios, maintaining compatibility with legacy code paths.
- Updated Monitor class to extract plane_position from start coordinates if not explicitly provided, enhancing flexibility in monitor setup. - Added visualization method to GaussianSource for 2D plotting, allowing representation of the source position and width with circles. - Introduced visualization method in ModeSource for 2D plotting, depicting the source position and direction with lines and arrows. - Adjusted example script to include visualization calls for better demonstration of source behavior.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.