-
Notifications
You must be signed in to change notification settings - Fork 64
[FXC-1504]: Adding support for current density monitor #2651
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
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
4e6e50c
to
498628d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, 1 comment
498628d
to
d325a9b
Compare
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
|
b6d335e
to
9390323
Compare
momchil-flex
approved these changes
Aug 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So much cleaner! :) Feel free to choose whether to address comment about field_name
.
9390323
to
8e9dcdc
Compare
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.
Greptile Summary
This PR adds support for current density monitoring in TCAD (Technology Computer-Aided Design) simulations, specifically for Charge and Conduction simulations. The implementation introduces a new
SteadyCurrentDensityMonitor
class that follows the established pattern of other steady-state monitors in the codebase.The key changes include:
New Monitor Class: Added
SteadyCurrentDensityMonitor
intidy3d/components/tcad/monitors/charge.py
that follows the same structure asSteadyElectricFieldMonitor
, using unstructured grids and appropriate validation.Data Storage: Created
SteadyCurrentDensityData
class intidy3d/components/tcad/data/monitor_data/charge.py
to store current density vector field data (J) in units of A/μm², complete with validation, symmetry handling, and field plotting capabilities.Type System Integration: Updated type definitions in
types.py
files to include the new monitor and data types in the appropriate unions (HeatChargeMonitorType
andTCADMonitorDataType
).Simulation Integration: Modified the heat-charge simulation module to recognize and validate the new monitor type, updating error messages and validation logic accordingly.
Testing Infrastructure: Enhanced tests to cover the new current density monitoring functionality, using a refactored approach that tests both electric field and current density monitors generically to avoid code duplication.
The implementation integrates seamlessly with the existing TCAD simulation framework, following established patterns for monitor types, data handling, and validation. Current density (J⃗) is a fundamental electromagnetic quantity representing charge flow per unit area, making this addition valuable for analyzing conduction phenomena in semiconductor devices. The changes also updated documentation strings to clarify that both electric field and current density monitors work for both pure Charge simulations and combined Charge/Conduction simulations.
Important Files Changed
File Changes Summary
tidy3d/components/tcad/monitors/charge.py
SteadyCurrentDensityMonitor
class following established patternstidy3d/components/tcad/data/monitor_data/charge.py
SteadyCurrentDensityData
class for storing current density field datatidy3d/components/tcad/data/types.py
tidy3d/components/tcad/types.py
tidy3d/components/tcad/simulation/heat_charge.py
tests/test_components/test_heat_charge.py
Confidence score: 4/5
Sequence Diagram