kqcircuits.simulations.export.elmer.cross_section_elmer_export¶
- kqcircuits.simulations.export.elmer.cross_section_elmer_export.export_cross_section_elmer_json(simulation: kqcircuits.simulations.cross_section_simulation.CrossSectionSimulation, path: pathlib.Path, mesh_size=None, workflow=None, dielectric_surfaces=None, linear_system_method='bicgstab', p_element_order=1, is_axisymmetric=False)[source]¶
Export Elmer simulation into json and gds files.
- Parameters
simulation – The cross-section simulation to be exported.
path – Location where to write json.
mesh_size – Dictionary where key denotes material (string) and value (double) denotes the maximal length of mesh element. To refine material interface the material names by should be separated by ‘|’ in the key. For example if the dictionary is {‘substrate’: 10, ‘substrate|vacuum’: 2}, the maximum mesh element length is 10 inside the substrate and 2 on the substrate-vacuum interface.
workflow (dict) – Parameters for simulation workflow
dielectric_surfaces –
Loss tangents for dielectric interfaces, thickness and permittivity should be specified in the simulation. The loss tangent is post-processed to the participation to get the quality factor. Default is None. Input is of the form:
'substrate': { 'tan_delta_surf': 5e-7 }, 'layerMA': { # metal–vacuum 'tan_delta_surf': 0.001, # loss tangent }, 'layerMS': { # metal–substrate 'tan_delta_surf': 0.001, }, 'layerSA': { # substrate–vacuum 'tan_delta_surf': 0.001, }
linear_system_method (str) – Available: ‘bicgstab’, ‘mg’ (Default: bicgstab)
p_element_order (int) – polynomial order of p-elements (Default: 1)
is_axisymmetric (bool) – Simulate with Axi Symmetric coordinates along \(y\Big|_{x=0}\) (Default: False)
- Returns
Path to exported json file.
- kqcircuits.simulations.export.elmer.cross_section_elmer_export.export_cross_section_elmer(simulations: [], path: pathlib.Path, file_prefix='simulation', script_file='scripts/run.py', mesh_size=None, workflow=None, dielectric_surfaces=None, linear_system_method='bicgstab', p_element_order=1, is_axisymmetric=False, skip_errors=False)[source]¶
Exports an elmer cross-section simulation model to the simulation path.
- Parameters
simulations – list of all the cross-section simulations
path (Path) – Location where to output the simulation model
file_prefix – File prefix of the script file to be created.
script_file – Name of the script file to run.
mesh_size – Dictionary where key denotes material (string) and value (double) denotes the maximal length of mesh element. To refine material interface the material names by should be separated by ‘|’ in the key. For example if the dictionary is {‘substrate’: 10, ‘substrate|vacuum’: 2}, the maximum mesh element length is 10 inside the substrate and 2 on the substrate-vacuum interface.
workflow (dict) – Parameters for simulation workflow
dielectric_surfaces –
Loss tangents for dielectric interfaces, thickness and permittivity should be specified in the simulation. The loss tangent is post-processed to the participation to get the quality factor. Default is None. Input is of the form:
'substrate': { 'tan_delta_surf': 5e-7 }, 'layerMA': { # metal–vacuum 'tan_delta_surf': 0.001, # loss tangent }, 'layerMS': { # metal–substrate 'tan_delta_surf': 0.001, }, 'layerSA': { # substrate–vacuum 'tan_delta_surf': 0.001, }
linear_system_method (str) – Available: ‘bicgstab’, ‘mg’ (Default: bicgstab)
p_element_order (int) – polynomial order of p-elements (Default: 1)
is_axisymmetric (bool) – Simulate with Axi Symmetric coordinates along \(y\Big|_{x=0}\) (Default: False)
skip_errors (bool) –
Skip simulations that cause errors. (Default: False)
Warning
Use this carefully, some of your simulations might not make sense physically and you might end up wasting time on bad simulations.
- Returns
Path to exported script file.
