Hello Everyone, I have run
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:
for(label i=0; i<40; i++)
p >> dummy;
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,
Hi again, Regarding the abo
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?
2] there is no OpenFOAM classe
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.
|All times are GMT -4. The time now is 16:33.|