|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 17 ![]() |
Hi, OpenFOAMers:
After completing a OF run. I ran foamToVTK to convert the transient data (time 0, 0.01, 0.02, 0.03,...) to VTK. In VTK folder, I saw something like: casename_0.vtk casename_1.vtk casename_108.vtk casename_209.vtk casename_310.vtk casename_411.vtk casename_512.vtk Why the numbers jumpped by 101 starting from 108? How can I output the file with continuous number? Thanks! Pei |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Shivasubramanian Gopalakrishnan
Join Date: Mar 2009
Location: Amherst, Massachusetts, USA
Posts: 15
Rep Power: 16 ![]() |
Pei,
The reason for this is that while outputting the vtk files, the function runTime.timeIndex() is used for obtaining the filename. here is the snippet of code from foamToVTK // Create file and write header // fileName vtkFileName ( fvPath/vtkName + "_" + name(runTime.timeIndex()) + ".vtk" ); you can write a small bash/tcsh script to rename the files to get continuous numbers. here is a sample script. #!/bin/bash #enumerates and renumbers files num=0 for file in $1_?.vtk;do let num++;name=$1_`echo $num`.vtk; mv $file $name;done for file in $1_??.vtk;do let num++;name=$1_`echo $num`.vtk; mv $file $name;done for file in $1_???.vtk;do let num++;name=$1_`echo $num`.vtk; mv $file $name;done for file in $1_????.vtk;do let num++;name=$1_`echo $num`.vtk; mv $file $name;done for file in $1_?????.vtk;do let num++;name=$1_`echo $num`.vtk; mv $file $name;done Cheers Shiva |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 17 ![]() |
Thanks a lot Shiva!
Your script works great! Pei |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 25 ![]() |
The 1.4.1 foamToVTK still creates files from time index. The advantage is that there is a one-to-one correspondence to the absolute time. Disadvantage is that the non-consecutive filenames aren't recognized by Paraview as a time series.
The 1.4.2 instead outputs consecutively numbered files. |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Heng Xiao
Join Date: Mar 2009
Location: Zurich, Switzerland
Posts: 58
Rep Power: 16 ![]() |
Anybody knows why there is
casename_0.vtk casename_1.vtk in the folder? I am using OF 1.4.1, In my case, casename_0.vtk is very short with no field information at all. This causes paraview 3.4 to ignore all the fields in vtk files which are not present in casename_0.vtk. ---------------- time cases: 0, 0.2, 0.4, 0.6, 0.8 VTK names: meshPar2_0.vtk *** meshPar2_1.vtk *** meshPar2_20.vtk meshPar2_40.vtk meshPar2_60.vtk meshPar2_80.vtk |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with channeloodles and foamToVTK | farbfilm | OpenFOAM Running, Solving & CFD | 0 | October 31, 2008 06:28 |
[OpenFOAM] FoamToVTK problem | oevermann | ParaView | 6 | July 11, 2006 16:10 |
Please help see this strange problem | liugx212 | OpenFOAM Running, Solving & CFD | 3 | February 23, 2006 19:03 |
CHT strange problem | MatejK | CFX | 3 | September 1, 2005 06:32 |
A strange problem | Lee | Siemens | 0 | April 3, 2005 13:33 |