Hello Ken,

Thank you for the provided solution, however, it seems like the solution does not work well: using the Paraview 5.2.0 (I just downloaded the latest version, and realizing that there is a modification on showing the max counter of time steps), after applying the method you provided, it artificially works for the first 9 counts, but when you input "10", then you would realize that
the mismatch is still there :D

I have found the following weired situation:

1) The time values in field.case, field.pvd, geo_stl.pvd are all exactly the same and are all in ASCII format. 2) When paraview read in the field.pvd or geo_stl.pvd, it will change the floating point values slightly, however, it maintains consistence if they are ".pvd" files. Therefore, it correctly synchronizes these two data sets. 3) When paraview read in the field.case, the floating point representation of the time values are changed slightly and are not consistently with ".pvd" files. However, in this mixed case, the "0" value is the same, so paraview merges field.case and geo_stl.pvd for time "0", and reduces the total number of cases from 11 + 11 to 21. (sorry for previous miscalculation of the counter, it's 11 rather than 10 for each data set.)

Is it because when reading Ensight format, paraview choose single precision, but using double precision for .pvd file? Is there a way to fix this problem, since
the time values are all in ASCII format.

Thanks,
Huangrui

On 2016-12-01 03:35 PM, Moreland, Kenneth wrote:
Huangrui,

I found a work around that I think does what you want. After you load in your 
two data sets, right click on one of them in the Pipeline Browser and check on 
the “Ignore Time” option. This will tell ParaView to ignore the time in that 
data set, so will only visit the time steps in the other data set.

Actually, this _almost_ works. There is in fact a problem (at least with the 
example data sets you sent us). The imprecision is not uniform. Sometimes the 
time for field.case is ahead, other times the time for geo_stl.pvd is ahead. 
So, when you play through the time steps, sometimes the data for which you are 
ignoring time are skipped because the time is first just before one step and 
then just after another.

To fix this problem, you can use the Temporal Shift Scale filter to adjust the 
time of one of the data sets to subtract a bit to ensure that every time hits 
in between time steps. Here is specifically what I did with the test data that 
you sent to fix the problem.

1. Load in the field.case and geo_stl.pvd files. Apply both.
2. Add the Temporal Shift Scale filter to geo_stl.pvd. Set the Pre Shift to 
-0.005. Apply.
3. Right click on TemporalShiftScale1 in the pipeline browser and select 
“Ignore Time”

Now when you hit play you should get the right amount of time steps with the 
data you expect loaded.

-Ken

On 12/1/16, 1:58 PM, "Huangrui Mo" <huangrui...@uwaterloo.ca> wrote:

     Hello Alan and Ken,
Thank you very much for your prompt response of my question. After testing your suggestions, I found both the Real Time Mode and
     Sequence Mode can correctly synchronize the
     two data sets with mixed formats, if a correct number of steps is given.
     However, both of the above two methods
     share a common subproblem: they give artificial time steps that are
     different with the "true" time moments contained in
     the case (or pvd) files, when a annotated time filter is used, even the
     specified number of steps matches the true number of case files.
Regarding the Snap to Timesteps mode and the numerical imprecision of
     the different times problem raised by Ken, I provided an example
     data set attached in this email. This data set contains the simulated
     flow field of three airfoils running on a fixed Cartesian background grid.
     Since the Cartesian grid is fixed, therefore, using Ensight format for
     the field data has the advantage to avoid outputting the grid
     coordinates in each
     time step but only the physical quantities. To facilitate the testing, I
     solved this problem exactly twice, the only difference is that one uses
     Ensight for field data
     and VTK for geometry, the other uses both VTK. Each data sets has 10
     time sequences, and the time steps in each data sets are all the same.
When loading the mixed data sets, the field.case + geo_stl.pvd gives 20
     sequences, and the field.pvd + geo_stl.pvd  gives 10 synchronized 
sequences.
Due to the artificial times steps in the Real Time Mode and Sequence
     Mod, is there a way to synchronize the mixed case in the Snap to
     Timesteps mode?
Thanks a lot,
     Huangrui
On 2016-12-01 01:54 PM, Moreland, Kenneth wrote:
     > Actually, I think Sequence mode is more appropriate than Real Time mode 
in this case, but I too think that is the answer.
     >
     > To explain more what (we think) is going on: When you load data with 
time in ParaView, it goes to a Snap to Timesteps mode where it will visit each 
unique timestep once regardless of how far apart they are. Thus, ParaView is 
treating the numerical imprecision of the different times as unique time steps. If 
you switch to Sequence or Real Time mode, ParaView uses its own time units and 
will provide an even temporal spacing.
     >
     > There is more information about the different animation modes in the 
ParaView tutorial.
     >
     > -Ken
     >
     > Sent from my iPad so blame autocorrect.
     >
     >> On Dec 1, 2016, at 11:35 AM, Scott, W Alan <wasc...@sandia.gov> wrote:
     >>
     >> Not sure if this is the correct answer, but try view/ animation View.  
Then, change the Mode to Real Time.  Enter your start time and end time, and number 
of time steps of interest (i.e., 500).
     >>
     >> Is that what you are looking for?
     >>
     >> alan
     >>
     >> -----Original Message-----
     >> From: ParaView [mailto:paraview-boun...@paraview.org] On Behalf Of 
Huangrui Mo
     >> Sent: Thursday, December 1, 2016 9:54 AM
     >> To: paraview@paraview.org
     >> Subject: [EXTERNAL] [Paraview] Time Synchronization for Case and 
Geometry Sequences
     >>
     >> Dear Paraview Developer,
     >>
     >> May you please help me with the following issue:
     >>
     >> Suppose when a solver writes data out, the field data is written in Ensight 
format, and the time sequence is streamed in "ensight.case".
     >> Meanwhile, the geometry data is written in VTK format, and the time sequence is 
streamed in "paraview.pvd".
     >> At last, let's assume the number of time sequences is 500.
     >>
     >> Then, when loading into paraview, it does not synchronize the cases in 
a perfect sense and would show up with 1000 cases. When animating, there is a slight 
mismatch in time for the field data and geometry data.
     >> However, if I use the VTK format for both the field and geometry data, 
then paraview does a great job to synchronize the data sets.
     >>
     >> Therefore, my question would be that is it possible to handle time 
synchronization even for different formats?
     >>
     >> Thank you very much for your time and help, Huangrui
     >>
     >> --
     >> *****************************************************
     >> Huangrui Mo, PhD Candidate
     >> Fluid Mechanics
     >> Department of Mechanical & Mechatronics Engineering University of 
Waterloo Waterloo, Ontario N2L 3G1, Canada
     >> E-mail: huangrui...@uwaterloo.ca
     >> *****************************************************
     >>
     >> _______________________________________________
     >> Powered by www.kitware.com
     >>
     >> Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html
     >>
     >> Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView
     >>
     >> Search the list archives at: http://markmail.org/search/?q=ParaView
     >>
     >> Follow this link to subscribe/unsubscribe:
     >> http://public.kitware.com/mailman/listinfo/paraview
     >> _______________________________________________
     >> Powered by www.kitware.com
     >>
     >> Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html
     >>
     >> Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView
     >>
     >> Search the list archives at: http://markmail.org/search/?q=ParaView
     >>
     >> Follow this link to subscribe/unsubscribe:
     >> http://public.kitware.com/mailman/listinfo/paraview
--
     *****************************************************
     Huangrui Mo, PhD Candidate
     Fluid Mechanics
     Department of Mechanical & Mechatronics Engineering
     University of Waterloo
     Waterloo, Ontario N2L 3G1, Canada
     E-mail: huangrui...@uwaterloo.ca
     *****************************************************

--
*****************************************************
Huangrui Mo, PhD Candidate
Fluid Mechanics
Department of Mechanical & Mechatronics Engineering
University of Waterloo
Waterloo, Ontario N2L 3G1, Canada
E-mail: huangrui...@uwaterloo.ca
*****************************************************

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to