Hi everybody:<div><br></div><div>Well, I'm working with a textfile obtained from FORTRAN with information of positions, displacements, and the value of the pressure or velocity from a model analyzed by FEM. We are analizing how two miscible fluids move over a general geometry. </div>
<div><br></div><div>So I need to implement a visualization using VTK. I thought that perhaps I could do it easily with Mayavi2, so searching info about it in the documentation I found a PDF document called VTK file formats, it's a small part taken from the VVTK User's Guide.</div>
<div><br></div><div>So I read the document and I found how to structure a VTK data file format, but I have not enough information yet and many doubts. I used the examples and I could visualize them quite well inside Mayavi, but now I don't know how to do it for my real example.</div>
<div><br></div><div>From my Fortran file I have this:</div><div><br></div><div><div> 1 .000E+00 .000E+00 .000E+00 .200E+01 .200E+01 .200E+01 485879165.658</div><div> 2 .200E+01 .000E+00 .000E+00 .200E+01 .200E+01 .200E+01 362994604.232</div>
<div> 3 .400E+01 .000E+00 .000E+00 .200E+01 .200E+01 .200E+01 287889668.714</div><div> 4 .600E+01 .000E+00 .000E+00 .200E+01 .200E+01 .200E+01 249984468.929</div><div> 5 .800E+01 .000E+00 .000E+00 .200E+01 .200E+01 .200E+01 224851296.708</div>
</div><div><br></div><div>there are the first five lines with information, the first col is simply the number of the row, the following three columns are the x, y and z values of the position for each point, the next three are the values of the displacements, and the final column is the value of the pressure in each point.</div>
<div><br></div><div>So in the analysis we divide the phenomenon in 5 subdomains, so in each case we have this array.</div><div><br></div><div>Well I understand I should build a VTK file like this:</div><div><br></div><div>
<div># vtk Datafile Version 3.0</div><div>Visualization of subdomains 1</div><div>ASCII</div><div>DATASET STRUCTURED_GRID</div><div>DIMENSIONS 3 3 3</div><div>POINTS 5 float</div><div>.000E+00 .000E+00 .000E+00</div><div>
.200E+01 .000E+00 .000E+00</div><div>.400E+01 .000E+00 .000E+00</div><div>.600E+01 .000E+00 .000E+00</div><div>.800E+01 .000E+00 .000E+00</div><div><br></div><div>SCALARS dataName dataType numComp</div><div>LOOKUP_TABLE tableName</div>
<div>s0</div><div>s1</div><div>...</div><div>sn-1</div><div><br></div><div><br></div><div>CELL_DATA</div><div><br></div><div>I gave a name, later I say the data are in ASCII format, and according we want to see, from what I read I think the DataSet should be Structured grid, I'm not sure what should I write as dimension, but I guess if my visualization is 3d perhaps I should use 3 for x, y and z; later the real number of points are 125, but I preffer use only five for now, that's what I wrote. Later as in the examples I saw I took the first points from the quoted Fortran file (cols 2-4), and my real problem is how to describe the data structure.</div>
<div><br></div><div>I know I have 125 scalar dots, so I think this is the right structure. But I'm not sure what shoudl I write as dataName, dataType and numComp, later I have another parameter, the Lookup table, but I don't understand how to use it or if I don't need to use ite, finally the point_data and cell_data parameters, how to use them?</div>
<div><br></div><div>I hope you can help me, I'm in a hurry with this and I don't have enough examples or documentation for solve my doubts.</div><div><br></div><div>Thaks:</div><div>Aradnix</div>
</div>