Transient Electro-Thermal Simulation of Transient Voltage Suppression (TVS) Diodes#

This notebook demonstrates the process of running a Workbench service with Electronic Desktop on a local machine to solve highly non-linear Diode response subjected to high thermal load and mechanical stresses. It includes steps for uploading project files, executing scripts.

[1]:
import pathlib
import os
from ansys.workbench.core import launch_workbench
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 3
      1 import pathlib
      2 import os
----> 3 from ansys.workbench.core import launch_workbench

ModuleNotFoundError: No module named 'ansys'

Launch the Workbench service on the local machine using specific options. Define the working directory and subdirectories for assets, scripts, and geometry databases (agdb). The launch_workbench function starts a Workbench session with the specified directories.

[2]:
workdir = pathlib.Path("__file__").parent
[3]:
assets = workdir / "assets"
scripts = workdir / "scripts"
[4]:
wb = launch_workbench(client_workdir=str(workdir.absolute()))
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[4], line 1
----> 1 wb = launch_workbench(client_workdir=str(workdir.absolute()))

NameError: name 'launch_workbench' is not defined

Upload the project files to the server using the upload_file method. The files uploaded are TVR14471_V_short.wbpz, 10_1000_Pulse_short.csv

Note: use 10_1000_Pulse.csv for fullscale simulation

[5]:
wb.upload_file_from_example_repo("ansys-aedt-workflow/wbpz/TVR14471_V_short.wbpz")
wb.upload_file(str(assets / "10_1000_Pulse_short.csv"))
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[5], line 1
----> 1 wb.upload_file_from_example_repo("ansys-aedt-workflow/wbpz/TVR14471_V_short.wbpz")
      2 wb.upload_file(str(assets / "10_1000_Pulse_short.csv"))

NameError: name 'wb' is not defined

Execute a Workbench script (project.wbjn) to define the project and load the geometry using the run_script_file method. The set_log_file method is used to direct the logs to wb_log_file.log.

Note: For full-scale simulation use TVR14471_V.wbpz in line 7 of project.wbjn

[6]:
export_path = 'wb_log_file.log'
wb.set_log_file(export_path)
wb.run_script_file(str((assets / "project.wbjn").absolute()), log_level='info')
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[6], line 2
      1 export_path = 'wb_log_file.log'
----> 2 wb.set_log_file(export_path)
      3 wb.run_script_file(str((assets / "project.wbjn").absolute()), log_level='info')

NameError: name 'wb' is not defined

Start a Mechanical and AEDT client sessions to solve the Transient Electro-Thermal Simulation. Both MECHANICAL and AEDT sessions will be started

Note: Disable the Distribution of the solution in Ansys Mechanical. For Full scale simulation use 10_1000_Pulse.csv in line 232 of DC_Cond_ThermTransient_VariableTimeStep.py

[7]:
wb.run_script_file(str((scripts / "DC_Cond_ThermTransient_VariableTimeStep.py").absolute()), log_level='info')
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[7], line 1
----> 1 wb.run_script_file(str((scripts / "DC_Cond_ThermTransient_VariableTimeStep.py").absolute()), log_level='info')

NameError: name 'wb' is not defined

Shutdown the Ansys Workbench server session

[8]:
wb.exit()
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[8], line 1
----> 1 wb.exit()

NameError: name 'wb' is not defined
[ ]: