Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9f46aba

Browse files
committedJan 24, 2025·
More comments
1 parent 15416fc commit 9f46aba

File tree

8 files changed

+26
-29
lines changed

8 files changed

+26
-29
lines changed
 

Diff for: ‎CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
- Added :zap: CHARGE Solver API, basic `SPICE` & `MultiPhysicsMedium` functionality.
1717
- Added :zap: Charge Solver API, basic `SPICE` & `MultiPhysicsMedium` functionality.
1818
- `MultiphysicsMedium` allows for the modularization definition of physical properties. So in addition to the usual optical properties, one can now add heat properties or electric properties. The advantage is that it is now possible to define a medium with some frequency-dependent permittivity in the optical regime and some constant permittivity in valid for electrostatic simulations.
19+
- `MultiPhysicsMedium` allows for the modularization definition of physical properties. So in addition to the usual optical properties, one can now add heat properties or charge properties. The advantage is that it is now possible to define a medium with some frequency-dependent permittivity in the optical regime and some constant permittivity in valid for electrostatic simulations.
1920
- Added :zap: Charge Solver API. It is now possible to solve the Drift-Diffusion (DD) equations for semiconductors. These simulations can be set up with the new class `HeatChargeSimulation` (which supersedes `HeatSimulation`) in a way similar to that of Heat simulations. The solver has currently limited capabilities (which will be expanded in future releases): steady only, isothermal, Boltzmann statistics (non-degenerate semiconductors only).
20-
- `SemiconductorMedium` has been added. This is used in combination with `MultiphysicsMedium` to define the mediums used in the Charge solver. It allows to specify mobility, bandgap narrowing, and generation/recombination models as well as doping. Doping can be defined as constant or through "doping boxes" or, more generally, via `SpatialDataArray` objects for full flexibility.
21+
- `SemiconductorMedium` has been added. This is used in combination with `MultiPhysicsMedium` to define the mediums used in the Charge solver. It allows to specify mobility, bandgap narrowing, and generation/recombination models as well as doping. Doping can be defined as constant or through "doping boxes" or, more generally, via `SpatialDataArray` objects for full flexibility.
2122
- Mobility models for `SemiconductorMedium`: `ConstantMobilityModel`, `CaugheyThomasMobility`
2223
- Bandgap narrowing models for `SemiconductorMedium`: `SlotboomBandGapNarrowing`
2324
- Generation-recombination models for `SemiconductorMedium`: `ShockleyReedHallRecombination`, `RadiativeRecombination`, `AugerRecombination`

Diff for: ‎tidy3d/components/material/multi_physics.py

+7-19
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
from tidy3d.components.base import Tidy3dBaseModel
66
from tidy3d.components.material.solver_types import (
77
ChargeMediumType,
8-
ElectricalMediumType,
98
HeatMediumType,
109
OpticalMediumType,
1110
)
12-
from tidy3d.exceptions import SetupError
1311

1412

1513
class MultiPhysicsMedium(Tidy3dBaseModel):
@@ -78,18 +76,18 @@ class MultiPhysicsMedium(Tidy3dBaseModel):
7876
None, title="Optical properties", description="Specifies optical properties."
7977
)
8078

81-
electrical: Optional[ElectricalMediumType] = pd.Field(
82-
None,
83-
title="Electrical properties",
84-
description="Specifies electrical properties for RF simulations. This is currently not in use.",
85-
)
79+
# electrical: Optional[ElectricalMediumType] = pd.Field(
80+
# None,
81+
# title="Electrical properties",
82+
# description="Specifies electrical properties for RF simulations. This is currently not in use.",
83+
# )
8684

8785
heat: Optional[HeatMediumType] = pd.Field(
88-
None, title="Heat properties", description="Specifies properties for Heat simulations"
86+
None, title="Heat properties", description="Specifies properties for Heat simulations."
8987
)
9088

9189
charge: Optional[ChargeMediumType] = pd.Field(
92-
None, title="Charge properties", description="Specifies properties for Charge simulations"
90+
None, title="Charge properties", description="Specifies properties for Charge simulations."
9391
)
9492

9593
@property
@@ -100,13 +98,3 @@ def heat_spec(self):
10098
return self.optical.heat_spec
10199
else:
102100
return None
103-
104-
@pd.validator("electrical", always=True)
105-
def check_electrical(cls, val):
106-
"""Make sure 'electrical' has not been set."""
107-
108-
if val is not None:
109-
raise SetupError(
110-
"'electrical' properties are not yet supported. Leave this parameter unset or set it to None"
111-
)
112-
return val

Diff for: ‎tidy3d/components/scene.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, List, Optional, Set, Tuple, Union
5+
from typing import Dict, List, Literal, Optional, Set, Tuple, Union
66

77
import autograd.numpy as np
88

@@ -43,6 +43,7 @@
4343
from .material.multi_physics import MultiPhysicsMedium
4444
from .medium import (
4545
AbstractCustomMedium,
46+
AbstractMedium,
4647
AbstractPerturbationMedium,
4748
Medium,
4849
Medium2D,
@@ -850,7 +851,7 @@ def plot_structures_property(
850851
hlim: Tuple[float, float] = None,
851852
vlim: Tuple[float, float] = None,
852853
grid: Grid = None,
853-
property: str = "eps",
854+
property: Literal["eps", "doping", "N_a", "N_d"] = "eps",
854855
) -> Ax:
855856
"""Plot each of scene's structures on a plane defined by one nonzero x,y,z coordinate.
856857
The permittivity is plotted in grayscale based on its value at the specified frequency.
@@ -882,7 +883,7 @@ def plot_structures_property(
882883
The x range if plotting on xy or xz planes, y range if plotting on yz plane.
883884
vlim : Tuple[float, float] = None
884885
The z range if plotting on xz or yz planes, y plane if plotting on xy plane.
885-
property: str = "eps"
886+
property: Literal["eps", "doping", "N_a", "N_d"] = "eps"
886887
Indicates the property to plot for the structures. Currently supported properties
887888
are ["eps", "doping", "N_a", "N_d"]
888889
@@ -1236,7 +1237,7 @@ def _get_structure_eps_plot_params(
12361237
"""Constructs the plot parameters for a given medium in scene.plot_eps()."""
12371238

12381239
plot_params = plot_params_structure.copy(update={"linewidth": 0})
1239-
if hasattr(medium, "viz_spec"):
1240+
if isinstance(medium, AbstractMedium):
12401241
if medium.viz_spec is not None:
12411242
plot_params = plot_params.override_with_viz_spec(medium.viz_spec)
12421243
if alpha is not None:

Diff for: ‎tidy3d/components/tcad/data/monitor_data/abstract.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ class HeatChargeMonitorData(AbstractMonitorData, ABC):
4646
description="Symmetry center of the original simulation in x, y, and z.",
4747
)
4848

49-
@property
49+
@abstractmethod
5050
def symmetry_expanded_copy(self) -> HeatChargeMonitorData:
5151
"""Return copy of self with symmetry applied."""
52-
return self.copy()
5352

5453
@abstractmethod
5554
def field_name(self, val: str) -> str:

Diff for: ‎tidy3d/components/tcad/data/monitor_data/charge.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SteadyPotentialData(HeatChargeMonitorData):
3535

3636
monitor: SteadyPotentialMonitor = pd.Field(
3737
...,
38-
title="Voltage monitor",
38+
title="Electric potential monitor",
3939
description="Electric potential monitor associated with a `charge` simulation.",
4040
)
4141

@@ -228,3 +228,8 @@ def warn_no_data(cls, val, values):
228228
def field_name(self, val: str) -> str:
229229
"""Gets the name of the fields to be plot."""
230230
return ""
231+
232+
@property
233+
def symmetry_expanded_copy(self) -> SteadyCapacitanceData:
234+
"""Return copy of self with symmetry applied."""
235+
return self

Diff for: ‎tidy3d/components/tcad/data/sim_data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class HeatChargeSimulationData(AbstractSimulationData):
134134
None,
135135
title="Device characteristics",
136136
description="Data characterizing the device. Current characteristics include: "
137-
"'iv_curve' for and I-V curve and 'cv_curve' for a capacitance curve.",
137+
"'steady_dc_hole_capacitance', 'steady_dc_electron_capacitance', and 'steady_dc_current_voltage'",
138138
)
139139

140140
@equal_aspect

Diff for: ‎tidy3d/components/tcad/doping.py

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
from tidy3d.components.types import Bound, Union
1212
from tidy3d.constants import MICROMETER
1313

14+
from ...constants import PERCMCUBE
15+
1416

1517
class AbstractDopingBox(Box):
1618
"""Derived class from Box which redefines size so that
@@ -74,6 +76,7 @@ class ConstantDoping(AbstractDopingBox):
7476
default=0,
7577
title="Doping concentration density.",
7678
description="Doping concentration density in #/cm^3.",
79+
units=PERCMCUBE,
7780
)
7881

7982

Diff for: ‎tidy3d/components/tcad/simulation/heat_charge.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class HeatChargeSimulation(AbstractSimulation):
216216
... placement=td.MediumMediumInterface(mediums=[air.name, Si_p.name]),
217217
... )
218218
>>> charge_sim = td.HeatChargeSimulation(
219-
... structures=[]n_side, p_side,
219+
... structures=[n_side, p_side],
220220
... medium=td.Medium(heat_spec=td.FluidSpec(), name="air"),
221221
... monitors=[td.SteadyFreeCarrierMonitor(
222222
... center=(0, 0, 0), size=(td.inf, td.inf, 0), name="charge_mnt", unstructured=True

0 commit comments

Comments
 (0)
Please sign in to comment.