|
[Sponsors] |
December 21, 2006, 11:50 |
Hello Everyone,
I have run
|
#1 |
Member
David Hebert
Join Date: Mar 2009
Posts: 31
Rep Power: 17 |
Hello Everyone,
I have run a simulation with dieselFoam. I would now like to read the position and diameter of a parcel and make a pdf at a partucular time. I am attempting to read the lagrangian/positions field and am having trouble setting the file pointer to where the data starts. For example, if I use: IFstream p(positionsFile); Info<<endl; string dummy; for(label i=0; i<40; i++) { p >> dummy; Info<<dummy<<endl; } I get an error when the IFstream reaches a non-string, which happens to be the text "FoamFile": --> FOAM FATAL IO ERROR : wrong token type - expected string found on line 9 the word 'FoamFile' Can someone give pointers on how to read this data? Right now I have the data in ascii format, but would like to eventually read binary data. Thanks in advance for your help, David |
|
December 21, 2006, 11:58 |
Hi again,
Regarding the abo
|
#2 |
Member
David Hebert
Join Date: Mar 2009
Posts: 31
Rep Power: 17 |
Hi again,
Regarding the above question of reading lagrangian fields, perhaps it would be easier to read the vtk file? Is there an OpenFOAM class that would read a particular variable from a vtk file? Thanks again, David |
|
December 21, 2006, 18:46 |
2] there is no OpenFOAM classe
|
#3 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
2] there is no OpenFOAM classes to read vtk files.
1] the lagrangian fields are IOFields(i.e. registered fields residing in the case directory). Easiest is to study one of the data converters (e.g. foamToVTK) in the postProcessing utilities source directory. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
F_UDMI how to postprocess? | Kasper Skriver | Fluent UDF and Scheme Programming | 29 | March 22, 2013 07:12 |
SOS, postprocess aspect ratio | hedonist | FLUENT | 3 | September 1, 2010 11:02 |
does FIDAP support other postprocess software? | ztdep | FLUENT | 0 | April 13, 2006 11:35 |
about transient postprocess problems | limingtiger | Siemens | 0 | September 10, 2005 21:37 |
UDF's to access Postprocess data | ivor | FLUENT | 1 | December 15, 2003 11:07 |