Skip to content

Commit b2b8ed4

Browse files
authored
Merge pull request #693 from awslabs/simlapointe/floquet-port-clean
Add Floquet port boundary condition
2 parents 41e194e + 775deef commit b2b8ed4

47 files changed

Lines changed: 3267 additions & 155 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ The format of this changelog is based on
4242
validation and can be used to re-run the same simulation deterministically; it can also
4343
be printed without running via `--dry-run` [PR 719](https://github.com/awslabs/palace/pull/719).
4444
- Enable S-parameters calculations when both lumped and wave ports are present [PR 743](https://github.com/awslabs/palace/pull/743).
45+
- Added Floquet port boundary conditions for frequency-domain driven simulations on
46+
periodic structures, with support for oblique incidence, multi-order diffraction,
47+
TE/TM/circular polarization, and adaptive frequency sweeps. [PR 693](https://github.com/awslabs/palace/pull/693).
4548

4649
#### Interface Changes
4750

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ makedocs(
9999
"examples/cylinder.md",
100100
"examples/coaxial.md",
101101
"examples/cpw.md",
102-
"examples/cpw2d.md"
102+
"examples/cpw2d.md",
103+
"examples/dielectric_grating.md"
103104
],
104105
"faq.md",
105106
"For Developers" => Any[
128 KB
Loading
124 KB
Loading
122 KB
Loading

docs/src/config/boundaries.md

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ SPDX-License-Identifier: Apache-2.0
4242
{
4343
...
4444
},
45+
"FloquetPort":
46+
[
47+
...
48+
],
4549
"SurfaceCurrent":
4650
[
4751
...
@@ -121,6 +125,15 @@ wave port boundary mode analysis, overriding any other boundary condition assign
121125
attributes. Only relevant when wave port boundaries are specified under
122126
[`config["Boundaries"]["WavePort"]`](#boundaries%5B%22WavePort%22%5D).
123127

128+
`"FloquetPort"` : Array of objects for configuring Floquet port boundary conditions for
129+
periodic structures. Floquet ports provide absorbing boundary conditions for diffraction
130+
gratings and other periodic electromagnetic devices, enabling the computation of
131+
diffraction efficiencies (S-parameters) for multiple propagating orders. Floquet port
132+
boundaries are only available for frequency domain driven simulations and **require periodic
133+
boundary conditions** to be configured under
134+
[`config["Boundaries"]["Periodic"]`](#boundaries%5B%22Periodic%22%5D) with exactly two
135+
`"BoundaryPairs"` (periodicity in two transverse directions).
136+
124137
`"SurfaceCurrent"` : Array of objects for configuring surface current boundary conditions.
125138
This boundary prescribes a unit source surface current excitation on the given boundary in
126139
order to excite a frequency or time domain driven simulation or magnetostatic simulation.
@@ -482,6 +495,62 @@ with
482495
impedance, absorbing, or conductivity boundary condition that may be assigned to the same
483496
attributes for the purpose of the 2D wave port boundary mode problem.
484497

498+
## `boundaries["FloquetPort"]`
499+
500+
```json
501+
"FloquetPort":
502+
[
503+
{
504+
"Index": <int>,
505+
"Attributes": [<int array>],
506+
"Excitation": <bool>,
507+
"IncidentPolarization": <string>,
508+
"MaxOrder": <int>
509+
},
510+
...
511+
]
512+
```
513+
514+
with
515+
516+
`"Index" [None]` : Index of this Floquet port, used in postprocessing output files.
517+
518+
`"Attributes" [None]` : Integer array of mesh boundary attributes for this Floquet port
519+
boundary. The port face must be planar and lie on the true boundary of the computational
520+
domain (one-sided, like wave ports). The medium adjacent to the port must be homogeneous
521+
and isotropic.
522+
523+
!!! note "Periodic boundary conditions required"
524+
525+
Floquet ports require periodic boundary conditions
526+
([`config["Boundaries"]["Periodic"]`](#boundaries%5B%22Periodic%22%5D)) with exactly
527+
two `"BoundaryPairs"` defining periodicity in the two transverse directions. The
528+
`"FloquetWaveVector"` in the periodic configuration determines the angle of incidence:
529+
zero for normal incidence, nonzero for oblique. The wave vector is specified in radians
530+
per mesh length unit.
531+
532+
`"Excitation" [false]` : Turns on or off port excitation for this Floquet port boundary.
533+
When excited, a plane wave in the specular (0,0) diffraction order is injected with unit
534+
power.
535+
536+
`"IncidentPolarization" ["TE"]` : Polarization of the incident plane wave. Available
537+
options are:
538+
539+
- `"TE"` : Transverse electric (s-polarization). Electric field perpendicular to the
540+
plane of incidence.
541+
- `"TM"` : Transverse magnetic (p-polarization). Electric field in the plane of
542+
incidence.
543+
- `"RHC"` : Right-hand circular polarization. Equal superposition of TE and TM with
544+
90° phase shift: ``\mathbf{E} = (\hat{e}_\text{TE} + j\hat{e}_\text{TM})/\sqrt{2}``.
545+
- `"LHC"` : Left-hand circular polarization. Equal superposition of TE and TM with
546+
-90° phase shift: ``\mathbf{E} = (\hat{e}_\text{TE} - j\hat{e}_\text{TM})/\sqrt{2}``.
547+
548+
`"MaxOrder" [-1]` : Maximum diffraction order index to include. With `MaxOrder = M`, all
549+
orders ``(m, n)`` with ``|m| \leq M`` and ``|n| \leq M`` are included, each with both TE
550+
and TM polarizations. A value of `-1` (default) enables automatic selection. A value of `0`
551+
includes only the specular (0,0) order. Higher values are needed when the periodic cell
552+
supports propagating higher-order diffraction.
553+
485554
## `boundaries["SurfaceCurrent"]`
486555

487556
```json
@@ -599,6 +668,7 @@ boundary.
599668
"Periodic":
600669
{
601670
"FloquetWaveVector": [<float array>],
671+
"FloquetReferenceFrequency": <float>,
602672
"BoundaryPairs":
603673
[
604674
{
@@ -631,7 +701,28 @@ to the receiver attribute in mesh units. If neither `"Translation"` or `"AffineT
631701
specified, the transformation between donor and receiver boundaries is automatically detected.
632702

633703
`"FloquetWaveVector" [None]` : Optional floating point array defining the phase delay between the
634-
periodic boundaries in the X/Y/Z directions in radians per mesh unit.
704+
periodic boundaries in the X/Y/Z directions in radians per mesh unit. When used with
705+
`"FloquetReferenceFrequency"`, it is defined at the reference frequency.
706+
707+
For a Floquet port, this is the tangential component of the incident wave vector. For example,
708+
for a port normal to z with periodicity in x and y, the `"FloquetWaveVector"`,
709+
``\bm{k}_{F,\mathrm{ref}}``, can be computed from the incidence and azimuthal angles as
710+
711+
```math
712+
k_{F,\mathrm{ref},x} = k_\mathrm{ref}\sin\theta\cos\phi,\qquad
713+
k_{F,\mathrm{ref},y} = k_\mathrm{ref}\sin\theta\sin\phi,
714+
```
715+
716+
where ``k_\mathrm{ref} = \frac{2\pi f_\mathrm{ref}}{c_0}\sqrt{\mu_r\varepsilon_r},``, where
717+
``f_\mathrm{ref}`` is the `"FloquetReferenceFrequency"`, ``\theta`` is the incidence angle away
718+
from the port normal, and ``\phi`` is the azimuthal direction in the periodic plane.
719+
720+
`"FloquetReferenceFrequency" [None]` : Optional frequency in GHz at which the
721+
`"FloquetWaveVector"` is defined. When specified, the Bloch wave vector scales linearly with
722+
frequency during a driven simulation frequency sweep,
723+
``\bm{k}_F(f) = \bm{k}_{F,\mathrm{ref}} f / f_\mathrm{ref}``, preserving the incidence
724+
angles across the sweep. When not specified (default), the wave vector is held constant
725+
across all frequencies. Only supported for driven simulations.
635726

636727
## `boundaries["Postprocessing"]["SurfaceFlux"]`
637728

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
```@raw html
2+
<!---
3+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
SPDX-License-Identifier: Apache-2.0
5+
--->
6+
```
7+
8+
# Floquet Ports for a Dielectric Grating
9+
10+
!!! note
11+
12+
The files for this example can be found in the
13+
[`examples/dielectric_grating/`](https://github.com/awslabs/palace/blob/main/examples/dielectric_grating)
14+
directory of the *Palace* source code.
15+
16+
This example demonstrates the use of Floquet port boundary conditions for computing
17+
diffraction efficiencies (S-parameters) of a 3D periodic dielectric grating. A TE-polarized
18+
plane wave is incident at 30° oblique incidence on a unit cell containing a dielectric bar,
19+
and the reflected and transmitted power in each diffraction order is computed over a
20+
frequency sweep.
21+
22+
The computational domain is a single unit cell of a doubly-periodic structure with periods
23+
``a = 4\text{ cm}`` in x and ``b = 1\text{ cm}`` in y. The total domain height is
24+
``2L = 8\text{ cm}`` in z. A dielectric bar (``\varepsilon_r = 7``) of dimensions
25+
``2 \times 0.5 \times 0.5\text{ cm}`` is centered at the origin, surrounded by vacuum
26+
(``\varepsilon_r = 1``). Floquet port boundaries are placed at ``z = \pm 4\text{ cm}`` and
27+
periodic boundary conditions with a Bloch phase shift are applied on the x and y faces. The
28+
Floquet wave vector ``\bm{k}_F = (0, 1.0479, 0)\text{ cm}^{-1}`` at the reference
29+
frequency of ``10\text{ GHz}`` corresponds to 30° oblique incidence, and scales linearly
30+
with frequency to maintain a constant incidence angle across the sweep.
31+
32+
The unit cell geometry is shown below. The translucent blue volume is vacuum
33+
(``\varepsilon_r = 1``), and the orange volume is the dielectric bar
34+
(``\varepsilon_r = 7``).
35+
36+
```@raw html
37+
<br/><p align="center">
38+
<img src="../../assets/examples/dielectric_grating_geometry.png" width="60%" />
39+
</p><br/>
40+
```
41+
42+
The domain is discretized with a structured hexahedral mesh generated by
43+
[`mesh/mesh.jl`](https://github.com/awslabs/palace/blob/main/examples/dielectric_grating/mesh/mesh.jl)
44+
using Gmsh. A second-order finite element approximation (``p = 2``) is used for the
45+
solution. Two configuration files are provided:
46+
47+
- [`dielectric_grating_uniform.json`](https://github.com/awslabs/palace/blob/main/examples/dielectric_grating/dielectric_grating_uniform.json):
48+
Uniform sweep from 2 to 12 GHz with ``\Delta f = 2.0\text{ GHz}`` (6 frequency points).
49+
- [`dielectric_grating_adaptive.json`](https://github.com/awslabs/palace/blob/main/examples/dielectric_grating/dielectric_grating_adaptive.json):
50+
Adaptive fast frequency sweep from 2 to 12 GHz with initial step
51+
``\Delta f = 0.05\text{ GHz}`` and tolerance ``10^{-3}``.
52+
53+
The S-parameter magnitudes from the uniform (markers) and adaptive (lines) sweeps are shown
54+
below:
55+
56+
```@raw html
57+
<br/><p align="center">
58+
<img src="../../assets/examples/dielectric_grating_reflection.png" width="70%" />
59+
<img src="../../assets/examples/dielectric_grating_transmission.png" width="70%" />
60+
</p><br/>
61+
```
62+
63+
The adaptive sweep captures the sharp spectral features with high fidelity while using only
64+
a modest number of frequency samples, and agrees well with the uniform sweep results.
65+
66+
Below the Rayleigh anomaly at 8.66 GHz (dashed line), only the specular (0,0)TE mode carries
67+
power — the grating behaves as a partially reflecting dielectric slab. Above 8.66 GHz, the
68+
first-order (±1,0) diffraction modes become propagating and appear as additional reflection and
69+
transmission channels. Near the Rayleigh anomaly, a sharp *Fano resonance* appears around
70+
8.3 GHz: the incident wave couples to a leaky guided mode of the dielectric slab, producing
71+
a characteristic asymmetric lineshape with a sharp reflection peak and transmission dip.

docs/src/examples/examples.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ more details.
2525
- [Signal Propagation in a Coaxial Cable](coaxial.md)
2626
- [Crosstalk Between Coplanar Waveguides](cpw.md)
2727
- [2D Coplanar Waveguide Mode Analysis](cpw2d.md)
28+
- [Floquet Ports for a Dielectric Grating](dielectric_grating.md)

docs/src/guide/boundaries.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,35 @@ for implementation details.
151151
points from the signal attribute toward the ground attribute. Lightweight
152152
polarity-only alternative to `"VoltagePath"` (no GSLIB).
153153

154+
- [`config["Boundaries"]["FloquetPort"]`](../config/boundaries.md#boundaries%5B%22FloquetPort%22%5D) :
155+
Floquet ports are available for frequency domain driven simulations on periodic
156+
structures (gratings, metasurfaces, photonic crystals). They provide an absorbing
157+
boundary condition that decomposes the scattered field into Floquet diffraction orders
158+
and extracts power-normalized S-parameters for each propagating order.
159+
160+
Floquet ports require periodic boundary conditions to be configured under
161+
[`config["Boundaries"]["Periodic"]`](../config/boundaries.md#boundaries%5B%22Periodic%22%5D).
162+
The `"FloquetWaveVector"` in the periodic configuration specifies the tangential
163+
component of the incident wave vector, which determines the angle of incidence. For
164+
normal incidence, set the wave vector to zero. For frequency sweeps at a fixed angle
165+
of incidence, set `"FloquetReferenceFrequency"` to the frequency (in GHz) at which the
166+
wave vector is defined. The wave vector then scales linearly with frequency according
167+
to ``\bm{k}_F(f) = \bm{k}_{F,\mathrm{ref}} f / f_\mathrm{ref}``, where
168+
``\bm{k}_{F,\mathrm{ref}}`` is `"FloquetWaveVector"` and ``f_\mathrm{ref}`` is
169+
`"FloquetReferenceFrequency"`, maintaining a constant incidence angle across the sweep.
170+
171+
The incident field is a plane wave in the specular (0,0) diffraction order with
172+
user-specified polarization (TE, TM, or circular RHC/LHC). S-parameters are extracted
173+
for all propagating diffraction orders within `"MaxOrder"` and reported in the
174+
`port-floquet-S.csv` output file. Each mode is labeled as
175+
`S[P<port>(<m>,<n>)<pol>][<exc>]` where `<port>` is the port index, `(<m>,<n>)` is
176+
the diffraction order, `<pol>` is the polarization (TE/TM or RHC/LHC for circular
177+
excitation), and `<exc>` is the excitation index. Values of `nan` are given to non-propagating
178+
modes.
179+
180+
The port boundary must be planar and on the true boundary of the computational domain.
181+
The medium adjacent to the port must be homogeneous and isotropic.
182+
154183
For each port, the excitation is normalized to have unit incident power over the port boundary
155184
surface.
156185

@@ -182,9 +211,10 @@ can only be part of one excitation.
182211

183212
Any `"Index"` of [`"LumpedPort"`](../config/boundaries.md#boundaries%5B%22LumpedPort%22%5D),
184213
[`"WavePort"`](../config/boundaries.md#boundaries%5B%22WavePort%22%5D),
214+
[`"FloquetPort"`](../config/boundaries.md#boundaries%5B%22FloquetPort%22%5D),
185215
[`"SurfaceCurrent"`](../config/boundaries.md#boundaries%5B%22SurfaceCurrent%22%5D), or
186216
[`"Terminal"`](../config/boundaries.md#boundaries%5B%22Terminal%22%5D) must be unique, including between
187-
different boundary conditions types (e.g. you can not have an lumped port and wave port both with
217+
different boundary conditions types (e.g. you can not have a lumped port and wave port both with
188218
`Index: 5`).
189219

190220
## Surface current excitation

0 commit comments

Comments
 (0)