-
-
May 16, 2023 at 11:01 pm
-
May 17, 2023 at 12:36 pm
Aniket
Ansys EmployeeYou can export results at different timepoint to excel and compile it there.
-Aniket
-
May 17, 2023 at 1:34 pm
Hreetabh Kishore
SubscriberBut in my simulation at a plane there are 4000+ nodes. Is it possible to collect time temperature data collectively. Because, individually is not possible. Which option in settings could help me in getting all the nodes data. Can you please guide me.
-
May 17, 2023 at 1:53 pm
Mike Rife
Ansys EmployeeHi Hreetabh
What is the purpose to gathering the time-history result for 4000+ nodes? What are you goind to do with the data and in what format do you need the data?
-
May 17, 2023 at 1:57 pm
Hreetabh Kishore
SubscriberHii Sir,
With this data I will be going to predict microstructure and grain growth using Monte Carlo simulation. For which, time temp data will be inputs. To get data for all nodes, I can showcase the predicted microstructure at any of the area in the welding zone. For few nodes I know how to get the data, but collectively how can we do for all nodes?
-
May 17, 2023 at 2:13 pm
Mike Rife
Ansys EmployeeDoes this Monte Carlo simulation program not read Ansys result files? If not what format do you need?
-
May 17, 2023 at 2:16 pm
Hreetabh Kishore
SubscriberSir, If I will get the time temperature data of nodes, I can save in notepad++ or excel file that will work.
-
May 17, 2023 at 2:20 pm
Hreetabh Kishore
SubscriberThere is no issue of format. Only the problem is how to collect time-temp data of atleast 100 nodes collectively not individually. Individually I have tried and I can do. But simultaneously for all nodes or large number of nodes. How to do that?
For few nodes the suggested method in video is fine:
-
May 17, 2023 at 2:47 pm
Mike Rife
Ansys EmployeeHreetabh
The whole issue is format. Let's assume that there are 1000 result time points in your model. I cannot imagine that you would accept one data point per node to be written to its own text file. Resulting in 4 million files for you to process. How about one file of all nodes but containing just one time point of result data for 1000 files. Or the other way around resulting in 4000 files. Or one gigantic file with all the data...space separated data? Tab? Comma?
Since you have not answered all my prior questions I guess I can assume that 1) the Monte Carlo program cannot access the solvers binary result file nor 2) do you want to write an access program yourself.
Now Mechanical APDL (the program used by Mechanical to solve the analysis) has multiple ways of gathering and writing out data to files. But to do so we need to know the requirements. Again I am assuming/guessing you need ascii file(s). Do you need the node x/y/z locations too? What format i.e how many significant digits? Do you need 4000+ columns of data - one for each node and then rows of time history results? Or the other way around? Looks like I am repeating myself so I will stop here.
Do you know APDL? How about Python/IronPython? Is this a one-time need? Or some repeatable process for many simulations?
-
May 17, 2023 at 3:18 pm
Hreetabh Kishore
SubscriberSir,
The format i need is a column of time and a column of temperature for each node in an array. There is no specific format, i need. The matlab code will read text file of these collected data. I need not x,y,z data. Moreover, after decimal 3 digits are ok. Look on the below figure. Suppose I have selected 100 nodes. And I want time-temp data for each nodes of all time steps, 200 (provided during simulation). which means a total of 200 columns will be there. 100 for time and 100 for temperature. This is teh only requirement in the form of text file. But problem is I cannot select each node at a time to acquire the data. I want to get the data simultaneously for all at a time to get recorded.
Thanks!
-
May 17, 2023 at 6:12 pm
mjmiddle
Ansys EmployeeThe Mechanical GUI does not have the predesigned ability to do this. Only a script could do this. Also, I’m not sure if you know that you can right click in a temperature result and export a tab delimited file of the temperatures at all selected nodes. But this is for one time point. You can change the evaluation time of the result and export all nodes again, and so work through all time points with this method. The other option is the time history that you see at the lower right. You can also export that if you first select the grey box at the upper left in the table, then right click to export. This reports, avg, max, min of the selected nodes. You have noticed that if you only select one node, that it evaluates to the exact value at that node for all time points, since avg,max,min are the same. This is what Mike Rife was stating. You can export all nodes at one time point or one node for all time points, but not all nodes for all time points. The GUI is not set up to do this. You could only do it with a script. Whether done as APDL script or Mechanical script is a matter of choice.
Also your previous mention of 100 temperature columns and 100 time columns doesn't make sense to me. The temperatures occur at time points. You would have 200 temperature columns where each column represents a time point, plus one column for node ID, since you said you didn't need xyz location. The rows would be each node. In order to use the node ID's this would require you to export the exact mesh used in Mechanical and have that read into your Monte Carlo processing program. If you can't export/import the mesh, then you need 3 columns to represent the XYZ locations of each node.
-
May 17, 2023 at 6:19 pm
Hreetabh Kishore
SubscriberSounds good!
Ya I am looking for APDL script to get all time-temp data in Mechanical APDL. If you have any support in getting the script and how to implement that would be helpful for me.
The feature of getting time-temperature data for all nodes collectively may be not compatible with workbench in transient thermal analysis. I tried hard but unable to locate this feature.
Thanks!
-
May 17, 2023 at 6:29 pm
mjmiddle
Ansys EmployeeSuch a thing is certainly possible and compatible with Mechanical in workbench. It's just not a current feature, so needs to be done as a script in current version or ehancement request for a future version.
-
May 17, 2023 at 6:33 pm
Hreetabh Kishore
SubscriberYaa....Definitely.
Thanks for the clarification. If possible can do help me in getting code for this so that I can open this model in APDL for such purpose.
-
May 17, 2023 at 9:21 pm
mjmiddle
Ansys EmployeeWe don’t normally write scripts for customers, but I was working on something similar recently so it didn’t take that much time for me to put something together as a derivative of what I was working on. Select the result object, and paste the script into the Mechancal script console. It will write a file to the user_files folder inside the project. It is a general script for multiple result types and analysis types. It has some error checking, but I didn’t rule out all invalid result types, especially for frequency based analysis:
# first select the result object
obj = ExtAPI.DataModel.Tree.ActiveObjects[0]import os
dir = ExtAPI.DataModel.WorkingDir
for i in range(3):
dir = os.path.dirname(dir)
dir = os.path.join(dir, ‘user_files’)
notTypes = [
’SolutionInformation’,
’Image’,
’Figure’,
’TreeGroupingFolder’,
’Results.StressToolResults.StressTool’,
’PostContactTool’,
’FatigueTool’,
’Results.BoltToolResults.BoltTool’,
’CommandSnippet’,
’PrimaryCriterion’,
]
freqTypes =[
AnalysisType.Harmonic,
AnalysisType.Modal,
AnalysisType.Spectrum,
AnalysisType.ResponseSpectrum,
]type = str(obj.GetType()).lstrip(‘Ansys.ACT.Automation.Mechanical.’)
if not type.find(‘.’) == -1:
type2 = type.Split(‘.’)[1]
else:
type2 = ”
if not type in notTypes and not type2 == ‘ProbeResults’:
if type2 == ‘ContactToolResults’ or type2 == ‘FatigueToolResults’ or type2 == ‘StressToolResults’ or type2 == ‘BoltToolResults’:
objName = obj.Parent.Name + ‘ ‘ + obj.Name
else:
objName = obj.Name
fileName = os.path.join(dir,objName) + ‘.txt'
an = obj
while (an != None and an.GetType() != Ansys.ACT.Automation.Mechanical.Analysis): an = an.Parent
if an != None: # found analysis
reader = an.GetResultsData()
if not reader == None:
resultPoints = reader.ListTimeFreq
if an.AnalysisType in freqTypes:
freqDomain = True
if an.AnalysisType == AnalysisType.Harmonic:
resultPoints = [resultPoints[i] for i in range(0,len(resultPoints),2)]
#if reader.HasImaginaryResults: # may be needed to check for duplicate frequency points in modal analysis and skip imaginary results
unitP = obj.Frequency.Unit
else:
freqDomain = False
unitP = obj.DisplayTime.Unit
resultSetNum = len(resultPoints)
with Transaction(): # halt display update
initial = 1
nodeValues = {}
for p in resultPoints:
if freqDomain:
obj.Frequency = Quantity(p,unitP)
else:
obj.DisplayTime = Quantity(p,unitP)
an.Solution.EvaluateAllResults()
data = obj.PlotData
if initial == 1:
initial = 0
unitR = obj.Maximum.Unit
file = open(fileName,’w’)
file.write(‘Node Number’ + ‘\t’)
nodes = data[‘Node’]
file.write(objName + ‘ ‘ + unitR + ‘ at ‘ + str(p) + ‘ ‘ + unitP + ‘\t’)
nodeValues[p] = []
for n in range(0,data[‘Values’].Count):
nodeValues[p].append(data[‘Values’][n])file.write(‘\n’)
i = 0
for node in nodes:
file.write(str(node) + ‘\t’)
for p in resultPoints:
file.write(str(nodeValues[p][i]) + ‘\t’)
file.write(‘\n’)
i += 1
file.close() -
May 17, 2023 at 9:51 pm
Hreetabh Kishore
Subscriberok thanks Sir. Let me do this.
-
- 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
-
5290
-
3311
-
2471
-
1308
-
1016
© 2023 Copyright ANSYS, Inc. All rights reserved.