[Paraview] vtu: how to represent variation in cell end values?

Emily Leigh ecl4b at hotmail.com
Thu Mar 25 15:43:16 EDT 2010


Hello,



I am writing a vtu file to represent data for a simple dataset in 
Paraview and I have run into a problem.  What I would like to do is to 
be able to represent a variation in a field value over the length of a 
cell and look at this variation as a single layer in Paraview (not 
separately as the sets of end values for end 1 and end 2, 
respectively).  More simply, each cell is assigned a field value at each 
end point and I want to be able to visualize this variation in end 
values for each cell for all of the cells in my (small) model.



As the simplest example of my problem, let's say I have 3 points and 2 
cells between the points.  Cell 1 has point 1 at its left end and point 
2 at its right end and cell 2 has point 2 at its left end and point 3 at 
its left end (in my field this might represent a beam finite element). 
1---2---3

Cell 1: 1=>2 (finite element 1)

Cell 2: 2=>3 (finite element 2)



I've figured out how to represent the field data at the points 
(physically these would be displacements, rotations, etc.).  However, I 
need to figure out what syntax to use to represent the variation in a 
physical quantity over the length of the cell.  Let's say the y-force 
for element 1 has values of 100 at point 1 and -500 at point 2, and that 
y-force for element 2 has values of +500 at point 2 and -200 at point 3.



Locally this variation in y-force is:

Cell 1: 100=>-500

Cell 2: +500=>-200



Summing the effect of the y-force at each point:

Point 1: 100

Point 2: -500+500 = 0

Point 3: -200



I have tried the following syntax:

<CellData Scalars="scalars">

<DataArray type="Float32" Name="y-force-el" NumberOfComponents="2">

100 -500

500 -200

</DataArray> 


However, when I used the above syntax I found that in Paraview I can 
only view the x-points (100 and 500), the y-points (-500 and -200) or 
the vector magnitudes for each cell (509.9 and  538.5) at one time.



Does anyone know what syntax I need?



(Once I figure out the syntax, I'll be all set to modify the code I 
wrote to read in my data and output it to vtu format).



Thanks!



-Emily
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/210850553/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100325/0335a1c5/attachment-0001.htm>


More information about the ParaView mailing list