-
-
February 6, 2023 at 10:34 am
Yasuki Kadohiro
SubscriberHi,
I'm trying to extract the heat flux results at each Named selection of my model by using Reaction probe, and export those results to the csv file. Since there are more than 50 Named selections, I want to use APDL code to do the above mentioned process at once. I have successfully extracted and exported temperature results with the APDL code, but I cannot do the same with the reaction probe.
The reaction is Convection, and I want to extract/export the maximum heat value by using the APDL code as shown in the following picture.
I'd really appreciate it if you could tell me how I can code to obtain the reaction probe (convection) results. If the provided information is not enough, please let me know.
Thank you very much in advance!!
Sincerely,
Yasuki Kadohiro
-
February 6, 2023 at 12:57 pm
Erik Kostson
Ansys EmployeeHi
So If I understand from the reaction probe image you show above, you want to get the maximum (say -346.76 W in above image) automatically for 50 named selections? If it is like that we can use ACT mechanical scripting instead of apdl.
All the best
Erik
-
February 6, 2023 at 2:25 pm
Yasuki Kadohiro
SubscriberDear Erik,
Thank you very much for your kind reply.
Yes. Your understanding is correct. If you do not mind, can you show me an example of the ACT mechanical scripting code that applies the convective boundary condition to one named selection, and extracting/exporting the max heat flow results as Reaction Probe results?
Thank you very much in advance!
Sincerely,
Yasuki
-
February 6, 2023 at 2:50 pm
Erik Kostson
Ansys EmployeeHi
This is beyond the scope of what I can help with (ACT script) – perhaps other members of the forum can help.
What could help is :
do a for loop to go through all the named selections and for everyone do the following:
To add convection:
cn=ExtAPI.DataModel.Project.Model.Analyses[0].AddConvection()
To add reaction probe:
rp=ExtAPI.DataModel.Project.Model.Analyses[0].Solution.AddReactionProbe()
I would suggest also the course on ALH for ACT scripting if it is of interest.
Hope this helps
Erik
-
February 7, 2023 at 9:21 am
Yasuki Kadohiro
SubscriberDear Erik,
Thank you so much for your kind reply!
I will try coding it.
Sincerely,
Yasuki
-
February 7, 2023 at 9:23 am
Erik Kostson
Ansys EmployeeNo worries – all the best – it should be doable with less than 30 lines so not too bad.
Below is a start for the for loop on the named selections and the fopen to save the maxheat from every probe created:
model = ExtAPI.DataModel.Project.Model
analysis=model.Analyses[0]
ns=model.NamedSelections.Children
fpath = “D:/”
fname = “Maxheat.txt”
f = open(fpath+fname,”w”)
maxh =[]
ids =[]
for n in ns:Once all the probes are done (1st step explained above), the model is solved (2nd), and then we do another loop (over nr. of probes) to extract the maxheat value on all the probes. We can use their object id number from the first loop when creating them via ExtAPI.DataModel.GetObjectById(idnr)
-
February 8, 2023 at 10:14 am
Yasuki Kadohiro
SubscriberDear Erik,
Thank you so much for your advises! I could successfully automate the process that i wanted to!
Sincerely,
Yasuki
-
February 8, 2023 at 10:22 am
Erik Kostson
Ansys EmployeeMany thanks - that is great to hear. All the best
Erik
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Solver Pivot Warning in Beam Element Model
- Saving & sharing of Working project files in .wbpz format
- Understanding Force Convergence Solution Output
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- User manual
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- whether have the difference between using contact and target bodies
- material damping and modal analysis
- Colors and Mesh Display
-
5282
-
3299
-
2469
-
1308
-
1006
© 2023 Copyright ANSYS, Inc. All rights reserved.