|
[Sponsors] |
December 28, 2007, 14:49 |
Hi, OpenFOAMers:
After comp
|
#1 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18 |
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 |
|
December 28, 2007, 16:25 |
Pei,
The reason for this is
|
#2 |
New Member
Shivasubramanian Gopalakrishnan
Join Date: Mar 2009
Location: Amherst, Massachusetts, USA
Posts: 15
Rep Power: 17 |
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 |
|
December 28, 2007, 21:53 |
Thanks a lot Shiva!
Your sc
|
#3 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18 |
Thanks a lot Shiva!
Your script works great! Pei |
|
December 29, 2007, 09:41 |
The 1.4.1 foamToVTK still crea
|
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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. |
|
January 4, 2009, 01:03 |
Anybody knows why there is
|
#5 |
Member
Heng Xiao
Join Date: Mar 2009
Location: Zurich, Switzerland
Posts: 58
Rep Power: 17 |
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 |
|
April 24, 2023, 22:12 |
simple fix for later versions of openfoam
|
#6 |
New Member
Join Date: May 2018
Posts: 1
Rep Power: 0 |
For later versions of openfoam (I've only checked for 7+, 2000+), just use the flag "-useTimeName" and it will name the VTK files properly.
|
|
May 31, 2024, 06:06 |
foamToVTK time index problem
|
#7 |
Member
Rajat soni
Join Date: Oct 2016
Posts: 32
Rep Power: 10 |
Dear Colleagues,
I am simulation dieselSpray with multiComponentFluid solver in OpenFOAM 11 version. I using "foamToVTK -useTimeName" to visualize the spray parcels under "VTK/lagrangian/cloud" folder. The files are named as cloud_0, cloud_0.0005, cloud_0.0006, .... and so on. However, when I visualize it in Paraview, the time steps are shown as 0, 1, 2, .... so on. Can anyone tell me if I am missing some flag here while converting to VTK or something else that I should consider? Best regards |
|
|
|
Similar Threads | ||||
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 |