|
[Sponsors] |
May 8, 2006, 13:55 |
Acquiring scalar names
|
#1 |
Member
Terry Jordan
Join Date: Mar 2009
Posts: 95
Rep Power: 17 |
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). |
|
May 9, 2006, 06:01 |
I'm afraid there is no such fi
|
#2 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
May 9, 2006, 10:58 |
It is really no problem to par
|
#3 |
Member
Terry Jordan
Join Date: Mar 2009
Posts: 95
Rep Power: 17 |
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. |
|
May 15, 2006, 14:50 |
Look at usage of IOobjectList,
|
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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. |
|
May 17, 2006, 13:01 |
Actually the answer was to use
|
#5 |
Member
Terry Jordan
Join Date: Mar 2009
Posts: 95
Rep Power: 17 |
Actually the answer was to use vtkDirectory but thanks.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 04:18 |
Division by zero exception - loop over scalarField | Pat84 | OpenFOAM Programming & Development | 6 | February 18, 2017 05:57 |
Issue symmetryPlane 2.5d extruded airfoil simulation | 281419 | OpenFOAM Running, Solving & CFD | 5 | November 28, 2015 13:09 |
Diverging solution in transonicMRFDyMFoam | tsalter | OpenFOAM Running, Solving & CFD | 30 | July 7, 2014 06:20 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 01:47 |