gsim 0.0.0__py3-none-any.whl
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.
- gsim/__init__.py +16 -0
- gsim/gcloud.py +169 -0
- gsim/palace/__init__.py +120 -0
- gsim/palace/mesh/__init__.py +50 -0
- gsim/palace/mesh/generator.py +956 -0
- gsim/palace/mesh/gmsh_utils.py +484 -0
- gsim/palace/mesh/pipeline.py +188 -0
- gsim/palace/ports/__init__.py +35 -0
- gsim/palace/ports/config.py +363 -0
- gsim/palace/stack/__init__.py +149 -0
- gsim/palace/stack/extractor.py +602 -0
- gsim/palace/stack/materials.py +161 -0
- gsim/palace/stack/visualization.py +630 -0
- gsim/viz.py +86 -0
- gsim-0.0.0.dist-info/METADATA +128 -0
- gsim-0.0.0.dist-info/RECORD +18 -0
- gsim-0.0.0.dist-info/WHEEL +5 -0
- gsim-0.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gsim
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Author-email: flaport <floris.laporte@gmail.com>
|
|
5
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
6
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
7
|
+
Classifier: Operating System :: OS Independent
|
|
8
|
+
Requires-Python: <3.14,>=3.12
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: gdsfactory>=8.32.2
|
|
11
|
+
Requires-Dist: gdsfactoryplus>=1.3.7
|
|
12
|
+
Requires-Dist: gmsh
|
|
13
|
+
Requires-Dist: meshio>=5.0.0
|
|
14
|
+
Requires-Dist: plotly
|
|
15
|
+
Requires-Dist: pydantic>=2.10.6
|
|
16
|
+
Requires-Dist: pyvista>=0.43.0
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: altair>=5.5.0; extra == "dev"
|
|
19
|
+
Requires-Dist: build>=1.2.0; extra == "dev"
|
|
20
|
+
Requires-Dist: griffe>=1.5.6; extra == "dev"
|
|
21
|
+
Requires-Dist: ipykernel>=6.29.5; extra == "dev"
|
|
22
|
+
Requires-Dist: matplotlib>=3.10.0; extra == "dev"
|
|
23
|
+
Requires-Dist: mkautodoc>=0.2.0; extra == "dev"
|
|
24
|
+
Requires-Dist: mkdocs-autorefs>=1.3.0; extra == "dev"
|
|
25
|
+
Requires-Dist: mkdocs-material>=9.6.0; extra == "dev"
|
|
26
|
+
Requires-Dist: mkdocs-shadcn>=0.2; extra == "dev"
|
|
27
|
+
Requires-Dist: mkdocs>=1.6.1; extra == "dev"
|
|
28
|
+
Requires-Dist: mkdocstrings[python]>=0.27.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mkinit>=1.1.0; extra == "dev"
|
|
30
|
+
Requires-Dist: mypy>=1.15.0; extra == "dev"
|
|
31
|
+
Requires-Dist: nb-clean>=4.0.1; extra == "dev"
|
|
32
|
+
Requires-Dist: nbconvert>=7.16.6; extra == "dev"
|
|
33
|
+
Requires-Dist: papermill>=2.6.0; extra == "dev"
|
|
34
|
+
Requires-Dist: plotly>=6.0.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pre-commit>=4.1.0; extra == "dev"
|
|
36
|
+
Requires-Dist: pyright>=1.1.0; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-randomly>=3.16.0; extra == "dev"
|
|
39
|
+
Requires-Dist: pytest-xdist>=3.6.0; extra == "dev"
|
|
40
|
+
Requires-Dist: pytest>=8.3.0; extra == "dev"
|
|
41
|
+
Requires-Dist: ruff>=0.9.0; extra == "dev"
|
|
42
|
+
Requires-Dist: towncrier>=24.0.0; extra == "dev"
|
|
43
|
+
Requires-Dist: vega-datasets>=0.9.0; extra == "dev"
|
|
44
|
+
Requires-Dist: nbstripout>=0.8.1; extra == "dev"
|
|
45
|
+
Requires-Dist: ty>=0.0.13; extra == "dev"
|
|
46
|
+
|
|
47
|
+
# Gsim 0.0.0
|
|
48
|
+
|
|
49
|
+
> a GDSFactory Simulation Plugin
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
## Overview
|
|
54
|
+
|
|
55
|
+
Gsim bridges the gap between circuit layout design (using [GDSFactory](https://gdsfactory.github.io/gdsfactory/)) and electromagnetic simulation (using [Palace](https://awslabs.github.io/palace/)). It automates the conversion of IC component layouts into simulation-ready mesh files and configuration.
|
|
56
|
+
|
|
57
|
+
## Features
|
|
58
|
+
|
|
59
|
+
- **Layer Stack Extraction**: Extract layer stacks from PDK definitions with a comprehensive material properties database
|
|
60
|
+
- **Port Configuration**: Convert GDSFactory ports into Palace-compatible port definitions (inplane, via, and CPW ports)
|
|
61
|
+
- **Mesh Generation**: Generate GMSH-compatible finite element meshes with configurable quality presets
|
|
62
|
+
|
|
63
|
+
## Installation
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install gsim
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
For development:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
git clone https://github.com/doplaydo/gsim
|
|
73
|
+
cd gsim
|
|
74
|
+
pip install -e .[dev]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Quick Start
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from gsim.palace import (
|
|
81
|
+
get_stack,
|
|
82
|
+
configure_inplane_port,
|
|
83
|
+
extract_ports,
|
|
84
|
+
generate_mesh,
|
|
85
|
+
MeshConfig,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
# Get layer stack from active PDK
|
|
89
|
+
stack = get_stack()
|
|
90
|
+
|
|
91
|
+
# Configure ports on your component
|
|
92
|
+
configure_inplane_port(c.ports["o1"], layer="topmetal2", length=5.0)
|
|
93
|
+
configure_inplane_port(c.ports["o2"], layer="topmetal2", length=5.0)
|
|
94
|
+
|
|
95
|
+
# Extract configured ports
|
|
96
|
+
ports = extract_ports(c, stack)
|
|
97
|
+
|
|
98
|
+
# Generate mesh
|
|
99
|
+
result = generate_mesh(
|
|
100
|
+
component=c,
|
|
101
|
+
stack=stack,
|
|
102
|
+
ports=ports,
|
|
103
|
+
output_dir="./simulation",
|
|
104
|
+
config=MeshConfig.default(),
|
|
105
|
+
)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Mesh Presets
|
|
109
|
+
|
|
110
|
+
| Preset | Refined Size | Max Size | Use Case |
|
|
111
|
+
| ------- | ------------ | -------- | --------------------------------- |
|
|
112
|
+
| Coarse | 10.0 µm | 600.0 µm | Fast iteration (~2.5 elements/λ) |
|
|
113
|
+
| Default | 5.0 µm | 300.0 µm | Balanced accuracy (~5 elements/λ) |
|
|
114
|
+
| Fine | 2.0 µm | 70.0 µm | High accuracy (~10 elements/λ) |
|
|
115
|
+
|
|
116
|
+
## Port Types
|
|
117
|
+
|
|
118
|
+
- **Inplane ports**: Horizontal ports on single metal layer for CPW gaps
|
|
119
|
+
- **Via ports**: Vertical ports between two metal layers for microstrip structures
|
|
120
|
+
- **CPW ports**: Multi-element ports for proper Coplanar Waveguide excitation
|
|
121
|
+
|
|
122
|
+
## Documentation
|
|
123
|
+
|
|
124
|
+
See the [documentation](https://doplaydo.github.io/gsim/) for detailed API reference and examples.
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
Copyright 2026 GDSFactory
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
gsim/__init__.py,sha256=FmMjn3al4lB-2cGAlMcYoDpfEgb1CotlaBTKbfCCbfA,288
|
|
2
|
+
gsim/gcloud.py,sha256=ulYaNyGXCRoTbud0im1qHyuwcvIpNpk1RRvnRxekCe4,5155
|
|
3
|
+
gsim/viz.py,sha256=cakE-oH_O0wuL51gURl5YjLeCZQz-FFUzfr2jn2-MI4,2645
|
|
4
|
+
gsim/palace/__init__.py,sha256=FHY3L9NRGx5xFCU-mLHKIDjJZc_G0kcIMoq6pX9RHyo,2938
|
|
5
|
+
gsim/palace/mesh/__init__.py,sha256=vif960c46QbH1fkr4J9ydFh5ODcmxRS_Nx3D6JaVlMw,1207
|
|
6
|
+
gsim/palace/mesh/generator.py,sha256=wQR64aqRMuHwA6klLHIASr03Z6tIUqHvvuwvovtwOBY,30735
|
|
7
|
+
gsim/palace/mesh/gmsh_utils.py,sha256=G8JJUSlUL2Rr1tcM9G0M6F9UjxePFpWSUGfmJ-LWh8E,13801
|
|
8
|
+
gsim/palace/mesh/pipeline.py,sha256=K5G1mb5kk9_y_lVHQH7fOOUquarlGEBtw3NTcNpni60,5936
|
|
9
|
+
gsim/palace/ports/__init__.py,sha256=IoP11atw-Uf447AkZC5ixNcgqlNrC3GCnTGugjR_wgw,803
|
|
10
|
+
gsim/palace/ports/config.py,sha256=LHgKqpk4w7rutUBEf-368bRu2l4N02m-Y8qPdKOuQmk,12289
|
|
11
|
+
gsim/palace/stack/__init__.py,sha256=xcofg-9HuAiymv_77_AuEtTyVnpAjBbxOqRC3-kjQXs,3910
|
|
12
|
+
gsim/palace/stack/extractor.py,sha256=elQn4aEux9_gslyPB1zDTdcOpdiBbCADF7B9vVPd6hg,20440
|
|
13
|
+
gsim/palace/stack/materials.py,sha256=IzUGuPufWu7tx4uTuERodygsh8mA-BZh7NQfSBYLLBU,4637
|
|
14
|
+
gsim/palace/stack/visualization.py,sha256=JwUDmdWqKYjSfeBX_EA1vp3ggxYAX8lI5soNIKHpwkg,19216
|
|
15
|
+
gsim-0.0.0.dist-info/METADATA,sha256=ZNJ5JOBN4ruqnQszxFq9jP-Z1lxDpRP3lEI_RHvaxt4,4225
|
|
16
|
+
gsim-0.0.0.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
17
|
+
gsim-0.0.0.dist-info/top_level.txt,sha256=USwf5QaCLsXq3JCR6ejGvHANZmIifvuQAAl7w-cUE0Y,5
|
|
18
|
+
gsim-0.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gsim
|