tidy3d.VolumeMesherData#

class VolumeMesherData[source]#

Bases: AbstractHeatChargeSimulationData

Stores results of a VolumeMesher.

Parameters:

Example

>>> import tidy3d as td
>>> import numpy as np
>>> mesh_mnt = td.VolumeMeshMonitor(size=(1, 2, 3), name="mesh")
>>> temp_mnt = td.TemperatureMonitor(size=(1, 2, 3), name="sample", unstructured=True)
>>> heat_sim = td.HeatChargeSimulation(
...     size=(3.0, 3.0, 3.0),
...     structures=[
...         td.Structure(
...             geometry=td.Box(size=(1, 1, 1), center=(0, 0, 0)),
...             medium=td.Medium(
...                 permittivity=2.0, heat_spec=td.SolidSpec(
...                     conductivity=1,
...                     capacity=1,
...                 )
...             ),
...             name="box",
...         ),
...     ],
...     medium=td.Medium(permittivity=3.0, heat_spec=td.FluidSpec()),
...     grid_spec=td.UniformUnstructuredGrid(dl=0.1),
...     sources=[td.HeatSource(rate=1, structures=["box"])],
...     boundary_spec=[
...         td.HeatChargeBoundarySpec(
...             placement=td.StructureBoundary(structure="box"),
...             condition=td.TemperatureBC(temperature=500),
...         )
...     ],
...     monitors=[temp_mnt],
... )
>>> tet_grid_points = td.PointDataArray(
...     [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [1.0, 1.0, 0.0], [0.0, 0.0, 1.0]],
...     dims=("index", "axis"),
... )
>>> tet_grid_cells = td.CellDataArray(
...     [[0, 1, 2, 4], [1, 2, 3, 4]],
...     dims=("cell_index", "vertex_index"),
... )
>>> tet_grid_values = td.IndexedDataArray(
...     np.zeros((tet_grid_points.shape[0],)),
...     dims=("index",),
...     name="Mesh",
... )
>>> tet_grid = td.TetrahedralGridDataset(
...     points=tet_grid_points,
...     cells=tet_grid_cells,
...     values=tet_grid_values,
... )
>>> mesh_mnt_data = td.VolumeMeshData(monitor=mesh_mnt, mesh=tet_grid) 
>>> mesh_data = td.VolumeMesherData(simulation=heat_sim, data=[mesh_mnt_data], monitors=[mesh_mnt]) 

Attributes

mesher

Get the mesher associated with this mesher data.

monitors

data

simulation

log

Methods

data_monitors_match_sim()

Ensure each AbstractMonitorData in .data corresponds to a monitor in .simulation.

get_monitor_by_name(name)

Return monitor named 'name'.

monitors#
data#
property mesher#

Get the mesher associated with this mesher data.

data_monitors_match_sim()[source]#

Ensure each AbstractMonitorData in .data corresponds to a monitor in .simulation.

get_monitor_by_name(name)[source]#

Return monitor named ‘name’.