CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Paraview & paraFoam (http://www.cfd-online.com/Forums/openfoam-paraview/)
-   -   Acquiring scalar names (http://www.cfd-online.com/Forums/openfoam-paraview/61280-acquiring-scalar-names.html)

tj22 May 8, 2006 13:55

As discussed before I am writi
 
As discussed before I am writing a reader for paraview which does not require installing OpenFOAM. I am looking through the files to obtain the names of the scalars for the timesteps while the names for timestep 0 are available in fvSolution, I cannot locate a file containing the names of all the scalars available in the other timesteps. There seem to be more scalars in those timesteps than in timestep 0.

So is there a file that contains these names? Or will I have to do a directory dump? (which will cause a problem of not being cross platform).

gschaider May 9, 2006 06:01

I'm afraid there is no such fi
 
I'm afraid there is no such file (and it's even worse: you'll have to look into the files to determine whether they're vol-Fields or not)

tj22 May 9, 2006 10:58

It is really no problem to par
 
It is really no problem to parse the header to determine vector, scalar, etc, it is however a problem to have no idea what files are avaible to parse.

I guess my only option is to call a system command to acquire the directory structure, that is going to be painful.

mattijs May 15, 2006 14:50

Look at usage of IOobjectList,
 
Look at usage of IOobjectList, e.g. in dataConversion/foamDataToFluent/foamDataToFluent.C

It will return you a list of all Foam files in a time directory. You can then use e.g. lookupClass to extract files of a certain type.

tj22 May 17, 2006 13:01

Actually the answer was to use
 
Actually the answer was to use vtkDirectory but thanks.


All times are GMT -4. The time now is 11:55.