CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Postprocess lagrangian fields

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 21, 2006, 11:50
Default Hello Everyone, I have run
  #1
Member
 
David Hebert
Join Date: Mar 2009
Posts: 31
Rep Power: 17
dhebert is on a distinguished road
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
dhebert is offline   Reply With Quote

Old   December 21, 2006, 11:58
Default Hi again, Regarding the abo
  #2
Member
 
David Hebert
Join Date: Mar 2009
Posts: 31
Rep Power: 17
dhebert is on a distinguished road
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
dhebert is offline   Reply With Quote

Old   December 21, 2006, 18:46
Default 2] there is no OpenFOAM classe
  #3
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
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.
mattijs is offline   Reply With Quote

Reply


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
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


All times are GMT -4. The time now is 22:21.