Skip to content

Commit eb579ba

Browse files
FEAT: Updating FDTD simulation docs 📝
1 parent b071c00 commit eb579ba

File tree

10 files changed

+451
-292
lines changed

10 files changed

+451
-292
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This repository contains the python API to allow you to:
2929

3030
Note that while this front end package is open source, to run simulations on Flexcompute servers requires an account with credits.
3131
You can sign up for an account [here](https://tidy3d.simulation.cloud/signup).
32-
After that, you can install the front end with the instructions below, or visit [this page](https://docs.flexcompute.com/projects/tidy3d/en/stable/install.html) in our documentation for more details.
32+
After that, you can install the front end with the instructions below, or visit [this page](https://docs.flexcompute.com/projects/tidy3d/en/latest/install.html) in our documentation for more details.
3333

3434
### Quickstart Installation
3535

docs/_static/css/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
.wy-nav-content { max-width: 900px !important; }
1818
.wy-table-responsive table td { white-space: normal !important; }
1919
.wy-table-responsive { overflow: visible !important; }
20-
body { line-height: 1.42857143; }s
20+
body { line-height: 1.42857143; }
2121
.heading-style, h1, h2, h3, h4, h5, h6 {margin: 1.6rem 0 1rem;}
2222
h1 {font-family: 'flexcompute_title', sans-serif;}
2323
h2, h3, h4, h5, h6 {font-family: 'flexcompute_subtitle', sans-serif;}

docs/api/abstract_base.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. currentmodule:: tidy3d.components.base_sim
1+
.. currentmodule:: tidy3d
22

33
Abstract Base Models
44
=====================
@@ -10,6 +10,8 @@ Base classes that represent abstractions of the core elements of a Simulation.
1010
:toctree: _autosummary/
1111
:template: module.rst
1212

13-
simulation.AbstractSimulation
14-
monitor.AbstractMonitor
15-
source.AbstractSource
13+
tidy3d.components.base_sim.simulation.AbstractSimulation
14+
tidy3d.components.base_sim.monitor.AbstractMonitor
15+
tidy3d.components.base_sim.source.AbstractSource
16+
tidy3d.components.source.Source
17+
tidy3d.components.monitor.Monitor

docs/api/constants.rst

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -56,30 +56,30 @@ Units
5656
:toctree: _autosummary/
5757
:template: module.rst
5858

59-
tidy3d.HERTZ
60-
tidy3d.TERAHERTZ
61-
tidy3d.SECOND
62-
tidy3d.PICOSECOND
63-
tidy3d.METER
64-
tidy3d.MICROMETER
65-
tidy3d.NANOMETER
66-
tidy3d.RADIAN
67-
tidy3d.CONDUCTIVITY
68-
tidy3d.PERMITTIVITY
69-
tidy3d.PML_SIGMA
70-
tidy3d.RADPERSEC
71-
tidy3d.ELECTRON_VOLT
72-
tidy3d.KELVIN
73-
tidy3d.PML_SIGMA
74-
tidy3d.CMCUBE
75-
tidy3d.PERCMCUBE
76-
tidy3d.WATT
77-
tidy3d.VOLT
78-
tidy3d.THERMAL_CONDUCTIVITY
79-
tidy3d.SPECIFIC_HEAT_CAPACITY
80-
tidy3d.HEAT_FLUX
81-
tidy3d.VOLUMETRIC_HEAT_RATE
82-
tidy3d.HEAT_TRANSFER_COEFF
59+
tidy3d.constants.HERTZ
60+
tidy3d.constants.TERAHERTZ
61+
tidy3d.constants.SECOND
62+
tidy3d.constants.PICOSECOND
63+
tidy3d.constants.METER
64+
tidy3d.constants.MICROMETER
65+
tidy3d.constants.NANOMETER
66+
tidy3d.constants.RADIAN
67+
tidy3d.constants.CONDUCTIVITY
68+
tidy3d.constants.PERMITTIVITY
69+
tidy3d.constants.PML_SIGMA
70+
tidy3d.constants.RADPERSEC
71+
tidy3d.constants.ELECTRON_VOLT
72+
tidy3d.constants.KELVIN
73+
tidy3d.constants.PML_SIGMA
74+
tidy3d.constants.CMCUBE
75+
tidy3d.constants.PERCMCUBE
76+
tidy3d.constants.WATT
77+
tidy3d.constants.VOLT
78+
tidy3d.constants.THERMAL_CONDUCTIVITY
79+
tidy3d.constants.SPECIFIC_HEAT_CAPACITY
80+
tidy3d.constants.HEAT_FLUX
81+
tidy3d.constants.VOLUMETRIC_HEAT_RATE
82+
tidy3d.constants.HEAT_TRANSFER_COEFF
8383

8484

8585
Precision & Comparator Values
@@ -89,8 +89,8 @@ Precision & Comparator Values
8989
:toctree: _autosummary/
9090
:template: module.rst
9191

92-
tidy3d.dp_eps
93-
tidy3d.fp_eps
94-
tidy3d.pec_val
95-
tidy3d.LARGE_NUMBER
96-
tidy3d.GLANCING_CUTOFF
92+
tidy3d.constants.dp_eps
93+
tidy3d.constants.fp_eps
94+
tidy3d.constants.pec_val
95+
tidy3d.constants.LARGE_NUMBER
96+
tidy3d.constants.GLANCING_CUTOFF

docs/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,4 @@ To see some other examples of Tidy3D being used in large scale photonics simulat
181181

182182
To learn more about the many features of Tidy3D, check out our `Feature Walkthrough <./notebooks/Simulation.html>`_.
183183

184-
Or, if you're interested in the API documentation, see `API Reference <./api.html>`_.
184+
Or, if you're interested in the API documentation, see `API Reference <./api/index.html>`_.

docs/versions/2_5_to_2_6.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"2.6.0": {
3-
"https://docs.flexcompute.com/projects/tidy3d/en/stable/_autosummary": "https://docs.flexcompute.com/projects/tidy3d/en/stable/api/_autosummary"
3+
"https://docs.flexcompute.com/projects/tidy3d/en/latest/_autosummary": "https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary"
44
}
55
}

tidy3d/components/base_sim/simulation.py

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,6 @@ class AbstractSimulation(Box, ABC):
3737
)
3838
"""
3939
Background medium of simulation, defaults to vacuum if not specified.
40-
41-
See Also
42-
--------
43-
44-
`Material Library <../material_library.html>`_:
45-
The material library is a dictionary containing various dispersive models from real world materials.
46-
47-
`Index <../mediums.html>`_:
48-
Dispersive and dispersionless Mediums models.
49-
50-
**Notebooks:**
51-
52-
* `Fitting dispersive material models <../../notebooks/Fitting.html>`_
53-
54-
**Lectures:**
55-
56-
* `Modeling dispersive material in FDTD <https://www.flexcompute.com/fdtd101/Lecture-5-Modeling-dispersive-material-in-FDTD/>`_
57-
58-
**GUI:**
59-
60-
* `Mediums <https://www.flexcompute.com/tidy3d/learning-center/tidy3d-gui/Lecture-2-Mediums/>`_
61-
6240
"""
6341

6442
structures: Tuple[Structure, ...] = pd.Field(
@@ -88,72 +66,15 @@ class AbstractSimulation(Box, ABC):
8866
],
8967
...
9068
)
91-
92-
**Usage Caveats**
93-
94-
It is very important to understand the way the dielectric permittivity of the :class:`Structure` list is resolved
95-
by the simulation grid. Without :attr:`subpixel` averaging, the structure geometry in relation to the
96-
grid points can lead to its features permittivity not being fully resolved by the
97-
simulation.
98-
99-
For example, in the image below, two silicon slabs with thicknesses 150nm and 175nm centered in a grid with
100-
spatial discretization :math:`\\Delta z = 25\\text{nm}` will compute equivalently because that grid does
101-
not resolve the feature permittivity in between grid points without :attr:`subpixel` averaging.
102-
103-
.. image:: ../../_static/img/permittivity_on_yee_grid.png
104-
105-
See Also
106-
--------
107-
108-
:class:`Structure`:
109-
Defines a physical object that interacts with the electromagnetic fields.
110-
111-
:attr:`subpixel`
112-
Subpixel averaging of the permittivity based on structure definition, resulting in much higher
113-
accuracy for a given grid size.
114-
115-
**Notebooks:**
116-
117-
* `Visualizing geometries in Tidy3D <../../notebooks/VizSimulation.html>`_
118-
119-
**Lectures:**
120-
121-
* `Using FDTD to Compute a Transmission Spectrum <https://www.flexcompute.com/fdtd101/Lecture-2-Using-FDTD-to-Compute-a-Transmission-Spectrum/>`_
122-
* `Dielectric constant assignment on Yee grids <https://www.flexcompute.com/fdtd101/Lecture-9-Dielectric-constant-assignment-on-Yee-grids/>`_
123-
124-
**GUI:**
125-
126-
* `Structures <https://www.flexcompute.com/tidy3d/learning-center/tidy3d-gui/Lecture-3-Structures/#presentation-slides>`_
12769
"""
12870

12971
symmetry: Tuple[Symmetry, Symmetry, Symmetry] = pd.Field(
13072
(0, 0, 0),
13173
title="Symmetries",
13274
description="Tuple of integers defining reflection symmetry across a plane "
13375
"bisecting the simulation domain normal to the x-, y-, and z-axis "
134-
"at the simulation center of each axis, respectively. "
135-
"Each element can be ``0`` (no symmetry), ``1`` (even, i.e. 'PMC' symmetry) or "
136-
"``-1`` (odd, i.e. 'PEC' symmetry). "
137-
"Note that the vectorial nature of the fields must be taken into account to correctly "
138-
"determine the symmetry value.",
76+
"at the simulation center of each axis, respectively. ",
13977
)
140-
"""
141-
You should set the ``symmetry`` parameter in your :class:`Simulation` object using a tuple of integers
142-
defining reflection symmetry across a plane bisecting the simulation domain normal to the x-, y-, and z-axis.
143-
Each element can be 0 (no symmetry), 1 (even, i.e. :class:`PMC` symmetry) or -1 (odd, i.e. :class:`PEC`
144-
symmetry). Note that the vectorial nature of the fields must be considered to determine the symmetry value
145-
correctly.
146-
147-
The figure below illustrates how the electric and magnetic field components transform under :class:`PEC`- and
148-
:class:`PMC`-like symmetry planes. You can refer to this figure when considering whether a source field conforms
149-
to a :class:`PEC`- or :class:`PMC`-like symmetry axis. This would be helpful, especially when dealing with
150-
optical waveguide modes.
151-
152-
.. image:: ../../notebooks/img/pec_pmc.png
153-
154-
155-
.. TODO maybe resize?
156-
"""
15778

15879
sources: Tuple[None, ...] = pd.Field(
15980
(),

0 commit comments

Comments
 (0)