CTH velocities are calculated incorrectly
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
We've found a problem with how paraview reads in velocities from CTH spyplot files which appears to have been a problem since at least 3.6.2. The problem is related to how CTH outputs velocities in it's spyplot files.
First of all, note that velocities are treated differently in CTH compared to all the other variables. All non-velocity values are cell-centered quantities, but velocities are face-centered quantities (x velocities on faces with an x normal, y velocities on faces with y normal, and z velocities on faces with a z normal). In order to get an appropriate cell-centered value for velocity, you have to average the velocities for opposing faces.
This is where we run into problems. Spyplot does not do this averaging before it outputs its results to an spcth file. When it outputs velocities for a cell, it is actually outputting the velocities on the bottom faces, i.e. on the x, y, and z faces that have a smaller quantity centroid than the other x, y, or z face on the cell. In order to get the cell-centered velocities, you need to take the velocities output for the cell and average them with the appropriate cells adjacent in the positive x, y, and z directions. This is elaborated in 2-D in the attached PDF file; 3-D is a simple extension.
Although this is a quirk of the CTH data, it is very much needed for this to be incorporated into paraview so that the proper velocities are output. It is an issue for all CTH visualization, but it is most evident using the material interface filter, which outputs improper averaged velocities for fragments, thus making velocity vector and momentum computations incorrect.
All of this was determined through direct debugging of routines within paraview, and has been confirmed with the CTH developers. I have a very simple, small test case which demonstrates all these issues and is unclassified. Please let me know if you would like it.
Please let me know if you have any questions about any of this.
Note from Alan - I have the dataset example. It is called CTH-velocities.