Skip to content

Commit

Permalink
Removing HeatSimulation.from_scene since we no longer need it
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-flex committed May 27, 2024
1 parent 3e704e5 commit 99e0bda
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions tidy3d/components/device/heat/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from ...types import Ax
from ...viz import add_ax_if_none, equal_aspect
from ...scene import Scene
from ..simulation import DeviceSimulation
from ....log import log

Expand Down Expand Up @@ -120,52 +119,3 @@ def plot_heat_conductivity(
hlim=hlim,
vlim=vlim,
)

@classmethod
def from_scene(cls, scene: Scene, **kwargs) -> HeatSimulation:
"""Create a simulation from a :class:.`Scene` instance. Must provide additional parameters
to define a valid simulation (for example, ``size``, ``grid_spec``, etc).
Parameters
----------
scene : :class:.`Scene`
Scene containing structures information.
**kwargs
Other arguments
Example
-------
>>> import tidy3d as td
>>> box = td.Structure(
... geometry=td.Box(center=(0, 0, 0), size=(1, 2, 3)),
... medium=td.Medium(
... permittivity=2.0, heat_spec=td.SolidSpec(
... conductivity=1,
... capacity=1,
... )
... ),
... name="box",
... )
>>> scene = td.Scene(
... structures=[box],
... medium=td.Medium(permittivity=3),
... )
>>> sim = td.HeatSimulation.from_scene(
... scene=scene,
... center=(0, 0, 0),
... size=(5, 6, 7),
... grid_spec=td.UniformUnstructuredGrid(dl=0.4),
... boundary_spec=[
... td.DeviceBoundarySpec(
... placement=td.StructureBoundary(structure="box"),
... condition=td.TemperatureBC(temperature=500),
... )
... ],
... )
"""

return cls(
structures=scene.structures,
medium=scene.medium,
**kwargs,
)

0 comments on commit 99e0bda

Please sign in to comment.