Skip to content

Non-isothermal charge simulations #2425

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

marc-flex
Copy link
Contributor

@marc-flex marc-flex commented May 2, 2025

Greptile Summary

Added support for non-isothermal charge simulations by introducing SteadyChargeDCAnalysis base class and refactoring the existing IsothermalSteadyChargeDCAnalysis, enabling temperature variation effects in charge simulations.

  • Split analysis classes in spice/analysis/dc.py to support both temperature-varying and fixed-temperature simulations while maintaining backward compatibility
  • Added validation in tcad/simulation/heat_charge.py to ensure structures have both electrical and thermal properties for non-isothermal simulations
  • Enhanced test fixtures in test_heat_charge.py with comprehensive thermal conductivity and medium components
  • Modified package exports in __init__.py to include new SteadyChargeDCAnalysis class

@marc-flex marc-flex self-assigned this May 2, 2025
@marc-flex marc-flex force-pushed the marc/non_isothermal branch from cde4b7a to 123a335 Compare May 16, 2025 09:33
@marc-flex marc-flex marked this pull request as ready for review June 9, 2025 14:54
@marc-flex marc-flex force-pushed the marc/non_isothermal branch from 123a335 to a91b7e3 Compare June 9, 2025 14:56
Copy link
Contributor

github-actions bot commented Jun 9, 2025

Diff Coverage

Diff: origin/develop...HEAD, staged and unstaged changes

  • tidy3d/components/spice/analysis/dc.py (100%)
  • tidy3d/components/spice/types.py (100%)
  • tidy3d/components/tcad/simulation/heat_charge.py (92.0%): Missing lines 985,990

Summary

  • Total: 30 lines
  • Missing: 2 lines
  • Coverage: 93%

tidy3d/components/tcad/simulation/heat_charge.py

  981                     "The current simulation is defined as non-isothermal but no solid "
  982                     "materials with heat properties have been defined. "
  983                 )
  984             elif not has_elec and has_heat:
! 985                 raise SetupError(
  986                     "The current simulation is defined as non-isothermal but no "
  987                     "semiconductor materials have been defined. "
  988                 )
  989             elif not has_heat and not has_elec:
! 990                 raise SetupError(
  991                     "The current simulation is defined as non-isothermal but no "
  992                     "solid or semiconductor materials have been defined. "
  993                 )
  994         return values

@marc-flex marc-flex force-pushed the marc/non_isothermal branch from 60cf9f1 to f53f91b Compare June 10, 2025 10:17
@yaugenst-flex
Copy link
Collaborator

@greptileai

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

5 files reviewed, 3 comments
Edit PR Review Bot Settings | Greptile

Comment on lines +52 to 55
class SteadyChargeDCAnalysis(Tidy3dBaseModel):
"""
Configures relevant steady-state DC simulation parameters for a charge simulation.
"""
Copy link

Choose a reason for hiding this comment

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

style: Base class docstring should be more descriptive, mentioning this is for both isothermal and non-isothermal simulations

Comment on lines +81 to +83
"""
Configures relevant steady-state DC simulation parameters for a charge simulation.
"""
Copy link

Choose a reason for hiding this comment

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

style: Docstring should clarify this is specifically for isothermal (constant temperature) simulations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants