Skip to main content

No project description provided

Project description

Gsim 0.0.4

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.4.tar.gz (56.4 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.4-py3-none-any.whl (71.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gsim-0.0.4.tar.gz
  • Upload date:
  • Size: 56.4 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.4.tar.gz
Algorithm Hash digest
SHA256 4ee5f62d32c834126e70623d59f880a394c0273c7b0f58e30cb89b0e26447809
MD5 36c8845f4312ee8fe022174b07fb1784
BLAKE2b-256 8cec158154b64ab963f637764c1a8c446b84bf669cefbbd7c0755ee27f2eae9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for gsim-0.0.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: gsim-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 71.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e22100b313e27140f1dae5cdd06e62c1907ec1ae0983e347ff78ce04d21f2dfa
MD5 b40cf87e4690059740de042274c1dd49
BLAKE2b-256 5df450a022bad90775e4517c394c3e509333397922fbf494a007fdfca204eb8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for gsim-0.0.4-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