[vtkusers] FLUENT CellDataToPointData inconsistencies

Kevin Hoopes khoopes at byu.edu
Wed Jan 12 14:15:47 EST 2011


Hello,

This is my first post to this list after being a casual observer for a
while. Let me describe my problem. I have a data set that I produced in
FLUENT that I am trying to load into a program that I wrote in VTK. As I am
sure everyone knows FLUENT is a Computational Fluid Dynamics analysis
package. One of the tenets of CFD that I exploit in my program is what is
called the no slip condition. That the velocity will be zero at the wall or
obstacle. The problem is that when I load my FLUENT data into VTK convert it
to point data and then write it as a vtu file and then examine it in
ParaView there are no points that have zero velocity, the points are there,
there is just nowhere where its zero. But at the same time, if I export the
data from FLUENT in ensight format and then read it into VTK or ParaView, it
works as expected. Also, if I load the FLUENT data into the EnSight program
it also works. Tecplot also works. Both of these programs show the zero
velocity condition at the wall. So In summary here is my problem

FLUENT file -> CellDataToPointData -> Examine in VTK = No zero velocity
locations (this is done in my main program, the attached is but a sample of
what I am trying to do)
FLUENT file -> CellDataToPointData -> write to VTU -> ParaView examination =
No zero velocity locations (this is what the attached program does)
FLUENT -> Point Data formated ensight file -> ParaView examination = zero
velocity locations as anticipated
EnSight reading fluent files -> write to ensight file -> Paraview
examination = zero velocity locations as anticipated

>From what I can tell there is something going on either with the Fluent
reader in VTK or the celldatatopointdata that is producing different results
and, in my opinion, changing the data.

As a side note, loading the FLUENT files directly into Paraview doesn't
really seem to work. I am experiencing the same issue that is described
here,

http://www.mail-archive.com/paraview@paraview.org/msg10346.html

but this is not just a ParaView problem, when I use thresholding in VTK to
find the Zero Velocity boundries it works if I start from a FLUENT exported
Ensight file but does not work if I start from a FLUENT file. The difference
it seems is using FLUENT's celldatatopointdata or VTK's

<http://www.mail-archive.com/paraview@paraview.org/msg10346.html>Now, the
reader will have to understand a few things in order to hopefully provide
some help.

1. I am doing University research and am not working for
a commercial company
2. I am new to VTK and Paraview and CFD in general so go easy on me
3. There are quite possibly options I could be using in the FLUENT, the
FLUENT reader or CellDataToPointData or XMLUnstructuredGridWriter that could
solve my problem
4. I am not claiming that VTK is messing up and that I am guiltless, its
probably some option I don't understand.
5. Maybe there is some way to have fluent not do a multiblock dataset?


Here is my test C++ code

#include<vtk/vtkPoints.h>
#include<vtk/vtkPolyData.h>
#include <vtk/vtkPolyDataWriter.h>
#include <vtk/vtkUnstructuredGrid.h>
#include <vtk/vtkIdList.h>
#include <vtk/vtkFLUENTReader.h>
#include <vtk/vtkUnstructuredGridWriter.h>
#include <vtk/vtkCellDataToPointData.h>
#include <vtk/vtkXMLUnstructuredGridWriter.h>
#include <vtk/vtkMultiBlockDataSet.h>

#include <vector>

using namespace std;

int main () {
cout << "Begin Reading File." << endl;
 vtkFLUENTReader *fluent = vtkFLUENTReader::New();
fluent->SetFileName("./oneram6_fine_sep_2.cas");
 fluent->Update();

vtkCellDataToPointData *c2p = vtkCellDataToPointData::New();
 c2p->SetInput(fluent->GetOutput()->GetBlock(0));
c2p->Update();

c2p->GetOutput()->Print(cout);

vtkXMLUnstructuredGridWriter *xmlwriter =
vtkXMLUnstructuredGridWriter::New();
 xmlwriter->SetInput(fluent->GetOutput()->GetBlock(0));
xmlwriter->SetFileName("./sep_test.vtu");
 xmlwriter->SetDataModeToBinary();
xmlwriter->Write();

}

And here are some links to the FLUENT files that I am using, they are pretty
giant, 1.5gb in total, but they are hosted at my school so hopefully it will
be fast.

http://cafestuff.groups.et.byu.net/oneram6_fine_sep_2.cas
http://cafestuff.groups.et.byu.net/oneram6_fine_sep_2.dat


I would also be happy to make the EnSight versions of the same files
available if that would help.

Let me know if there is anymore info that I could provide and thank you in
advance, hopefully it is just some silly mistake of mine, it would really
help my research to get this working.

Kevin Hoopes
khoopes at byu.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110112/6945b394/attachment.htm>


More information about the vtkusers mailing list