ansys / pyedb

pyedb is a Python library to use the EDB client library.
https://edb.docs.pyansys.com/
MIT License
10 stars 5 forks source link

Evaluating results from SIwave Induced Voltage simulation #725

Open SteffenSee92 opened 2 months ago

SteffenSee92 commented 2 months ago

Discussed in https://github.com/ansys/pyedb/discussions/705

Originally posted by **SteffenSee92** August 1, 2024 Hi everyone, I have a PCB layout in SIwave, where I performed an Induced Voltage simulation and managed up to this part using pyEDB and some of the old IronPython function from the SIwave scripting guide. Now, I want to analyze the results from that simulation also by scripting. In SIwave, I would simply click on the results, then choose for example "Plot magnitude" and the magnitudes of the voltages measured at the ports are plotted in Electronics Desktop over frequency. I am interested also in these voltage levels, but found no way to pull these values into my script. Is there a way to get the results from within the SIwave script (without need of working in the GUI)? An alternative would be to read the values from a text based file in the siwaveresults folder. But unfortunately, there is no such file, I can easily extract the values from. A readable file (.ivswp) is only being created when clicking on the results in the GUI, so that the plotting in AEDT is made. Is there any way to generate this ivswp file by scripting? Thanks, best regards Steffen
svandenb-dev commented 2 months ago

@SteffenSee92 @kmahajan-cadfem sorry for the delay I just came back at the office. I would recommend to avoid using the Siwave ironpython API for several reasons. This API is limited and Ansys development is recommended using EDB based workflow. I would define ready to solve project with simulation setup, probes.... everything is available in PyEDB (if something is missing please fill an Issue in GitHub). Once the EDB saved you can simply call Aedt line submission with passing the EDB as argument, this will automaticity creates the Aedt file. Once it is solved you can open the project with PyAEDT and access all post processing quantities. I think this would be the easiest way. If you want to use Siwave API you can access from Siwave class:

from pyaedt.siwave import Siwave siwave = Siwave(specified_version=None) #optional argument oDoc = siwave.oproject oDoc.ScrImportEDB()

SteffenSee92 commented 2 months ago

@svandenb-dev Sorry for my late reply, I was also out of office a few days... The reason, why I wanted to keep this in SIwave is, that the simulation types that I need here (Induced Voltage Simulation and "Frequency Sweep", that solves for the voltage distribution between planes) are only available here and not directly in HFSS 3D Layout (AEDT). The simulation setups and starting work fine via scripting, using the ironpython API. But in that ironpython API, as far as I can see, there is no way to access the results by scripting for these two simulation types, neither by ironpython nor by pyAEDT/pyEDB. But maybe, I simply oversee the corresponding methods in the ironpython API. Could you give me any hint, how to get simulation results from this kind of simulations, which may not be available in AEDT? Thanks, best regards

svandenb-dev commented 2 months ago

@SteffenSee92 This is currently impossible since we need to generate the *.ivswp file which are generated when exporting al curves from UI, and there are no API in Siwave. I submitted an enhancement request to Siwave developers. I am sorry for this.