CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Export data of expression from a point every time steps in .txt or .csv

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes
  • 3 Post By Gert-Jan
  • 2 Post By AtoHM

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2021, 10:29
Default Export data of expression from a point every time steps in .txt or .csv
  #1
New Member
 
Join Date: Feb 2021
Location: France
Posts: 13
Rep Power: 5
Amir_line is on a distinguished road
Hello,

I need to export data of mass flow (calculated by an expression) from a point or surface every time steps in format .csv or .txt. Can anyone help me, please?

I find this code but it does not work for me.
!$outfile = "tmp.txt";
!open(OUT, ">$outfile");
!$nodes = count("Default Domain");
!print OUT $nodes;
!close(OUT);

Thanks in advance,

Amir
Amir_line is offline   Reply With Quote

Old   April 8, 2021, 11:48
Default
  #2
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,823
Rep Power: 27
Gert-Jan will become famous soon enough
Mass flow from a point does not make sense in my opinion.
Through a boundary (inlet or outlet) or interface, I would create a plot as function of time in the solver manager and export this as csv file.
This data is available by default, even after the calculation has finished. CFX has saved these data for you in the results file .
Just open the calculation as finished run, create a new plot in the manager, and plot the data that you need.
AtoHM, aero_head and Amir_line like this.
Gert-Jan is offline   Reply With Quote

Old   April 9, 2021, 01:38
Default
  #3
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
Or, if you don't want to rerun, you can record a session in CFD-Post, export the value for one step, stop the recording, take the recorded file, put a loop around it to go through time steps.
If you are going to make multiple runs anyway, go for Gert-Jan's suggestion. It will also give you a way better output as you can export it all into one file.
Amir_line and Yagu94 like this.
AtoHM is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend" bigphil OpenFOAM CC Toolkits for Fluid-Structure Interaction 686 December 22, 2022 09:10
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 05:28
Problem with an old Simulation FrankW CFX 3 February 8, 2016 04:28
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58


All times are GMT -4. The time now is 14:20.