Skip to content

Commit ab8fcc5

Browse files
authored
fix formmating (#42)
* fix formmating
1 parent 96107d9 commit ab8fcc5

15 files changed

+189
-105
lines changed

_faqs/how-can-i-define-a-semiconductor-material.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How Can I Define a Semiconductor Material?
3-
date: 2025-06-30 21:10:35
3+
date: 2025-08-26 10:06:59
44
enabled: true
55
category: "Charge"
66
---

_faqs/how-can-i-define-doping-profile.md

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How Can I Define Doping Profile?
3-
date: 2025-06-30 21:10:35
3+
date: 2025-08-26 10:06:59
44
enabled: true
55
category: "Charge"
66
---
@@ -11,40 +11,58 @@ The doping profile can be:
1111

1212
- Uniform, implemented using the [`ConstantDoping`](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.ConstantDoping.html){: .color-primary-hover} object:
1313

14-
<div markdown class="code-snippet">{% highlight python %}
14+
<div markdown class="code-snippet">
15+
{% highlight python %}
1516
import tidy3d as td
16-
box\_coords = \[
17-
\[-1, -1, -1],
18-
\[1, 1, 1]
17+
18+
box_coords = [
19+
[-1, -1, -1],
20+
[1, 1, 1]
1921
]
20-
constant\_box1 = td.ConstantDoping(center=(0, 0, 0), size=(2, 2, 2), concentration=1e18)
21-
constant\_box2 = td.ConstantDoping.from\_bounds(rmin=box\_coords\[0], rmax=box\_coords\[1], concentration=1e18){% endhighlight %}
22+
23+
constant_box1 = td.ConstantDoping(
24+
center=(0, 0, 0),
25+
size=(2, 2, 2),
26+
concentration=1e18
27+
)
28+
29+
constant_box2 = td.ConstantDoping.from_bounds(
30+
rmin=box_coords[0],
31+
rmax=box_coords[1],
32+
concentration=1e18
33+
)
34+
{% endhighlight %}
2235
{% include copy-button.html %}</div>
2336

2437
- Gaussian, implemented using the [`GaussianDoping`](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.GaussianDoping.html){: .color-primary-hover} object:
2538

26-
<div markdown class="code-snippet">{% highlight python %}
39+
<div markdown class="code-snippet">
40+
{% highlight python %}
2741
import tidy3d as td
28-
box\_coords = \[
29-
\[-1, -1, -1],
30-
\[1, 1, 1]
42+
43+
box_coords = [
44+
[-1, -1, -1],
45+
[1, 1, 1]
3146
]
32-
gaussian\_box1 = td.GaussianDoping(
33-
center=(0, 0, 0),
34-
size=(2, 2, 2),
35-
ref\_con=1e15,
36-
concentration=1e18,
37-
width=0.1,
38-
source="xmin"
47+
48+
gaussian_box1 = td.GaussianDoping(
49+
center=(0, 0, 0),
50+
size=(2, 2, 2),
51+
ref_con=1e15,
52+
concentration=1e18,
53+
width=0.1,
54+
source="xmin"
55+
)
56+
57+
gaussian_box2 = td.GaussianDoping.from_bounds(
58+
rmin=box_coords[0],
59+
rmax=box_coords[1],
60+
ref_con=1e15,
61+
concentration=1e18,
62+
width=0.1,
63+
source="xmin"
3964
)
40-
gaussian\_box2 = td.GaussianDoping.from\_bounds(
41-
rmin=box\_coords\[0],
42-
rmax=box\_coords\[1],
43-
ref\_con=1e15,
44-
concentration=1e18,
45-
width=0.1,
46-
source="xmin"
47-
){% endhighlight %}
65+
{% endhighlight %}
4866
{% include copy-button.html %}</div>
4967

5068
The unit for the free carrier concentration is 1/$\text{cm}^3$.
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How Can I Define the Simulation Grid?
3-
date: 2025-06-30 21:10:35
3+
date: 2025-08-26 10:06:59
44
enabled: true
55
category: "Charge"
66
---
@@ -10,21 +10,25 @@ There are two classes available for defining the grid specification:
1010

1111
- This class implements a simple uniform unstructured grid, with the grid size defined by the `dl` argument. For an application example, see [this](https://www.flexcompute.com/tidy3d/examples/notebooks/MachZehnderModulator/){: .color-primary-hover} example.
1212

13-
<div markdown class="code-snippet">{% highlight python %}
14-
heat_grid = UniformUnstructuredGrid(dl=0.1){% endhighlight %}
13+
<div markdown class="code-snippet">
14+
{% highlight python %}
15+
heat_grid = UniformUnstructuredGrid(dl=0.1)
16+
{% endhighlight %}
1517
{% include copy-button.html %}</div>
1618

1719
- [DistanceUnstructuredGrid](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.DistanceUnstructuredGrid.html){: .color-primary-hover}:
1820

1921
- This class specifies the mesh size based on the distance from material interfaces. The finer grid near interfaces is defined by the `dl_interface` argument, while the coarser bulk grid size is set using `dl_bulk`. The distances over which `dl_interface` and `dl_bulk` are enforced can be controlled with the `distance_interface` and `distance_bulk` arguments, respectively. For an application example, see [this](https://www.flexcompute.com/tidy3d/examples/notebooks/ThermallyTunedRingResonator/){: .color-primary-hover} example notebook.
2022

21-
<div markdown class="code-snippet">{% highlight python %}
23+
<div markdown class="code-snippet">
24+
{% highlight python %}
2225
heat_grid = DistanceUnstructuredGrid(
23-
dl_interface=0.1,
24-
dl_bulk=1,
25-
distance_interface=0.3,
26-
distance_bulk=2,
27-
){% endhighlight %}
26+
dl_interface=0.1,
27+
dl_bulk=1,
28+
distance_interface=0.3,
29+
distance_bulk=2,
30+
)
31+
{% endhighlight %}
2832
{% include copy-button.html %}</div>
2933

3034
The user can also add refinement regions to enforce a minimum grid size in a given region using the [GridRefinementRegion](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.GridRefinementRegion.html){: .color-primary-hover} object, or along a line using the [GridRefinementLine](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.GridRefinementLine.html){: .color-primary-hover} object. An example of this can be found in our [charge solver example](https://www.flexcompute.com/tidy3d/examples/notebooks/ChargeSolver){: .color-primary-hover}.

_faqs/how-can-i-set-charge-boundary-conditions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How Can I Set Charge Boundary Conditions?
3-
date: 2025-06-30 21:10:35
3+
date: 2025-08-26 10:06:59
44
enabled: true
55
category: "Charge"
66
---

_faqs/how-do-i-set-a-charge-simulation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How Do I Set a Charge Simulation?
3-
date: 2025-06-30 21:10:35
3+
date: 2025-08-26 10:06:59
44
enabled: true
55
category: "Charge"
66
---

_faqs/what-charge-monitors-are-available.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: What Charge Monitors are Available?
3-
date: 2025-06-30 21:10:35
3+
date: 2025-08-26 10:06:59
44
enabled: true
55
category: "Charge"
66
---
@@ -10,33 +10,50 @@ Currently, there are three monitors available:
1010

1111
- This monitor records the electric potential ($\Phi$).
1212

13-
<div markdown class="code-snippet">{% highlight python %}
13+
<div markdown class="code-snippet">
14+
{% highlight python %}
1415
import tidy3d as td
16+
1517
voltage_monitor_z0 = td.SteadyPotentialMonitor(
16-
center=(0, 0.14, 0), size=(0.6, 0.3, 0), name="voltage_z0", unstructured=True,
17-
){% endhighlight %}
18+
center=(0, 0.14, 0),
19+
size=(0.6, 0.3, 0),
20+
name="voltage_z0",
21+
unstructured=True,
22+
)
23+
{% endhighlight %}
1824
{% include copy-button.html %}</div>
1925

2026
- [SteadyFreeCarrierMonitor](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SteadyFreeCarrierMonitor.html){: .color-primary-hover}:
2127

2228
- This monitor records the steady-state free carrier concentrations ($J_n$ for electrons and $J_p$ for holes).
2329

24-
<div markdown class="code-snippet">{% highlight python %}
30+
<div markdown class="code-snippet">
31+
{% highlight python %}
2532
import tidy3d as td
33+
2634
voltage_monitor_z0 = td.SteadyFreeCarrierMonitor(
27-
center=(0, 0.14, 0), size=(0.6, 0.3, 0), name="voltage_z0", unstructured=True,
28-
){% endhighlight %}
35+
center=(0, 0.14, 0),
36+
size=(0.6, 0.3, 0),
37+
name="voltage_z0",
38+
unstructured=True,
39+
)
40+
{% endhighlight %}
2941
{% include copy-button.html %}</div>
3042

3143
- [SteadyCapacitanceMonitor](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SteadyCapacitanceMonitor.html){: .color-primary-hover}:
3244

3345
- This monitor records the small-signal capacitance within the area or volume defined by the monitor.
3446

35-
<div markdown class="code-snippet">{% highlight python %}
47+
<div markdown class="code-snippet">
48+
{% highlight python %}
3649
import tidy3d as td
50+
3751
capacitance_global_mnt = td.SteadyCapacitanceMonitor(
38-
center=(0, 0.14, 0), size=(td.inf, td.inf, 0), name="capacitance_global_mnt",
39-
){% endhighlight %}
52+
center=(0, 0.14, 0),
53+
size=(td.inf, td.inf, 0),
54+
name="capacitance_global_mnt",
55+
)
56+
{% endhighlight %}
4057
{% include copy-button.html %}</div>
4158

4259
For an application example of Charge monitors, please refer to [this](https://www.flexcompute.com/tidy3d/examples/notebooks/ChargeSolver/){: .color-primary-hover} example.
Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,44 @@
11
---
22
title: Which Types of Charge Boundary Conditions are Available?
3-
date: 2025-06-30 21:10:35
3+
date: 2025-08-26 10:06:59
44
enabled: true
55
category: "Charge"
66
---
77
There are three boundary conditions available for Charge simulations:
88

99
1) Voltage boundary ([VoltageBC](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.VoltageBC.html){: .color-primary-hover}), which sets a constant potential and is commonly used to model applied bias.
1010

11-
<div markdown class="code-snippet">{% highlight python %}
11+
<div markdown class="code-snippet">
12+
{% highlight python %}
1213
import tidy3d as td
13-
voltage\_source = td.DCVoltageSource(voltage=1)
14-
voltage\_bc = td.VoltageBC(source=voltage\_source){% endhighlight %}
14+
15+
voltage_source = td.DCVoltageSource(voltage=1)
16+
voltage_bc = td.VoltageBC(source=voltage_source)
17+
{% endhighlight %}
1518
{% include copy-button.html %}</div>
1619

1720
Note that the `voltage` argument can be an list or array, in which case all voltages will be simulated.
1821

1922
2) Current boundary ([CurrentBC](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.CurrentBC.html){: .color-primary-hover}), which sets a constant current and is commonly used to model a fixed current source.
2023

21-
<div markdown class="code-snippet">{% highlight python %}
24+
<div markdown class="code-snippet">
25+
{% highlight python %}
2226
import tidy3d as td
23-
current\_source = td.DCCurrentSource(current=1)
24-
current\_bc = td.CurrentBC(source=current\_source){% endhighlight %}
27+
28+
current_source = td.DCCurrentSource(current=1)
29+
current_bc = td.CurrentBC(source=current_source)
30+
{% endhighlight %}
2531
{% include copy-button.html %}</div>
2632

2733
The `current` argument must be a `float`.
2834

2935
3) Insulating boundary ([InsulatingBC](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.InsulatingBC.html){: .color-primary-hover}), which models an insulating boundary that blocks charge flow.
3036

31-
<div markdown class="code-snippet">{% highlight python %}
37+
<div markdown class="code-snippet">
38+
{% highlight python %}
3239
import tidy3d as td
33-
bc = td.InsulatingBC(){% endhighlight %}
40+
bc = td.InsulatingBC()
41+
{% endhighlight %}
3442
{% include copy-button.html %}</div>
3543

3644
This boundary condition is typically used to simulate surfaces or interfaces that do not allow charge to pass through.

docs/faq/how-can-i-define-a-semiconductor-material.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Date | Category |
44
|------------|-------------|
5-
| 2025-06-30 21:10:35 | Charge |
5+
| 2025-08-26 10:06:59 | Charge |
66

77

88
A semiconductor material is specified using the [`MultiPhysicsMedium`](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.components.material.multi_physics.MultiPhysicsMedium.html), by setting its `charge` property to a [`SemiconductorMedium`](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SemiconductorMedium.html). The required parameters for the [`SemiconductorMedium`](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SemiconductorMedium.html) are:

docs/faq/how-can-i-define-doping-profile.md

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Date | Category |
44
|------------|-------------|
5-
| 2025-06-30 21:10:35 | Charge |
5+
| 2025-08-26 10:06:59 | Charge |
66

77

88
Doping is defined as a box with a specific doping profile and is added to a [`SemiconductorMedium`](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.SemiconductorMedium.html) object.
@@ -16,12 +16,24 @@ The doping profile can be:
1616

1717
```python
1818
import tidy3d as td
19-
box\_coords = \[
20-
\[-1, -1, -1],
21-
\[1, 1, 1]
19+
20+
box_coords = [
21+
[-1, -1, -1],
22+
[1, 1, 1]
2223
]
23-
constant\_box1 = td.ConstantDoping(center=(0, 0, 0), size=(2, 2, 2), concentration=1e18)
24-
constant\_box2 = td.ConstantDoping.from\_bounds(rmin=box\_coords\[0], rmax=box\_coords\[1], concentration=1e18)```
24+
25+
constant_box1 = td.ConstantDoping(
26+
center=(0, 0, 0),
27+
size=(2, 2, 2),
28+
concentration=1e18
29+
)
30+
31+
constant_box2 = td.ConstantDoping.from_bounds(
32+
rmin=box_coords[0],
33+
rmax=box_coords[1],
34+
concentration=1e18
35+
)
36+
```
2537

2638

2739

@@ -31,26 +43,30 @@ constant\_box2 = td.ConstantDoping.from\_bounds(rmin=box\_coords\[0], rmax=box\_
3143

3244
```python
3345
import tidy3d as td
34-
box\_coords = \[
35-
\[-1, -1, -1],
36-
\[1, 1, 1]
46+
47+
box_coords = [
48+
[-1, -1, -1],
49+
[1, 1, 1]
3750
]
38-
gaussian\_box1 = td.GaussianDoping(
39-
center=(0, 0, 0),
40-
size=(2, 2, 2),
41-
ref\_con=1e15,
42-
concentration=1e18,
43-
width=0.1,
44-
source="xmin"
51+
52+
gaussian_box1 = td.GaussianDoping(
53+
center=(0, 0, 0),
54+
size=(2, 2, 2),
55+
ref_con=1e15,
56+
concentration=1e18,
57+
width=0.1,
58+
source="xmin"
59+
)
60+
61+
gaussian_box2 = td.GaussianDoping.from_bounds(
62+
rmin=box_coords[0],
63+
rmax=box_coords[1],
64+
ref_con=1e15,
65+
concentration=1e18,
66+
width=0.1,
67+
source="xmin"
4568
)
46-
gaussian\_box2 = td.GaussianDoping.from\_bounds(
47-
rmin=box\_coords\[0],
48-
rmax=box\_coords\[1],
49-
ref\_con=1e15,
50-
concentration=1e18,
51-
width=0.1,
52-
source="xmin"
53-
)```
69+
```
5470

5571

5672

0 commit comments

Comments
 (0)