[Paraview] read Plot3D files

Joelle Caro Joelle.Caro at ec-lyon.fr
Wed Sep 20 08:13:14 EDT 2006


Le mercredi 20 septembre 2006 à 12:01 +0200, Beer alexandre a écrit :
> Hello,
> 
> I use a 3D numerical code written in fortran. I save my results and
> then post process it in plot3D format. It seems to work (I put the
> format I use below, it can help because I search for few weeks to find
> it). 
> 
> My problem is the folllowing. The grid seems to be correctly read
> (image for 5 blocks below). When I read the field and look at a slice
> of the field, I observe a problem at the connection between blocks.
> For each block, the first nodes (1 node for the block 2, 2 nodes for
> the block 3, 3 for the block 4, etc...) are read from another block
> (see image below). 
> 
> Is anybody had the same problem? The fields and the grids have the
> same size (nx(ib)*ny(ib)*nz(ib)) and I cannot find what is this
> "missreading".
> 
> Thank you for your help,
> Alexandre BEER
> 
> ****************************** 
> *******
> To read with paraview, I use the flags
> - Binary
> - Multi-block
> - Fortran byte count
> and
> - little endian
> 
> - writing the grid file (multiblocks nblocks, cartesian grid (vectors
> x(i), y(j), z(k))
> 
>        open(11,file='grid.xyz',form='unformatted')
>        rewind (11)
>        write  (11) nblocks
>        write  (11) (nx(ib),ny(ib),nz(ib),ib=1,nblocks)
>        do ib=1,nblocks
>         write(11) ((((x(i,ib)),i=1,nx(ib)),j=1,ny(ib)),k=1,nz(ib)),
>      .
> ((((y(j,ib)),i=1,nx(ib)),j=1,ny(ib)),k=1,nz(ib)),
>      .
> ((((z(k,ib)),i=1,nx(ib)),j=1,ny(ib)),k=1,nz(ib))
>        enddo
>        close  (11)
> 
> - writing the fields (multiblocks, 5 components (density, momentum in
> 3 directions, total energy))
> 
>        open(11,file='field.q',form='unformatted')
>        rewind(11)
>        write(11) nblocks
>        write(11) (nx(ib),ny(ib),nz(ib),ib=1,nblocks)
>        do ib=1,nblocks
>         write(11) rMa1(ib),alpha1(ib),Re1(ib),ttime1(ib)
>         write(11)
> (((((w(i,j,k,m)),i=1,nx(ib)),j=1,ny(ib)),k=1,nz(ib)),m=1,5)
>        enddo
>        close(11)
> 
> ******************************************
> Dr. Alexandre BEER
> Univ. di Roma "La Sapienza"
> Dipart. di Meccanica e Aeronautica
> Via Eudossiana, 18
> 00184 Roma (Italia)
> ******************************************
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview



hello,


I have got the same problem. I use paraview 2.2.1, which I build with
cmake.

I'm not sure, but I think there is a missing line in the function 

vtkPLOT3DReader.cxx.

function : Execute()
I add the line :

961      this->SkipByteCount(qFp);


This could explain the difference of one node you see on the display of the field.



Joëlle Caro 
Laboratoire de Mécanique des Fluides et d'Acoustique 
Ecole Centrale de Lyon 69134 Ecully CEDEX, FRANCE
 



More information about the ParaView mailing list