tidy3d.VolumeMesherData#
- class VolumeMesherData[source]#
Bases:
AbstractHeatChargeSimulationDataStores results of a
VolumeMesher.- Parameters:
simulation (
HeatChargeSimulation) – OriginalHeatChargeSimulationassociated with the data.data (tuple[
VolumeMeshData, …]) – List ofMonitorDatainstances associated with the monitors of the originalVolumeMesher.log (Optional[str] = None) – A string containing the log information from the simulation run.
monitors (tuple[
VolumeMeshMonitor, …]) – List of monitors to be used for the mesher.
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
Methods
Ensure each
AbstractMonitorDatain.datacorresponds 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
AbstractMonitorDatain.datacorresponds to a monitor in.simulation.