|
[Sponsors] |
Export data of expression from a point every time steps in .txt or .csv |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 8, 2021, 11:29 |
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 |
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 |
|
April 8, 2021, 12:48 |
|
#2 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28 |
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. |
|
April 9, 2021, 02:38 |
|
#3 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
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. |
|
|
|
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 10:10 |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
pimpleDyMFoam computation randomly stops | babapeti | OpenFOAM Running, Solving & CFD | 5 | January 24, 2018 06:28 |
Problem with an old Simulation | FrankW | CFX | 3 | February 8, 2016 05:28 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |