Skip to content

Commit c550399

Browse files
authored
adding information on how to avoid creating a expanded copy when call… (#27)
adding information on how to avoid creating an expanded copy when calling monitor data
1 parent 9b8479c commit c550399

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

_faqs/why-does-the-kernel-crash-sometimes-when-using-the-web-based-python-notebook.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@ date: 2023-10-24 18:09:43
44
enabled: true
55
category: 'Simulation Troubleshoot'
66
---
7-
The web-based Python notebook environment in `tidy3d.simulation.cloud` only has access to 4 GB of memory. When running a large simulation or complex optimizations, the memory needed to process the data could exceed the limit, causing the kernel to crash. In this case, we recommend installing `Tidy3D` on your local computer by following the installation [guide](https://docs.flexcompute.com/projects/tidy3d/en/latest/install.html) and [video](https://youtu.be/qQidx65Jmu0). It will then use your computer memory, which is typically larger than 4 GB.
7+
The web-based Python notebook environment in `tidy3d.simulation.cloud` only has access to 8 GB of memory. When running a large simulation or complex optimizations, the memory needed to process the data could exceed the limit, causing the kernel to crash. In this case, we recommend installing `Tidy3D` on your local computer by following the installation [guide](https://docs.flexcompute.com/projects/tidy3d/en/latest/install.html) and [video](https://youtu.be/qQidx65Jmu0). It will then use your computer memory, which is typically larger than 8 GB.
8+
9+
If [symmetries](https://www.flexcompute.com/tidy3d/examples/notebooks/Symmetry/) are not used in the simulation, memory usage can be reduced by calling `data = sim_data.monitor_data['monitor_name']` instead of `data = sim_data['monitor_name']`. The latter creates a copy of the monitor data and expands it to include the symmetric parts, if applicable.
10+
11+
However, if symmetries are used in the simulation, `data = sim_data.monitor_data['monitor_name']` will return data only for the simulated portion of the volume, and not the symmetric extensions. For example, if symmetry is applied in the x-plane, only half of the data will be returned.
12+
13+
Note that many analyses can still be performed with this partial data. For instance, the mode volume can be computed using the non-expanded monitor and then multiplied by the appropriate factor (`2`, `4`, or `8` for `1`, `2`, or `3` symmetry planes, respectively). An example of this approach can be seen in [this example](https://www.flexcompute.com/tidy3d/examples/notebooks/NanobeamCavity/).
14+
15+

0 commit comments

Comments
 (0)