Skip to main content

No project description provided

Project description

Gsim 0.0.2

a GDSFactory Simulation Plugin

gsim-logo

Overview

Gsim bridges the gap between circuit layout design (using GDSFactory) and electromagnetic simulation (using Palace). It automates the conversion of IC component layouts into simulation-ready mesh files and configuration.

Features

  • Layer Stack Extraction: Extract layer stacks from PDK definitions with a comprehensive material properties database
  • Port Configuration: Convert GDSFactory ports into Palace-compatible port definitions (inplane, via, and CPW ports)
  • Mesh Generation: Generate GMSH-compatible finite element meshes with configurable quality presets

Installation

pip install gsim

For development:

git clone https://github.com/doplaydo/gsim
cd gsim
pip install -e .[dev]

Quick Start

from gsim.palace import (
    get_stack,
    configure_inplane_port,
    extract_ports,
    generate_mesh,
    MeshConfig,
)

# Get layer stack from active PDK
stack = get_stack()

# Configure ports on your component
configure_inplane_port(c.ports["o1"], layer="topmetal2", length=5.0)
configure_inplane_port(c.ports["o2"], layer="topmetal2", length=5.0)

# Extract configured ports
ports = extract_ports(c, stack)

# Generate mesh
result = generate_mesh(
    component=c,
    stack=stack,
    ports=ports,
    output_dir="./simulation",
    config=MeshConfig.default(),
)

Mesh Presets

Preset Refined Size Max Size Use Case
Coarse 10.0 µm 600.0 µm Fast iteration (~2.5 elements/λ)
Default 5.0 µm 300.0 µm Balanced accuracy (~5 elements/λ)
Fine 2.0 µm 70.0 µm High accuracy (~10 elements/λ)

Port Types

  • Inplane ports: Horizontal ports on single metal layer for CPW gaps
  • Via ports: Vertical ports between two metal layers for microstrip structures
  • CPW ports: Multi-element ports for proper Coplanar Waveguide excitation

Documentation

See the documentation for detailed API reference and examples.

License

Copyright 2026 GDSFactory

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gsim-0.0.2.tar.gz (56.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gsim-0.0.2-py3-none-any.whl (70.2 kB view details)

Uploaded Python 3

File details

Details for the file gsim-0.0.2.tar.gz.

File metadata

  • Download URL: gsim-0.0.2.tar.gz
  • Upload date:
  • Size: 56.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gsim-0.0.2.tar.gz
Algorithm Hash digest
SHA256 059c47e647a64e59a4118540224434c9637cdb41707a6df50185d99275aa93df
MD5 d7e0dd97e4c6242f9d1ed3d6a4d43261
BLAKE2b-256 3ec0a155350737a6a56681d3fcd6387e51cbb36ee2889202774665a4e1e2ce8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for gsim-0.0.2.tar.gz:

Publisher: release.yml on gdsfactory/gsim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gsim-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: gsim-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 70.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gsim-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec2c200201684d9285b40b436656a5ab9a3951b307783921e87c7733b5ea7b11
MD5 cedf17a34518d7986cbef0f2d6fa15a2
BLAKE2b-256 7f10219c15ec2ff3a75dc09752ea5d356e5cbb802f551d87033d81a454f7a703

See more details on using hashes here.

Provenance

The following attestation bundles were made for gsim-0.0.2-py3-none-any.whl:

Publisher: release.yml on gdsfactory/gsim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page