[Paraview] *****SPAM***** Re: Questions regarding: volume calculation, xyplot along a curve and tensor calculation

Takuya OSHIMA oshima at eng.niigata-u.ac.jp
Sat Apr 11 00:15:52 EDT 2009


Hi Jie, Renato,

There had been a bug until ParaView 3.4 that led the volume of a wedge
to have been miscalculated as a negated volume of a tetrahedron.
http://www.paraview.org/pipermail/paraview/2008-August/009246.html
http://paraview.org/Bug/view.php?id=7588

The bug has been fixed with the recent CVS versions.

I can confirm that the bug also affects volume calculations of clipped
hexahedral meshes as well by Jie's test.vtk. If I try the .vtk with a
CVS version and follow Jie's procedure I get a volume of 4.95177e-13
which is closer to the analytic value of 5.23599e-13. However if I
revert the bugfix (revert vtkWedge.cxx from the current revision 1.7
to ParaView 3.4's 1.5) I get the identical value with what Jie got,
3.32862e-13.

Takuya OSHIMA, Ph.D.
Faculty of Engineering, Niigata University
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN


From: Renato Elias <rnelias at gmail.com>
Subject: Re: [Paraview] Questions regarding: volume calculation, xyplot along a curve and tensor calculation
Date: Fri, 10 Apr 2009 22:39:36 -0300

> It seems rounding errors... try to scale your model at least 100x to see
> what happens...
> 
> Just to reforce Jie Xu's problem. It's not the first time the Integrate
> Variable presents issues in volume calculations. Take a look:
> http://markmail.org/message/67dkxpypfodylfnr#query:volume%20integration%20paraview%20renato+page:1+mid:67dkxpypfodylfnr+state:results
> 
> In my case, I don't remember if the problem was solved....
> 
> I tried to find my dataset to test it again but I haven't found (yet)....
> :-(
> 
> Renato.
> 
> 
> 
> On Fri, Apr 10, 2009 at 4:30 PM, Jie Xu <victoryxj at gmail.com> wrote:
> 
>> Hi Berk,
>>
>> Thanks for looking at my questions.
>>
>> 1) I attached a sample data set: test.vtk, and the screenshot of my
>> paraview window, from which you can see that the clip is created at
>> (0,0,0) with radius of 50e-6, and the calculated volume is
>> 3.32862e-13, which is much less than what it should be.
>> (Interestingly, in this specific case, the calculated volume is about
>> 2/pi times the real volume.)
>>
>> 2) Thanks for letting me know.
>>
>> 3) Unfortunately, I have no experience with Python. Now I am trying to
>> see if I can use matlab to do the tensor calculates and modify the vtk
>> file readable by paraview.
>>
>> Regards,
>> Jie
>>
>> On Thu, Apr 9, 2009 at 1:51 PM, Berk Geveci <berk.geveci at kitware.com>
>> wrote:
>> > Hi Jie,
>> >
>> >> 1) Volume calculation:
>> >> I found that the "integrate variables" over a sphere clip never gives
>> >> the correct volume. For example, I tried to use a very simple geometry
>> >> and a very fine mesh (a 200x200x200 micron cube with 2 micron cube
>> >> elements), and use paraview to generate a sphere clip that has radius
>> >> of 50 micron in the center of that cube, then I apply the "integrate
>> >> variables" filter to the clip and show the "Cell Data", it gives a
>> >> volume of 4.78818e-13 instead of 5.236e-13, which is 4/3*pi*r^3. The
>> >> discrepancy is so large that it just cannot be due to the coarseness
>> >> of the mesh. Different mesh and different size of clips gives
>> >> different discrepancies, and I cannot find any obvious relationship
>> >> between the paraview-calculated volume and the real volume.
>> >
>> > When I create a 100^3 wavelet and clip it with a sphere of radius 20,
>> > I am getting a volume of 33447.5 which is pretty close to the analytic
>> > value of 33510.3. Can you send me a dataset that demonstrates this
>> > problem?
>> >
>> >> 2) X-Y plot: how can I do a xyplot of a scalar along a curved line?
>> >> For example, if I have the pressure field data from a
>> >> flow-around-a-cylinder case, I want to plot the pressure along the
>> >> surface of the cylinder as a function of angle or arc length.
>> >
>> > You can't, yet. I am working on that feature for the next release.
>> >
>> >> 3) tensor calculation: I have the pressure field and velocity field
>> >> calculated from a CFD tool (Transat in my case), how do I calculate
>> >> stress tensors at each point from P V field in paraview?
>> >
>> > Let me ask a question back : do you have any Python knowledge? We are
>> > working on making this really simple but currently the array
>> > calculator is too limited and cannot produce tensors. However, this is
>> > doable using the programmable filter.
>> >
>> > -berk


More information about the ParaView mailing list