Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ANSYS Mechanical Scripting: how to delete an existing heatflux?

MihailW

Industrial
Jan 22, 2025
1
Hi everyone,

Now I have a case using the scripting: I have a model with hundreds of faces and I want to apply the same magnitude of heatflux on each of them, then do the transient thermal simulation and export the temperature field in csv file. Due to the large number of simulations I want to utilize ANSYS WB scripting.
I think the algorithm should be easy: find the face by the NameSelection---delete the old/existing heat flux now---addHeatFlux on the new face found---do the simulation---export the results.
But now I am stuck in the second step: I dont know how to delete the heatflux in Transient Thermal. I found someone used the code below to delete the result contour in solution, but it seems like the code does not work for heatflux:
-------------------------------------------
for num, child in enumerate(solution.Children):
if num != 0:
child.Delete()
--------------------------------------------
Any suggestions and tips would be greatly appreciated! Thank you in advance!
 

Part and Inventory Search

Sponsor