Welcome, Guest
Username: Password: Remember me

TOPIC: how to convert the .slf file into .vtk file?

how to convert the .slf file into .vtk file? 3 years 7 months ago #36785

  • wentaogong08
  • wentaogong08's Avatar
hello, I get used to using the paraview, I have read the previous posts about the problem, but I still don't know how to operate it. could you give me a detailed procedure?
The administrator has disabled public write access.

how to convert the .slf file into .vtk file? 3 years 7 months ago #36796

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 243
Hi you can use:
converter.py srf2vtk file.srf file.vtk

But so far it will be a ascii VTK. Binary is still in the todo list.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

how to convert the .slf file into .vtk file? 3 years 1 month ago #38077

  • Scott
  • Scott's Avatar
Hello everybody,

I'm trying to convert slf file to vtk to read my results (2D telemac simulation) in Paraview. I read the topics about this subjects in the forum and I'm a little bit confused.

I tried two manipulations :
(1) First method from opentelemac.org/index.php/kunena/paravie...-paraview-in-windows
- I have placed my result file (simulation_result.slf) and the sel2vtk.py code in the same folder.
- Then I came in this folder with the cmd command from the TELEMAC v8p1r1 cmd thaht we created at the installation of Telemac (the one we use to compute our simulation).
- Then I wrote the command "python sel2vtk.py -i simulation_result.slf -o results.vtk" but I have the error message : "ImportError: No module named ppmodules.selafin_io_pp"
- So I tried to intall it with the command "pip install ppmodules.selafin_io_pp​" but pip is not recognised...

(2) Second method from this topic
I followed the sugestion from yugi and I wrote "converter.py srf2vtk file.srf file.vtk" instead of "python sel2vtk.py -i simulation_result.slf -o results.vtk" but it's not working anyway.

Could you help me please ?
I'm working on windows.
Thanks
Attachments:
The administrator has disabled public write access.

how to convert the .slf file into .vtk file? 3 years 4 weeks ago #38105

Hello Scott,

if you have problems with python you can use stbtel as an alternative. It is also very straight forward. Attached you find an example of a steering file.
Attachments:
The administrator has disabled public write access.

how to convert the .slf file into .vtk file? 3 years 3 weeks ago #38140

  • Scott
  • Scott's Avatar
Hello s_gegenleithner,

Thanks for your respond. I never use a converter file so I tried to execute it with the cmd associate with telemac.
I put all the files (result.slf and stbtel_vtk.cas) in the same folder and I execute the command : telemac2d.py stbtel_vtk.cas.

But I have the following error message

I assume STBTEL is a kind of programme, do you know where I can find it and how execute the command ?

Thanks for your help
Attachments:
The administrator has disabled public write access.

how to convert the .slf file into .vtk file? 3 years 3 weeks ago #38144

  • Scott
  • Scott's Avatar
Ok I have answer my own question.
To put in a nutshell for dudes like my who are'nt yet user frendly with this type of working :
(1) : With the cmd that you'are created during the installation of telemac go where the scripts are (C:\opentelemac-mascaret\v8p1r1\scripts\python27)
(2) : Put your result file .slt and the stbtel_vtk.cas file from s_gegenleithner in your scripts folder (it's not very efficient, surely there are another way to deal with that)
(3) : Execute stbtel stbtel_vtk.cas

In my case the cmd are kind of freeze (image 3), I'm not sure it's normal but still it's not an error message (and my result file .slf is big)
Attachments:
The administrator has disabled public write access.

how to convert the .slf file into .vtk file? 3 years 3 weeks ago #38149

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3630
  • Thank you received: 1010
Hi Scott
You understand the principle
By the way, you don't have to copy the result dans the stbtel_vtk.cas in the script directory, you could just call the script from the location of your result file...

I would advise you to use python3 scripts rather than python27, and myabe to upgrade your version to the latest one (v8p2)

Regards
Christophe
The administrator has disabled public write access.

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.