kqcircuits.simulations.export.ansys.ansys_export

kqcircuits.simulations.export.ansys.ansys_export.export_ansys_json(simulation: Simulation | CrossSectionSimulation, solution: AnsysSolution, path: Path)[source]

Export Ansys simulation into json and gds files.

Parameters:
  • simulation – The simulation to be exported.

  • solution – The solution to be exported.

  • path – Location where to write json and gds files.

Returns:

Path to exported json file.

kqcircuits.simulations.export.ansys.ansys_export.export_ansys_bat(json_filenames, path: Path, file_prefix='simulation', exit_after_run=False, execution_script='scripts/import_and_simulate.py', post_process=None, use_rel_path=True)[source]

Create a batch file for running one or more already exported simulations.

Parameters:
  • json_filenames – List of paths to json files to be included into the batch.

  • path – Location where to write the bat file.

  • file_prefix – Name of the batch file to be created.

  • exit_after_run – Defines if the Ansys Electronics Desktop is automatically closed after running the script.

  • execution_script – The script file to be executed.

  • post_process – List of PostProcess objects, a single PostProcess object, or None to be executed after simulations

  • use_rel_path – Determines if to use relative paths.

Returns:

Path to exported bat file.

kqcircuits.simulations.export.ansys.ansys_export.export_ansys(simulations: Sequence[Simulation | Tuple[Simulation, AnsysSolution]], path: Path, script_folder: str = 'scripts', file_prefix: str = 'simulation', exit_after_run: bool = False, import_script: str = 'import_and_simulate.py', post_process: PostProcess | Sequence[PostProcess] | None = None, use_rel_path: bool = True, skip_errors: bool = False, **solution_params) Path[source]

Export Ansys simulations by writing necessary scripts and json, gds, and bat files.

Parameters:
  • simulations – List of Simulation objects or tuples containing Simulation and Solution objects.

  • path – Location where to write export files.

  • script_folder – Path to the Ansys-scripts folder.

  • file_prefix – Name of the batch file to be created.

  • exit_after_run – Defines if the Ansys Electronics Desktop is automatically closed after running the script.

  • import_script – Name of import script file.

  • post_process – List of PostProcess objects, a single PostProcess object, or None to be executed after simulations

  • use_rel_path – Determines if to use relative paths.

  • skip_errors

    Skip simulations that cause errors. Default is False.

    Warning

    Use this carefully, some of your simulations might not make sense physically and you might end up wasting time on bad simulations.

  • solution_params – AnsysSolution parameters if simulations is a list of Simulation objects.

Returns:

Path to exported bat file.

../_images/kqcircuits.simulations.export.ansys.ansys_export.png