How to change the block power by Pyaedt #6386
-
I have the component is called Small_Flash and origin is 0.5W, and I hope change to 1W for simulation. I use the api as below: Besides this, I use the icepak record function, and get the code as below and I will try later: import ScriptEnv |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can access boundaries from this : Once you get the right boundary object you'll be able to modify its properties. As you already guessed, Hope this helps :) |
Beta Was this translation helpful? Give feedback.
-
Hi lorenzovecchietti Thanks your suggestion. We will try the api from your suggestion. thanks!! The below is our integrate record code from icepak `from ansys.aedt.core import Icepak project_Path = r"D:\Cybernet\AE_Share\20250703\Material2\Workshop01.aedtz" open fileipk = Icepak(project=project_Path, specified_version='2025.1') save fileipk.save_project(save_Path) change Heatsink material Al->copperipk.oeditor.EditNativeComponentDefinition( oDesign = ipk.odesign 2R component power settingtwo_r_power_settings = { modify 2R Power(Junction node)for name, power in two_r_power_settings.items(): new block powerblock_power_settings = { change Block Powerfor block_name, power_value in block_power_settings.items(): save fileipk.save_project(save_Path) simulationipk.analyze() save fileipk.save_project(save_Path) endipk.close_desktop() |
Beta Was this translation helpful? Give feedback.
You can access boundaries from this :
https://aedt.docs.pyansys.com/version/stable/API/_autosummary/ansys.aedt.core.icepak.Icepak.boundaries.html
Once you get the right boundary object you'll be able to modify its properties.
As you already guessed,
ipk.assign_solid_block("Small_Flash", "1W")
is to assign the solid block boundary to a geometry. So"Small_Flash"
must refer to a geometry name, not to a bounday condition name.Hope this helps :)