kqcircuits.simulations.export.elmer.elmer_export

kqcircuits.simulations.export.elmer.elmer_export.export_elmer_json(simulation: Simulation | CrossSectionSimulation, solution: ElmerSolution, path: Path, workflow: dict)[source]

Export Elmer 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.

  • workflow – Parameters for simulation workflow

Returns:

Path to exported json file.

kqcircuits.simulations.export.elmer.elmer_export.export_elmer_script(json_filenames, path: Path, workflow=None, script_folder: str = 'scripts', file_prefix: str = 'simulation', script_file: str = 'run.py', post_process=None, compile_elmer_modules=False)[source]

Create script files for running one or more simulations. Create also a main script to launch all the simulations at once.

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

  • path – Location where to write the script file.

  • workflow – Parameters for simulation workflow

  • script_folder – Path to the Elmer-scripts folder.

  • file_prefix – File prefix of the script file to be created.

  • script_file – Name of the script file to run.

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

  • compile_elmer_modules – Compile custom Elmer energy integration module at runtime. Not supported on Windows.

Returns:

Path of exported main script file

kqcircuits.simulations.export.elmer.elmer_export.export_elmer(simulations: Sequence[Simulation | Tuple[Simulation, ElmerSolution] | CrossSectionSimulation | Tuple[CrossSectionSimulation, ElmerSolution]], path: Path, script_folder: str = 'scripts', file_prefix: str = 'simulation', script_file: str = 'run.py', workflow: Dict | None = None, skip_errors: bool = False, post_process: PostProcess | Sequence[PostProcess] | None = None, **solution_params) Path[source]

Exports an elmer simulation model to the simulation path.

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

  • path – Location where to output the simulation model

  • script_folder – Path to the Elmer-scripts folder.

  • file_prefix – File prefix of the script file to be created.

  • script_file – Name of the script file to run.

  • workflow – Parameters for simulation workflow

  • skip_errors

    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.

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

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

Returns:

Path to exported script file.

../_images/kqcircuits.simulations.export.elmer.elmer_export.png