kqcircuits.simulations.cross_section_simulation
- class kqcircuits.simulations.cross_section_simulation.CrossSectionSimulation(layout, **kwargs)[source]
Bases:
object
Base class for cross-section simulation geometries.
The geometry consist of 2-dimensional layers which are thought as cross sections of 3-dimensional geometry. This allows for modeling waveguide-like geometries where the cross section is constant for relatively long segments.
This class is intended to be subclassed by a specific simulation implementation; The subclass should implement the method ‘build’ which defines the simulation geometry and material properties. The helper function ‘insert_layer’ should be called internally to build the geometry.
Initialize a CrossSectionSimulation.
The initializer parses parameters, creates a top cell, and then calls self.build to create the simulation geometry.
- Parameters:
layout – the layout on which to create the simulation
- Keyword Arguments:
**kwargs – Any parameter can be passed as a keyword argument.
- LIBRARY_NAME = None
- classmethod get_schema(noparents=False, abstract_class=None)
Returns the combined parameters of the class “cls” and all its ancestor classes.
- Parameters:
noparents – If True then only return the parameters of “cls”, not including ancestors.
abstract_class – Return parameters up to this abstract class if specified.
- get_layers()
Returns simulation layer numbers in list. Only return layers that are in use.
- get_parameters()
Return dictionary with all parameters and their values.
- is_metal(material)
Return True if material is metal and False otherwise
- get_material_dict()
Return material_dict as dictionary.
- check_material_dict()
Check that used materials are defined in material_dict and return material_dict as dictionary.
- abstract build()[source]
Build simulation geometry.
This method is to be overridden, and the overriding method should create the geometry to be simulated.
- process_layers()[source]
Process and check validity of self.layers. Is called after build method.
Internally, * call merge_points_and_match_on_edges to avoid small-scale geometry artifacts * ignore layers with empty region * check if ‘excitation’ keywords are set correctly * insert layer shapes to self.cell.shapes and replace ‘region’ keyword with ‘layer’ keyword.
- insert_layer(layer_name: str, region: Region, material: str, **params)[source]
Add layer parameters into ‘self.layers’ if region is non-empty.
- restrict_layer_regions(bbox: DBox)[source]
Limit the regions of self.layers inside the bounding box.
name (String) - Name of the simulation, default=
Simulation
material_dict (String) - Contains the material names as keys and material properties as values. If the material property has positive value for keyword ‘conductivity’, the material is considered as metal. Otherwise, the material is considered as dielectric. The material names ‘vacuum’ and ‘pec’ (perfect electric conductor) are excluded and they can be used without defining them explicitly. The property keyword ‘permittivity’ is fully supported and keywords ‘conductivity’, ‘dielectric_loss_tangent’, ‘permeability’, ‘magnetic_loss_tangent’, and ‘london_penetration_depth’ are partly supported depending on the solver., default=
{'silicon': {'permittivity': 11.45}}
extra_json_data (None) - This field may be used to store ‘virtual’ parameters useful for your simulations, default=
None
