|
[Sponsors] |
June 26, 2015, 14:17 |
how to extract foamCalc data to Excel ?
|
#1 |
New Member
Join Date: Apr 2015
Posts: 25
Rep Power: 11 |
Hi . I am using the function FoamCal to measure the temperature for all time steps, However, this function present the results on the terminal, and I would appreciate if someone tell me how to extract these data to Csv file or so.
another related question, how can I plot the temperature over time directly from paraView ? Thanks. |
|
June 26, 2015, 18:04 |
|
#2 |
New Member
Cory
Join Date: Jun 2015
Posts: 6
Rep Power: 10 |
From paraView, you can just select "file" and save data. It gives the option to save as csv files, which Excel should be able to parse.
|
|
June 26, 2015, 18:11 |
|
#3 | |
New Member
Join Date: Apr 2015
Posts: 25
Rep Power: 11 |
Quote:
I did that and selected " Write all time steps ", However, an independent csv file for each time was created which is not practical for me as I want to plot the temperature against time. any other suggestion about how can I have all data for different time steps saved in the same file ? |
||
June 26, 2015, 18:45 |
|
#4 | |
New Member
Cory
Join Date: Jun 2015
Posts: 6
Rep Power: 10 |
Quote:
Code:
cat foo1.csv foo2.csv foo3.csv > newfoo.csv |
||
June 26, 2015, 19:36 |
|
#5 |
Senior Member
|
I do not know the foamCalc output. But if it prints the information to the screen, it also can be printed into a file. Probably your shell has all the needed tools already installed:
If you want the output of foamCalc into a file instead of the screen: "foamCalc someoptionsorparameters > outputfile" If you want only lines with a certain content of the foamCalc output to be printed into a file: "foamCalc someoptionsorparameters | grep selectioncontent > outputfile" Of course there might be better solutions for your case! But these probably would be my first attempts. |
|
June 27, 2015, 02:53 |
|
#6 |
New Member
Join Date: Apr 2015
Posts: 25
Rep Power: 11 |
Thank you for your reply. this is actually helpful but unfortunately I have too many time steps and therefore files and its almost impossible to use this. Thanks anyways
|
|
June 27, 2015, 02:54 |
|
#7 | |
New Member
Join Date: Apr 2015
Posts: 25
Rep Power: 11 |
Quote:
Thank you for your reply. this was actually really helpful. But I still need to have the output in csv format. |
||
June 29, 2015, 17:19 |
|
#8 |
New Member
Cory
Join Date: Jun 2015
Posts: 6
Rep Power: 10 |
You could write a bash script to concatenate them all using a for loop. Or if you don't like bash, you (perhaps inelegantly) could print all of the "cat foo1 foo2.... > foofinished" using python and copy paste it into terminal.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD by anderson, chp 10.... supersonic flow over flat plate | varunjain89 | Main CFD Forum | 18 | May 11, 2018 07:31 |
extract the data | subhas.hunasikatti@gmail. | CFX | 1 | October 24, 2013 02:46 |
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) | cfdonline2mohsen | OpenFOAM | 3 | October 21, 2013 09:28 |
Extract Data from Polyline in a Macro (Tecplot) | Joe | Main CFD Forum | 0 | September 5, 2008 03:46 |
Extract Data from Polyline in a Macro | Joe | Main CFD Forum | 0 | September 5, 2008 03:45 |