setupEM 0.6.4__tar.gz → 0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- setupem-0.7.2/PKG-INFO +110 -0
- {setupem-0.6.4 → setupem-0.7.2}/README.md +33 -19
- setupem-0.7.2/README_pypi.md +83 -0
- {setupem-0.6.4 → setupem-0.7.2}/pyproject.toml +10 -1
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/__init__.py +1 -1
- setupem-0.7.2/src/setupEM/field_viewer.py +1159 -0
- setupem-0.7.2/src/setupEM/layout_preview.py +876 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/palace_results.py +22 -3
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/result_viewer.py +368 -98
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/setupEM.py +1172 -157
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/setupThermal.py +622 -32
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/setup_common.py +1045 -100
- setupem-0.7.2/src/setupEM/simplify_gds.py +535 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/stackupEditor.py +118 -14
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/stackup_writer.py +55 -1
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/thermal_results.py +74 -4
- setupem-0.7.2/src/setupEM.egg-info/PKG-INFO +110 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM.egg-info/SOURCES.txt +3 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM.egg-info/entry_points.txt +1 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM.egg-info/requires.txt +3 -0
- setupem-0.6.4/PKG-INFO +0 -347
- setupem-0.6.4/README_pypi.md +0 -326
- setupem-0.6.4/src/setupEM.egg-info/PKG-INFO +0 -347
- {setupem-0.6.4 → setupem-0.7.2}/LICENSE +0 -0
- {setupem-0.6.4 → setupem-0.7.2}/setup.cfg +0 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/__main__.py +0 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/data/SG13G2_100um.xml +0 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/data/SG13G2_200um.xml +0 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/data/SG13G2_200um_with_parameters.xml +0 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/data/SG13G2_nosub.xml +0 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM/momentum_import.py +0 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM.egg-info/dependency_links.txt +0 -0
- {setupem-0.6.4 → setupem-0.7.2}/src/setupEM.egg-info/top_level.txt +0 -0
setupem-0.7.2/PKG-INFO
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: setupEM
|
|
3
|
+
Version: 0.7.2
|
|
4
|
+
Summary: Python tool for configuration of gds2palace workflow with GUI.
|
|
5
|
+
Author-email: Volker Muehlhaus <volker@muehlhaus.com>
|
|
6
|
+
License-Expression: GPL-3.0-or-later
|
|
7
|
+
Project-URL: Homepage, https://github.com/VolkerMuehlhaus/setupEM
|
|
8
|
+
Project-URL: Repository, https://github.com/VolkerMuehlhaus/setupEM
|
|
9
|
+
Project-URL: Changelog, https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc/CHANGES.md
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: gds2palace>=0.4.3
|
|
14
|
+
Requires-Dist: gds_prepare_for_EM>=1.2.0
|
|
15
|
+
Requires-Dist: PySide6
|
|
16
|
+
Requires-Dist: shiboken6
|
|
17
|
+
Requires-Dist: scipy
|
|
18
|
+
Requires-Dist: requests
|
|
19
|
+
Requires-Dist: scikit-rf
|
|
20
|
+
Requires-Dist: matplotlib
|
|
21
|
+
Requires-Dist: numpy
|
|
22
|
+
Requires-Dist: gdspy
|
|
23
|
+
Requires-Dist: meshio
|
|
24
|
+
Requires-Dist: pyvista
|
|
25
|
+
Requires-Dist: pyvistaqt
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# Python GUI for gds2palace
|
|
29
|
+
|
|
30
|
+
[gds2palace](https://github.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2) enables an **RFIC FEM simulation** workflow where GDSII layout files are simulated using the [Palace FEM solver by AWS](https://awslabs.github.io/palace/stable/). setupEM provides a Python-based **graphical user interface** to configure and run gds2palace, instead of creating the simulation model code manually, and also start simulation in Palace.
|
|
31
|
+
|
|
32
|
+
When you install setupEM, the gds2palace workflow is automatically installed in the background. This enables **creating a simulation model** for AWS Palace. To actually **run the simulation**, you need to have AWS Palace installed, as described below. Palace installation is **not** done automatically!
|
|
33
|
+
|
|
34
|
+
The setupEM package now includes setupThermal also, which is the equivalent of setupEM for thermal models using [Elmer](https://www.elmerfem.org/blog/). To run a thermal model in Elmer, you need to have Elmer installed. Elmer installation is **not** done automatically!
|
|
35
|
+
|
|
36
|
+
An overview of the SetupEM user interface is given below in chapter "Using setupEM"
|
|
37
|
+
|
|
38
|
+
Two more external tools are used by parts of the workflow, and are not installed automatically:
|
|
39
|
+
|
|
40
|
+
- [ParaView](https://www.paraview.org/) — optional, for viewing field-dump output (Palace/Elmer EM) and Elmer thermal result files with ParaView itself instead of the built-in 3D field viewer. Not required: the built-in viewer needs nothing extra installed and is the default.
|
|
41
|
+
- An MPI implementation — only needed for multi-process Elmer runs (the Elmer solver settings' multithreading option). Use OpenMPI or MPICH on Linux/macOS; on Windows, install [Microsoft MPI](https://learn.microsoft.com/en-us/message-passing-interface/microsoft-mpi) (setupEM checks for this and shows a download link if it's missing).
|
|
42
|
+
|
|
43
|
+
## Install
|
|
44
|
+
|
|
45
|
+
pip install setupEM
|
|
46
|
+
|
|
47
|
+
**Full documentation, installation guide, and usage walkthrough:**
|
|
48
|
+
https://github.com/VolkerMuehlhaus/setupEM
|
|
49
|
+
|
|
50
|
+
## Recent changes
|
|
51
|
+
|
|
52
|
+
# What's New - September 14, 2026
|
|
53
|
+
|
|
54
|
+
Added a built-in **3D field viewer**, an in-app alternative to launching external ParaView, for setupEM (Palace and Elmer-as-EM-solver) and setupThermal (Elmer thermal) field-dump results: an axis-aligned clip plane with a **Find max.** button, standard CAD/ParaView-style axis-view buttons, tailored per-solver color defaults with a manual range override, opacity and mesh-edge overlay controls, and an arrow overlay with a size slider for vector fields. **View fields in Paraview...** and the previous separate 3D-viewer button are now one **View fields (...)...** button, whose label shows which viewer it opens - choose Built-in (new default) or ParaView on the new **Preferences > Viewer** tab, with automatic fallback to Built-in (and a log message) if ParaView isn't found.
|
|
55
|
+
|
|
56
|
+
Layout Preview now shows a via port's effective centerline when its drawn marker has finite size in both x and y, since gds2palace's `add_ports()` collapses the shorter axis down to its minimum edge (not the true center) when building the actual simulated port sheet.
|
|
57
|
+
|
|
58
|
+
# What's New - September 8-12, 2026
|
|
59
|
+
|
|
60
|
+
Added two reserved stackup materials that need no `<Materials>` entry: `PEC` (ideal conductor, on conductor/via/sheet Layers) and `AIR` (built-in default dielectric, overridable).
|
|
61
|
+
|
|
62
|
+
Added a **live solver-status line** below the log during a Palace run, showing MPI process count, estimated total memory, current port/frequency progress, and AMR iteration - updates as Palace's own console output streams in, without waiting for the run to finish. It clears when loading a different model/config file or creating a new mesh, instead of showing a previous run's stale data.
|
|
63
|
+
|
|
64
|
+
Added a **memory limit** for Palace runs (Preferences > Palace, "Stop Palace if memory exceeds", default 100 GB): if the solver's own reported memory usage crosses this, setupEM terminates it automatically and still runs S-parameter postprocessing on whatever results were already computed, instead of losing the whole run to an out-of-memory crash.
|
|
65
|
+
|
|
66
|
+
The **Result Viewer** can now show S-parameter results from a still-running (or crashed/stopped) multi-iteration AMR run, reading Palace's raw per-iteration output directly instead of waiting for the whole run to finish.
|
|
67
|
+
|
|
68
|
+
Added a **Layout Preview** which can be accessed from Input Files tab or Tools menu, including display of port location and direction. Layout layers selected in Stackup Preview will be highlighted in Layout preview.
|
|
69
|
+
|
|
70
|
+
Added **Tools > Simplify GDS...** (setupEM and setupThermal), which removes floating (unconnected) metal fill and/or fills in small cutouts on the currently loaded GDS file, writing the result to a new GDS file. The metal layers it operates on come entirely from the currently loaded XML stackup. Defaults are configurable on a new Preferences > Simplify GDS tab. A **Compare in Layout Preview** button opens the original and simplified layouts side by side.
|
|
71
|
+
|
|
72
|
+
**Layer numbers for port shapes** are now auto-detected when creating port configuration. Layer range is set in the Preferences dialog.
|
|
73
|
+
|
|
74
|
+
Added a **File > Preferences...** dialog (setupEM and setupThermal) for changing the built-in defaults of fields that were previously hardcoded.
|
|
75
|
+
|
|
76
|
+
The **Cellname** dropdown now shows an explicit "(default)" entry instead of a blank one.
|
|
77
|
+
|
|
78
|
+
# What's New - September 1-6, 2026
|
|
79
|
+
|
|
80
|
+
The stackup cross-section preview (**Show stackup**, and the Stackup Editor's live preview) is now interactive: click a dielectric, metal, or via to see its name, material, and z-position/thickness in a flyout. In the Stackup Editor, clicking a shape also selects the matching row in the Dielectric Stack/Layers tables, and selecting a row highlights the matching shape in the preview.
|
|
81
|
+
|
|
82
|
+
The Stackup Editor now closes itself automatically when a different substrate XML is chosen in the main window, if it has no unsaved changes, instead of staying open showing a file that no longer matches what's selected.
|
|
83
|
+
|
|
84
|
+
setupThermal now has an **Elmer solver settings** group (Mesh tab), matching setupEM's, to choose between the iterative and direct linear solver for the Elmer thermal solve - defaults to direct. Previously this could only be set by hand-editing the generated model script, and the setting was silently dropped even then.
|
|
85
|
+
|
|
86
|
+
ParaView launching (Palace and Elmer EM field dumps, Elmer thermal results) now prefers a `.pvtu` file over loose `.vtu` pieces when one exists, so a multi-partition (MPI) run opens as one combined dataset instead of disconnected fragments.
|
|
87
|
+
|
|
88
|
+
The Frequencies tab's field-dump control is now solver-aware: Elmer mode shows a plain **"Enable field dump"** checkbox instead of a frequency list, since Elmer has no per-frequency `SaveStep` like Palace - any `fdump` value there dumps fields at *every* solved frequency (sweep and `fpoint` together), so listing specific frequencies was misleading. Palace mode is unchanged, keeping its per-frequency `fdump` list. This also sidesteps a gds2palace bug (see its own CHANGES.md) where a frequency listed in both the sweep and `fdump` was silently solved twice.
|
|
89
|
+
|
|
90
|
+
Full history: [CHANGES.md](https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc/CHANGES.md)
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
**Note:** the `setupEM` PyPI package itself requires:
|
|
95
|
+
|
|
96
|
+
- gds2palace>=0.4.3
|
|
97
|
+
- gds_prepare_for_EM>=1.2.0
|
|
98
|
+
- PySide6
|
|
99
|
+
- shiboken6
|
|
100
|
+
- scipy
|
|
101
|
+
- requests
|
|
102
|
+
- scikit-rf
|
|
103
|
+
- matplotlib
|
|
104
|
+
- numpy
|
|
105
|
+
- gdspy
|
|
106
|
+
- meshio
|
|
107
|
+
- pyvista
|
|
108
|
+
- pyvistaqt
|
|
109
|
+
|
|
110
|
+
(Other Python modules mentioned above are only needed to run standalone helper scripts in this repository, not to use the installed package.)
|
|
@@ -2,15 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## What's New
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- **Result Viewer** (Create Model tab > View Results...) plots Touchstone S-parameter results - dB/phase, Smith chart, zoomed Smith chart - without leaving setupEM. See section "[Result Viewer](#result-viewer)".
|
|
8
|
-
- **Model Fit** (Create Model tab > Model Fit...) launches [snp2le](https://github.com/iic-jku/snp2le), an external open-source tool that extracts a lumped-element SPICE/Spectre netlist from S-parameter results - offering to install it via pip if it isn't already present. See section "[Model Fit](#model-fit)".
|
|
9
|
-
|
|
10
|
-
- A graphical **Stackup XML Editor** (Tools > Edit Stackup XML...), including Variables, Reference-relative positioning, Derived Layers, and Thermal Tables
|
|
11
|
-
- The stackup preview graphics are **interactive**: click a shape for its properties, and selection syncs both ways with the Stackup Editor's tables
|
|
12
|
-
- Input Files tab can now **override stackup Variables** (e.g. `total_thickness`) directly, without hand-editing the XML or the generated model
|
|
13
|
-
- **setupThermal**, a companion app for Elmer thermal simulation, alongside setupEM
|
|
5
|
+
Reserved PEC/AIR stackup materials, Layout Preview, Results viewer, Model Fit, built-in 3D field viewer, GDSII Layout Simplification, XML Stackup Editor, setupThermal for Elmer thermal simulation.
|
|
14
6
|
|
|
15
7
|
See [CHANGES.md](doc/CHANGES.md) for details.
|
|
16
8
|
|
|
@@ -26,7 +18,7 @@ An overview of the SetupEM user interface is given below in chapter "Using setup
|
|
|
26
18
|
|
|
27
19
|
Two more external tools are used by parts of the workflow, and are not installed automatically:
|
|
28
20
|
|
|
29
|
-
- [ParaView](https://www.paraview.org/) —
|
|
21
|
+
- [ParaView](https://www.paraview.org/) — optional, for viewing field-dump output (Palace/Elmer EM) and Elmer thermal result files with ParaView itself instead of the built-in 3D field viewer (see [3D Field Viewer](#3d-field-viewer) below). Not required: the built-in viewer needs nothing extra installed and is the default.
|
|
30
22
|
- An MPI implementation — only needed for multi-process Elmer runs (the Elmer solver settings' multithreading option). Use OpenMPI or MPICH on Linux/macOS; on Windows, install [Microsoft MPI](https://learn.microsoft.com/en-us/message-passing-interface/microsoft-mpi) (setupEM checks for this and shows a download link if it's missing).
|
|
31
23
|
|
|
32
24
|
|
|
@@ -36,21 +28,18 @@ Two more external tools are used by parts of the workflow, and are not installed
|
|
|
36
28
|
For development of this workflow, Palace was installed using the Singularity/Apptainer installation method. This was rather simple and straightforward, even with no knowledge about container usage. The resulting apptainer file palace.sif can be integrated very easily in a Linux system like the Ubuntu 24.04 system used here, and can then be moved to other Linux machines using simple copy of the container file. The script to start Palace from the apptainer is included in the scripts directory in this repository.
|
|
37
29
|
|
|
38
30
|
Notes on installing the Palace solver using **apptainer** container manager:
|
|
39
|
-
[Installing Palace using Apptainer](https://github.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2/blob/main/doc/
|
|
31
|
+
[Installing Palace using Apptainer](https://github.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2/blob/main/doc/building-palace-apptainer.md)
|
|
40
32
|
|
|
41
33
|
Using the spack package manager, Palace can also be created from source with a few simple commands. All tools required by the build process will be downloaded and installed automatically by spack, so you can sit and watch while your system builds the software.
|
|
42
34
|
|
|
43
35
|
Notes in compiling Palace using the **spack package manager for Linux**:
|
|
44
|
-
[Installing Palace using spack](
|
|
45
|
-
|
|
46
|
-
Thread on compiling Palace using the **spack package manager for MacOS**:
|
|
47
|
-
[Spack install for MacOS outdated?](https://github.com/awslabs/palace/issues/581)
|
|
36
|
+
[Installing Palace using spack](https://github.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2/blob/main/doc/building-palace-spack.md)
|
|
48
37
|
|
|
49
38
|
You can use any of the installation methods described on the AWS Palace web site. The gds2palace workflow does not change, it only creates the input files for Palace and does not care how you installed Palace, or on what platform you run the actual Palace simulation from these model files. To start Palace from setupEM, a wrapper script **run_palace** is used, and this is where you point to your actual installation (even remote copy & remote simulation is possible).
|
|
50
39
|
|
|
51
40
|
|
|
52
41
|
# Installation of setupEM (including gds2palace workflow files)
|
|
53
|
-
As a Python program that uses the Qt library, setupEM works on Linux, Windows, MacOS and other platforms. The Palace solver itself is designed for Linux systems, but can you install it using the Windows Subsystem for Linux (WSL). Palace also works well on MacOS, installed using spack
|
|
42
|
+
As a Python program that uses the Qt library, setupEM works on Linux, Windows, MacOS and other platforms. The Palace solver itself is designed for Linux systems, but can you install it using the Windows Subsystem for Linux (WSL). Palace also works well on MacOS, installed using spack.
|
|
54
43
|
|
|
55
44
|
To install setupEM, activate the Python venv where you want to install.
|
|
56
45
|
|
|
@@ -87,6 +76,7 @@ sudo apt install libxcb-cursor0 libxcb-xinerama0 libxcb-xkb1 libxcb-icccm4 libxc
|
|
|
87
76
|
## Dependencies
|
|
88
77
|
The setupEM module also installs these dependencies:
|
|
89
78
|
- gds2palace
|
|
79
|
+
- gds_prepare_for_EM
|
|
90
80
|
- PySide6
|
|
91
81
|
- shiboken6
|
|
92
82
|
- scipy
|
|
@@ -96,6 +86,8 @@ The setupEM module also installs these dependencies:
|
|
|
96
86
|
- numpy
|
|
97
87
|
- gdspy
|
|
98
88
|
- meshio
|
|
89
|
+
- pyvista
|
|
90
|
+
- pyvistaqt
|
|
99
91
|
|
|
100
92
|
---
|
|
101
93
|
|
|
@@ -172,9 +164,9 @@ Parameter "Mesh refinement at the edges" does what the name says, this is parame
|
|
|
172
164
|
|
|
173
165
|
Parameter "Mesh cell maximum size absolute" works in combination with the cells/wavelength value, the mesh will use the lower of these two dimensions.
|
|
174
166
|
|
|
175
|
-
Parameter "Mesh basis function" is an expert setting that controls the order of FEM basis function
|
|
167
|
+
Parameter "Mesh basis function" is an expert setting that controls the order of FEM basis function, with three levels: "faster, less accurate" (order 1), "recommended" (order 2, the default), and "slower, most accurate" (order 3, Palace only - not available in Elmer mode, since Elmer has no cubic-order solver). Use the default "recommended" setting unless you specifically want a faster, less accurate run, or need the extra accuracy of order 3.
|
|
176
168
|
|
|
177
|
-
Parameter "Adaptive mesh iterations" does what the name says: Palace offers adaptive mesh refinement (AMR) but if we use mesh basis function order 2 ("
|
|
169
|
+
Parameter "Adaptive mesh iterations" does what the name says: Palace offers adaptive mesh refinement (AMR) but if we use mesh basis function order 2 ("recommended") with mesh refinement of 2 micron or so, the initial mesh is usually fine enough and we don't need AMR. Starting from a coarse mesh plus AMR usually takes more simulation time than going for a finer initial mesh without AMR. If you experience something different, your feedback and example is much appreciated! When AMR iterations is non-zero, "AMR goal" (relative error tolerance) and "AMR maximum DOF" control when Palace stops refining, whichever limit is hit first - the defaults rarely need changing.
|
|
178
170
|
|
|
179
171
|
For the boundary conditions, absorbing boundary and pefect electric conductor are supported at the present time. You can specify the oversize of the dielectric layers from the metal drawing, and the additional layer of air that srrounds everything. **Both these distances must NOT be zero, otherwise you will get mesh errors!**
|
|
180
172
|
|
|
@@ -245,18 +237,40 @@ Once snp2le is available, Model Fit locates the raw (not `_dc`, not `_deembedded
|
|
|
245
237
|
|
|
246
238
|
If no raw result file exists yet (no simulation has been run), Model Fit shows a warning instead of starting snp2le - run a simulation first.
|
|
247
239
|
|
|
240
|
+
## 3D Field Viewer
|
|
241
|
+
|
|
242
|
+
Once field-dump results are available (Palace: set `fdump`; Elmer: enable field dump), click **View fields (...)...** on the Create Model tab to open them - the "..." in the label shows which viewer it opens, **Built-in** or **ParaView**, per the setting described below.
|
|
243
|
+
|
|
244
|
+
<img src="./doc/png/fieldviewer1.png" alt="3D field viewer" width="750">
|
|
245
|
+
|
|
246
|
+
The built-in viewer has a single, axis-aligned clip plane (X/Y/Z + a position slider, shown in µm) to see a cross-section through the model, rather than a free-orientation drag-widget - **Find max.** jumps the plane straight to the largest value of the currently selected field along that axis. Standard CAD/ParaView-style **+X/-X/+Y/-Y/+Z/-Z** buttons snap the camera to look straight down each axis; the clip plane's kept side follows whichever of these you last used for its axis, so the exposed cut face always faces the camera instead of occasionally showing the model's untouched exterior surface.
|
|
247
|
+
|
|
248
|
+
The **Field** panel picks which array to color by, defaulting to E-field magnitude (log color scale) for Palace and Elmer-as-EM-solver mode, or temperature (linear) for Elmer thermal - the Min/Max fields let you override the color range manually, with a button to reset back to the data's own range. **Display** controls opacity (to see a hotspot through the surrounding material without losing the outer shape as context) and a mesh-edge overlay. If more than one equally-valid result file exists (e.g. Palace's main "driven" field dump and its separate "driven_boundary" one), a **Result File** picker lets you choose between them instead of guessing.
|
|
249
|
+
|
|
250
|
+
For a vector array (E/B-field, Poynting vector `S`, ...), **Show arrows** overlays direction arrows on top of the color, auto-scaled from the field's own magnitude on a log scale so both weak and strong regions stay visible instead of only the single hottest point - the **Arrow size** slider (0.5% steps) scales them to taste, and also controls how densely they're packed in, since smaller arrows can sit closer together than large ones without turning into a solid block.
|
|
251
|
+
|
|
252
|
+
<img src="./doc/png/fieldviewer2.png" alt="3D field viewer, vector arrows on the Poynting vector S" width="750">
|
|
253
|
+
|
|
254
|
+
Choose which viewer **View fields (...)...** opens - **Built-in** (default, needs nothing else installed) or **ParaView** - on **Preferences > Viewer**. If ParaView is selected but not found on your system, setupEM/setupThermal fall back to the built-in viewer automatically, with a message in the Log panel.
|
|
255
|
+
|
|
256
|
+
<img src="./doc/png/preferences_viewer1.png" alt="3D field viewer preference" width="500">
|
|
257
|
+
|
|
258
|
+
Also runnable standalone, without the full setupEM/setupThermal GUI, either directly (`python field_viewer.py <file_path> [--source palace|elmer_em|elmer_thermal]`) or via the `fieldViewer` console script installed with the package.
|
|
259
|
+
|
|
248
260
|
## Code
|
|
249
261
|
Behind the scenes, the setupEM user interface created Python model code for gds2palace, and you can check the resulting code on the "Code" tab.
|
|
250
262
|
|
|
251
263
|
<img src="./doc/png/code1.png" alt="code" width="700">
|
|
252
264
|
|
|
253
265
|
## File menu
|
|
254
|
-
In the setupEM File menu, you can save and load simulation configurations, and you can also save and load a user defined "Default
|
|
266
|
+
In the setupEM File menu, you can save and load simulation configurations, and you can also save and load a user defined "Default Config" configuration. This includes the choice of simulation target directory and all other settings. Configurations are stored in a JSON file with file extension ".simcfg". The "Default Config" will be stored to the user home diretory.
|
|
255
267
|
|
|
256
268
|
Using "File > Import from *.py model", you can load settings from existing simulation model code, e.g. the examples included in the gds2palace repository. This import is based on detecting known keywords, with or without the settings[] syntax, and also works for openEMS Python models. Note that openEMS substrates model the MIM differently, and parameter "refined_cellsize" will usually be smaller in openEMS simulation, so you need to adjust these settings.
|
|
257
269
|
|
|
258
270
|
If you are on the "Code" tab, you can also export the Python model code using "File > Export to *.py model". This option is only required if you want to save the model code **without** running it. Buttons "Create mesh and model file" and "Run Palace" on the "Create Model" tab will also save the model code to the target directory, and run it from there.
|
|
259
271
|
|
|
272
|
+
"File > Preferences..." lets you change the built-in defaults that a brand-new/blank field starts out showing (e.g. fstart/fstop, mesh refinement, dielectric oversize margin), saved per-user and independent of any project file.
|
|
273
|
+
|
|
260
274
|
<img src="./doc/png/filemenu1.png" alt="file" width="700">
|
|
261
275
|
|
|
262
276
|
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Python GUI for gds2palace
|
|
2
|
+
|
|
3
|
+
[gds2palace](https://github.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2) enables an **RFIC FEM simulation** workflow where GDSII layout files are simulated using the [Palace FEM solver by AWS](https://awslabs.github.io/palace/stable/). setupEM provides a Python-based **graphical user interface** to configure and run gds2palace, instead of creating the simulation model code manually, and also start simulation in Palace.
|
|
4
|
+
|
|
5
|
+
When you install setupEM, the gds2palace workflow is automatically installed in the background. This enables **creating a simulation model** for AWS Palace. To actually **run the simulation**, you need to have AWS Palace installed, as described below. Palace installation is **not** done automatically!
|
|
6
|
+
|
|
7
|
+
The setupEM package now includes setupThermal also, which is the equivalent of setupEM for thermal models using [Elmer](https://www.elmerfem.org/blog/). To run a thermal model in Elmer, you need to have Elmer installed. Elmer installation is **not** done automatically!
|
|
8
|
+
|
|
9
|
+
An overview of the SetupEM user interface is given below in chapter "Using setupEM"
|
|
10
|
+
|
|
11
|
+
Two more external tools are used by parts of the workflow, and are not installed automatically:
|
|
12
|
+
|
|
13
|
+
- [ParaView](https://www.paraview.org/) — optional, for viewing field-dump output (Palace/Elmer EM) and Elmer thermal result files with ParaView itself instead of the built-in 3D field viewer. Not required: the built-in viewer needs nothing extra installed and is the default.
|
|
14
|
+
- An MPI implementation — only needed for multi-process Elmer runs (the Elmer solver settings' multithreading option). Use OpenMPI or MPICH on Linux/macOS; on Windows, install [Microsoft MPI](https://learn.microsoft.com/en-us/message-passing-interface/microsoft-mpi) (setupEM checks for this and shows a download link if it's missing).
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
pip install setupEM
|
|
19
|
+
|
|
20
|
+
**Full documentation, installation guide, and usage walkthrough:**
|
|
21
|
+
https://github.com/VolkerMuehlhaus/setupEM
|
|
22
|
+
|
|
23
|
+
## Recent changes
|
|
24
|
+
|
|
25
|
+
# What's New - September 14, 2026
|
|
26
|
+
|
|
27
|
+
Added a built-in **3D field viewer**, an in-app alternative to launching external ParaView, for setupEM (Palace and Elmer-as-EM-solver) and setupThermal (Elmer thermal) field-dump results: an axis-aligned clip plane with a **Find max.** button, standard CAD/ParaView-style axis-view buttons, tailored per-solver color defaults with a manual range override, opacity and mesh-edge overlay controls, and an arrow overlay with a size slider for vector fields. **View fields in Paraview...** and the previous separate 3D-viewer button are now one **View fields (...)...** button, whose label shows which viewer it opens - choose Built-in (new default) or ParaView on the new **Preferences > Viewer** tab, with automatic fallback to Built-in (and a log message) if ParaView isn't found.
|
|
28
|
+
|
|
29
|
+
Layout Preview now shows a via port's effective centerline when its drawn marker has finite size in both x and y, since gds2palace's `add_ports()` collapses the shorter axis down to its minimum edge (not the true center) when building the actual simulated port sheet.
|
|
30
|
+
|
|
31
|
+
# What's New - September 8-12, 2026
|
|
32
|
+
|
|
33
|
+
Added two reserved stackup materials that need no `<Materials>` entry: `PEC` (ideal conductor, on conductor/via/sheet Layers) and `AIR` (built-in default dielectric, overridable).
|
|
34
|
+
|
|
35
|
+
Added a **live solver-status line** below the log during a Palace run, showing MPI process count, estimated total memory, current port/frequency progress, and AMR iteration - updates as Palace's own console output streams in, without waiting for the run to finish. It clears when loading a different model/config file or creating a new mesh, instead of showing a previous run's stale data.
|
|
36
|
+
|
|
37
|
+
Added a **memory limit** for Palace runs (Preferences > Palace, "Stop Palace if memory exceeds", default 100 GB): if the solver's own reported memory usage crosses this, setupEM terminates it automatically and still runs S-parameter postprocessing on whatever results were already computed, instead of losing the whole run to an out-of-memory crash.
|
|
38
|
+
|
|
39
|
+
The **Result Viewer** can now show S-parameter results from a still-running (or crashed/stopped) multi-iteration AMR run, reading Palace's raw per-iteration output directly instead of waiting for the whole run to finish.
|
|
40
|
+
|
|
41
|
+
Added a **Layout Preview** which can be accessed from Input Files tab or Tools menu, including display of port location and direction. Layout layers selected in Stackup Preview will be highlighted in Layout preview.
|
|
42
|
+
|
|
43
|
+
Added **Tools > Simplify GDS...** (setupEM and setupThermal), which removes floating (unconnected) metal fill and/or fills in small cutouts on the currently loaded GDS file, writing the result to a new GDS file. The metal layers it operates on come entirely from the currently loaded XML stackup. Defaults are configurable on a new Preferences > Simplify GDS tab. A **Compare in Layout Preview** button opens the original and simplified layouts side by side.
|
|
44
|
+
|
|
45
|
+
**Layer numbers for port shapes** are now auto-detected when creating port configuration. Layer range is set in the Preferences dialog.
|
|
46
|
+
|
|
47
|
+
Added a **File > Preferences...** dialog (setupEM and setupThermal) for changing the built-in defaults of fields that were previously hardcoded.
|
|
48
|
+
|
|
49
|
+
The **Cellname** dropdown now shows an explicit "(default)" entry instead of a blank one.
|
|
50
|
+
|
|
51
|
+
# What's New - September 1-6, 2026
|
|
52
|
+
|
|
53
|
+
The stackup cross-section preview (**Show stackup**, and the Stackup Editor's live preview) is now interactive: click a dielectric, metal, or via to see its name, material, and z-position/thickness in a flyout. In the Stackup Editor, clicking a shape also selects the matching row in the Dielectric Stack/Layers tables, and selecting a row highlights the matching shape in the preview.
|
|
54
|
+
|
|
55
|
+
The Stackup Editor now closes itself automatically when a different substrate XML is chosen in the main window, if it has no unsaved changes, instead of staying open showing a file that no longer matches what's selected.
|
|
56
|
+
|
|
57
|
+
setupThermal now has an **Elmer solver settings** group (Mesh tab), matching setupEM's, to choose between the iterative and direct linear solver for the Elmer thermal solve - defaults to direct. Previously this could only be set by hand-editing the generated model script, and the setting was silently dropped even then.
|
|
58
|
+
|
|
59
|
+
ParaView launching (Palace and Elmer EM field dumps, Elmer thermal results) now prefers a `.pvtu` file over loose `.vtu` pieces when one exists, so a multi-partition (MPI) run opens as one combined dataset instead of disconnected fragments.
|
|
60
|
+
|
|
61
|
+
The Frequencies tab's field-dump control is now solver-aware: Elmer mode shows a plain **"Enable field dump"** checkbox instead of a frequency list, since Elmer has no per-frequency `SaveStep` like Palace - any `fdump` value there dumps fields at *every* solved frequency (sweep and `fpoint` together), so listing specific frequencies was misleading. Palace mode is unchanged, keeping its per-frequency `fdump` list. This also sidesteps a gds2palace bug (see its own CHANGES.md) where a frequency listed in both the sweep and `fdump` was silently solved twice.
|
|
62
|
+
|
|
63
|
+
Full history: [CHANGES.md](https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc/CHANGES.md)
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
**Note:** the `setupEM` PyPI package itself requires:
|
|
68
|
+
|
|
69
|
+
- gds2palace>=0.4.3
|
|
70
|
+
- gds_prepare_for_EM>=1.2.0
|
|
71
|
+
- PySide6
|
|
72
|
+
- shiboken6
|
|
73
|
+
- scipy
|
|
74
|
+
- requests
|
|
75
|
+
- scikit-rf
|
|
76
|
+
- matplotlib
|
|
77
|
+
- numpy
|
|
78
|
+
- gdspy
|
|
79
|
+
- meshio
|
|
80
|
+
- pyvista
|
|
81
|
+
- pyvistaqt
|
|
82
|
+
|
|
83
|
+
(Other Python modules mentioned above are only needed to run standalone helper scripts in this repository, not to use the installed package.)
|
|
@@ -13,6 +13,7 @@ authors = [
|
|
|
13
13
|
]
|
|
14
14
|
dependencies = [
|
|
15
15
|
"gds2palace>=0.4.3",
|
|
16
|
+
"gds_prepare_for_EM>=1.2.0",
|
|
16
17
|
"PySide6",
|
|
17
18
|
"shiboken6",
|
|
18
19
|
"scipy",
|
|
@@ -21,15 +22,23 @@ dependencies = [
|
|
|
21
22
|
"matplotlib",
|
|
22
23
|
"numpy",
|
|
23
24
|
"gdspy",
|
|
24
|
-
"meshio"
|
|
25
|
+
"meshio",
|
|
26
|
+
"pyvista",
|
|
27
|
+
"pyvistaqt"
|
|
25
28
|
]
|
|
26
29
|
requires-python = ">=3.9"
|
|
27
30
|
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://github.com/VolkerMuehlhaus/setupEM"
|
|
33
|
+
Repository = "https://github.com/VolkerMuehlhaus/setupEM"
|
|
34
|
+
Changelog = "https://github.com/VolkerMuehlhaus/setupEM/blob/main/doc/CHANGES.md"
|
|
35
|
+
|
|
28
36
|
[project.scripts]
|
|
29
37
|
setupEM = "setupEM.setupEM:main"
|
|
30
38
|
setupThermal = "setupEM.setupThermal:main"
|
|
31
39
|
stackupEditor = "setupEM.stackupEditor:main"
|
|
32
40
|
resultViewer = "setupEM.result_viewer:main"
|
|
41
|
+
fieldViewer = "setupEM.field_viewer:main"
|
|
33
42
|
|
|
34
43
|
[tool.setuptools.dynamic]
|
|
35
44
|
version = {attr = "setupEM.__version__"}
|