CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] export to Paraview own solver (https://www.cfd-online.com/Forums/paraview/12396-export-paraview-own-solver.html)

Nico October 12, 2006 11:26

export to Paraview own solver
 
What format should i use to export to Paraview? I am developing my own solver and i am looking for the best format to use. Paraview has native VTK files, but i could also use Ensight or others. What would be the best choice?

Regards,

Nico

Renato. October 12, 2006 11:44

re: export to Paraview own solver
 
In my opinion, Ensight's format is the easiest to understand, implement and use (even for parallel post-processing). I've put some ParaView stuffs, including the Fortran routines I use to export Ensight's file, available in http://www.nacad.ufrj.br/~rnelias/paraview/

Cheers

Renato.


zxaar October 12, 2006 17:22

re: export to Paraview own solver
 
Where can we find the details of Ensights format, could you provide some links. My solver exports in fieldview, i wish to add more exports to it.

Renato. October 12, 2006 18:59

re: export to Paraview own solver
 
I included the Ensight's format description in the http://www.nacad.ufrj.br/~rnelias/pa...htRoutines.zip file. Take a look ;o)

Regards

Renato.


zxaar October 12, 2006 20:16

re: export to Paraview own solver
 
obrigado pela sua ajuda.

phsieh2005 October 13, 2006 21:08

re: export to Paraview own solver
 
Hi Renato,

I would like to export elmer data to VTK format so that I can use paraview to view the results. I have no idea of VTK format. Do you have any fortran code to show how to export data to VTK format? Thanks!

phsieh2005

Nico October 19, 2006 13:10

re: export to Paraview own solver
 
Any ideas why this is not working?, the ascii version is working fine, but when i try binary its crashing paraview.

Regards, Nicolas

integer::vac (1:nct,0:8) Character*80 :: buffer integer::i,j real*4,dimension(:),allocatable :: xv,yv,zv allocate(xv(1:nvt),yv(1:nvt),zv(1:nvt) )

!---Write geometry file. engold.geo

ensight_geometry='engold.geo';

Open(1,file=ensight_geometry,form='binary');

buffer='Fortran Binary'; Write(1) buffer;

buffer='Exported from Solver'; Write(1) buffer;

buffer='Nicolas ROUSSELON 2006'; Write(1) buffer;

buffer='node id assign';Write(1) buffer;

buffer='element id assign'; Write(1) buffer;

buffer='part'; Write(1) buffer; i=1; Write(1) i;

buffer='fluid'; Write(1) buffer;

buffer='coordinates'; Write(1) buffer;

!NODES

Write(1) nvt;

Write(1) (xv(i), i=1,nvt)

Write(1) (yv(i), i=1,nvt)

Write(1) (zv(i), i=1,nvt)

!ELEMENTS

buffer='hexa8';Write(1) buffer;

Write(1) nct;

Do j=1,nct

Write(1) (vac(j,i),i=1,vac(j,0)),8

EndDo close(1)

Bart Paarhuis January 17, 2013 13:51

Hi Renato,

I compiled and ran your testprogram 'fortran_ensight_test' using CVF on Windows XP. But paraview crashes reading the binary files. I tried all available numeric formats for unformatted data (compiler option). But it won't help.

What compiler/system combination did you use?

Thanks,

Bart

Bart Paarhuis January 17, 2013 15:12

After a lot of trial and error, I finally got the ensight binary files to work with the CVF compiler: :):):)
- open(...,form='binary',convert='BIG_ENDIAN') for the geometry and result files instead of open(...,form='unformatted')
- and using 'C Binary' instead of 'Fortran Binary' as the first line in the geometry file

juliom October 7, 2016 11:15

Dear Renato, I know that this post is pretty old, but I am starting with Paraview after years working with Tecplot. My main challenge is to write my scalar field to Paraview. I downloaded the EnsightRoutines and I see three files. EnisghtCase, WriteEnsightMeshBin and WriteEnsightResults. I am totally lost with them all. Which of these do you recommend me to use to write my own ploting subroutine in FORTRAN.
Thanks in advance for you all!!

Bart Paarhuis October 9, 2016 14:28

Hi Juliome,

It's not that difficult. The 'cas' file contains some general information, like what is the dataformat and the name of the file which contains the grid and a file containing the actual data (in your case your scalar).

I guess you can find more info on the internet with details of the files. To test you better first write in ascii and if that works you write the grid and cas file as binary.

Regards,

Bart

Example:

#
# your comments
#

FORMAT
type: ensight

GEOMETRY
model: yourgridfile.grid

VARIABLE
scalar per element: scalar_name yourdatafile_****.dat

TIME
time set: 1 ts_description
number of steps: 1
filename start number: 0
filename increment: 1
time values: 0.00000E+00

juliom October 10, 2016 12:11

Thank you very much for the reply. Can we use EnsightGold for Paraview? Since I basically use structured grid and transient simulations for CFD, what format is the most recommended for that purpose?

abdullahkarimi April 8, 2017 23:59

Quote:

Originally Posted by juliom (Post 620918)
Thank you very much for the reply. Can we use EnsightGold for Paraview? Since I basically use structured grid and transient simulations for CFD, what format is the most recommended for that purpose?

EnsightGold should work fine in Paraview. In fact, I preferably use this format when exporting file from Fluent and then import into Paraview for visualization.


All times are GMT -4. The time now is 02:33.