Metadata-Version: 2.4
Name: gds2palace
Version: 0.9.3
Summary: Create AWS Palace model from RFIC GDSII layout file
Author-email: Volker Muehlhaus <volker@muehlhaus.com>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2
Project-URL: Repository, https://github.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2
Project-URL: Changelog, https://github.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2/blob/main/doc/CHANGES.md
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: gdspy>1.6.0
Requires-Dist: gmsh
Requires-Dist: numpy
Requires-Dist: shapely>=2.0
Dynamic: license-file

# Create AWS Palace FEM Models from GDSII layout files

![Intro](https://raw.githubusercontent.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2/main/doc/png/gds2palace_banner.png)

The files provided here enable RFIC FEM simulation using AWS Palace from GDSII layouts created in [IHP SG13G2](https://github.com/IHP-GmbH/IHP-Open-PDK) RFIC technology. 

Palace, is an open-source, parallel finite element code for full-wave 3D electromagnetic simulations. It can be scaled from single computer to large high performance simulation clusters and cloud-based computing.  
https://awslabs.github.io/palace/stable/  

In addition to AWS Palace, gds2palace can also generate models for [Elmer FEM](https://www.elmerfem.org/), as an additional workflow option for EM (S-parameter) simulation as well as steady-state thermal simulation. See [CHANGES.md](https://raw.githubusercontent.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2/main/doc/CHANGES.md) for this and other recent additions.

The gds2palace workflow in this repository is pre-configured for GDSII layout files in the [IHP SG13G2 Open PDK.](https://github.com/IHP-GmbH/IHP-Open-PDK)
Special thanks to IHP and the public funded German project FMD-QNC (16ME0831) https://www.elektronikforschung.de/projekte/fmd-qnc for financial support, which has contributed to this work.

## Install

    pip install gds2palace

**Full documentation, installation guide, and usage walkthrough:**
https://github.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2

## Recent changes

## 31 October-2026
gds2palace 0.9.3

**New features**  
Multielement ports: several shapes on one port layer now become one port with one element per shape, the elements in parallel (a Palace `LumpedPort` with `Elements`; the port impedance stays the given Z0). Use it for a terminal that is spread over several strips, e.g. the source fingers of a multi-finger transistor. Before, only the last shape read became the port, and the others stayed in the model as surfaces without a port. `port_information.json` has one entry per element, with its `element` number. `combine_extend_snp.py` takes one Z0 per port for the Touchstone option line and treats the port inductances of the elements as parallel for de-embedding. Elmer models stop with an error for a multielement port.

**Documentation**  
User's guide, FAQ and AGENTS.md: the IHP SG13G2 PDK resistors as sheets in the EM model. The sheets have the drawn size and the nominal sheet resistance, without the PDK's width offset and contact end resistance; in Palace, rhigh and rppd come out about 10 % below their PDK value, rsil within about 2 %. See "Accuracy of IHP SG13G2 PDK resistors as sheets" in the user's guide.

## 22 October-2026
gds2palace 0.9.2

**New features**  
The result tools `combine_extend_snp.py` (Palace results to Touchstone) and `palace_summary.py` (run summary: unknowns, run time, peak RAM, AMR error) are now installed with the pip package, as `gds2palace.scripts`: `python -m gds2palace.scripts.palace_summary <path>` and `python -m gds2palace.scripts.combine_extend_snp`. They need scikit-rf (`pip install scikit-rf`), which gds2palace does not install. `utilities.get_scripts_dir()` returns their folder. The files in `scripts/` are unchanged, so the Linux install script still downloads them from there.

**Documentation**  
User's guide and AGENTS.md: a via port drawn as a box with an area becomes a sheet along the box's left edge (xmin, if it is taller than wide) or bottom edge (ymin), as the code has always done; the documentation said "along its center line". Draw via ports as lines.

## 18-20 October-2026
gds2palace 0.9.1

**New features**  
A pre-built Apptainer image for Palace 0.18.1 is now available: `apptainer pull palace_0181.sif oras://ghcr.io/volkermuehlhaus/palace_0181:latest`. It is compiled for a common processor level (`x86_64_v3`, AVX2), so it runs on all Intel processors since 2013 and all AMD processors since 2017. The Linux and Windows install scripts now download this image by default; `--palace-version 016` still gives the 0.16 image. The generated `run_palace` script now calls `apptainer -q`, which hides Apptainer's info messages.

The latest IHP stackup files (`SG13G2_FEM_200um.xml`, `SG13G2_FEM_200um_passi3D.xml`, `SG13CMOS5L_200um.xml`) are now installed with the pip package, so a model no longer needs a copy of the repository. `utilities.get_stackup_path('SG13G2_FEM_200um.xml')` returns the full path of one; `utilities.get_stackup_path()` without an argument prints the stackup folder and the available files. Legacy stackups are not included.

**Fixes**  
For very long polygon edges, mesh refinement along the conductor edges is more robust now.

`scripts/combine_extend_snp.py`: with different port impedances, the Touchstone option line now has one Z0 per port, in port order (ports with the same Z0 as port 1 were left out before).  

**Documentation**  
[`building-palace-apptainer.md`](building-palace-apptainer.md) and [`building-palace-spack.md`](building-palace-spack.md) are rewritten for end users: simple steps for Palace 0.18.1, an explanation of each tool, and a table of problems and solutions. Both end with technical notes for AI agents. The Apptainer guide explains how to build an image that runs on other computers: without a fix for libCEED, which always compiles for the build computer's processor, a self-built image can stop with `Illegal instruction` on other computers.

New study [`amr_conformal`](../more_examples/mesh_convergence/mesh_convergence_D-band_balun/amr_conformal/README.md) on the D-band balun: conformal vs. nonconformal AMR, `UpdateFraction`, and AMR at a single frequency followed by one full sweep on the saved mesh.

Full history: [CHANGES.md](https://github.com/VolkerMuehlhaus/gds2palace_ihp_sg13g2/blob/main/doc/CHANGES.md)

---

**Note:** the `gds2palace` PyPI package itself only requires:

- gdspy>1.6.0
- gmsh
- numpy
- shapely>=2.0

(Other Python modules mentioned above are only needed to run the example/model scripts in this repository, not to use the installed package.)
