OK, but I'm not going to give you all my code because it is not public
and it contains many other (small) things.
First of all, I suggest you to be familiar with FDS2ASCII.
I am far from being very familiar with VTK and I did the job a long
time ago, so it will be hard for me to help you further.
You can find some information at:
http://www.vtk.org/VTK/img/file-formats.pdf
Be careful to use the right space in the vtk file and you should know
that some vtk readers are case sensitive.
So, here is the part of my code that write out the vtk file:
! HEADER
WRITE(45,"(A26)") '# vtk DataFile Version 3.0'
WRITE(45,'(A)') CHID
WRITE(45,'(A5)') 'ASCII'
WRITE(45,'(A24)') 'DATASET RECTILINEAR_GRID'
! MESH
WRITE(45,'(A11,I4,A,I4,A,I4)') 'DIMENSIONS ', I2-I1+1, ' ', J2-J1+1, '
', K2-K1+1
! COORDINATES
WRITE(45,'(A14,I4,A7)') 'X_COORDINATES ', I2-I1+1,' DOUBLE'
WRITE(45,*) (M%X(I),I=I1,I2)
WRITE(45,'(A14,I4,A7)') 'Y_COORDINATES ', J2-J1+1,' DOUBLE'
WRITE(45,*) (M%Y(J),J=J1,J2)
WRITE(45,'(A14,I4,A7)') 'Z_COORDINATES ', K2-K1+1,' DOUBLE'
WRITE(45,*) (M%Z(K),K=K1,K2)
! NUMBER OF POINTS
WRITE(45,'(A11,I7)') 'POINT_DATA ', (I2-I1+1)*(J2-J1+1)*(K2-K1+1)
! DATA
DO L=1,NV
WRITE(45,*)
WRITE(45,"(A7)") 'SCALARS'
WRITE(45,'(A,A)') TRIM(SLCF_TEXT(IS(L))) ,' DOUBLE'
WRITE(45,"(A20)") 'LOOKUP_TABLE DEFAULT'
DO K=K1,K2
DO J=J1,J2
DO I=I1,I2
WRITE(45,*) Q(I,J,K,L)
ENDDO
ENDDO
ENDDO
ENDDO
It may not be the best way to do the job, but it works fine for me.
Sorry for posting part of code in this discussion area.
Good luck !
On 15 oct, 17:27, "
chenli...@gmail.com" <
chenli...@gmail.com> wrote:
> Thanks for your information.
> Could you please tell me how did you modified fds2ascii to visualize
> slice data? Or can I have your code?
>
chenli...@gmail.com
>
> On Oct 14, 3:50 am, "/SD" <
sdesangh...@free.fr> wrote:
>
> > Well, Paraview is very powerful if you want to apply different filters
> > to the data (for example, the streamlines are very nice !). But I
> > don't think you will get better animation than using Smokeview,
> > especially when looking at smoke.
> > If you want to animate slices, you have to convert FDS files into data
> > Paraview can read. Personally, I have extended the FDS2ASCII code to
> > do the job, by writting the data into vtk file format. That creates
> > big ascii files.
> > Here is an example of fire visualisation with Paraview (Sandia Labs.):
http://www.vimeo.com/2016815Maybeyou can ask them.