Source code for kqcircuits.simulations.circular_capacitor_sim

# This code is part of KQCircuits
# Copyright (C) 2021 IQM Finland Oy
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program. If not, see
# https://www.gnu.org/licenses/gpl-3.0.html.
#
# The software distribution should follow IQM trademark policy for open-source software
# (meetiqm.com/developers/osstmpolicy). IQM welcomes contributions to the code. Please see our contribution agreements
# for individuals (meetiqm.com/developers/clas/individual) and organizations (meetiqm.com/developers/clas/organization).

from kqcircuits.elements.circular_capacitor import CircularCapacitor
from kqcircuits.pya_resolver import pya
from kqcircuits.simulations.simulation import Simulation
from kqcircuits.util.parameters import add_parameters_from


[docs]@add_parameters_from(CircularCapacitor) class CircularCapacitorSim(Simulation):
[docs] def build(self): capacitor_cell = self.add_element(CircularCapacitor, **self.get_parameters()) cap_trans = pya.DTrans(0, False, (self.box.left + self.box.right) / 2, (self.box.bottom + self.box.top) / 2) _, refp = self.insert_cell(capacitor_cell, cap_trans) self.produce_waveguide_to_port(refp["port_a"], refp["port_a_corner"], 1, 'left') self.produce_waveguide_to_port(refp["port_b"], refp["port_b_corner"], 2, 'right')