CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Tecplot (http://www.cfd-online.com/Forums/tecplot/)
-   -   cell centered form in TECPLOT (http://www.cfd-online.com/Forums/tecplot/15598-cell-centered-form-tecplot.html)

jack August 21, 2008 01:16

cell centered form in TECPLOT
 
i want to show variables in the center of mesh,but the result showed by TECPLOT is on node,why? the code is below:

write(33,*) 'TITLE = "3D"'

write(33,*) 'VARIABLES = "X" "Y" "Z" "Rho" "U" "V" "W"'

write(33,*) 'DATAPACKING=BLOCK, ZONETYPE=FEBRICK,N=',numnp,',','E=',nelem,',','VAR LOCATION=([4-7]=CELLCENTERED)'

! WRITE(33,*) 'DT=(DOUBLE DOUBLE DOUBLE DOUBLE DOUBLE DOUBLE DOUBLE)'

!----------------------BLOCK TYPE---------------------------------

DO I=1,NUMNP

WRITE(33,*) CX(1,I)

END DO

DO I=1,NUMNP

WRITE(33,*) CX(2,I)

END DO

DO I=1,NUMNP

WRITE(33,*) CX(3,I)

END DO

DO I=1,NELEM

WRITE(33,*) uh(1,I,0.D0,0.D0,0.D0)

END DO

write(33,'(///)')

DO I=1,NELEM

WRITE(33,*) uh(2,I,0.D0,0.D0,0.D0)/uh(1,I,0.D0,0.D0,0.D0)

END DO

write(33,'(//)')

DO I=1,NELEM

WRITE(33,*) uh(3,I,0.D0,0.D0,0.D0)/uh(1,I,0.D0,0.D0,0.D0)

END DO

write(33,'(//)')

DO I=1,NELEM

WRITE(33,*) uh(4,I,0.D0,0.D0,0.D0)/uh(1,I,0.D0,0.D0,0.D0)

END DO

!-----------------------------------------------------------------

write(33,'(/)')

do i=1,nelem

write(33,'(<ncount(i)>i10)') nname(i,1),nname(i,3),nname(i,7),nname(i,5),nname( i,2),nname(i,4),nname(i,8),nname(i,6)

end do

close(33)

saygin August 21, 2008 03:42

Re: cell centered form in TECPLOT
 
i encountered that problem too. while i had given the variable locations as cellcentered, it interpolated the values to boundary nodes. well, i doesn't matter most of the time but at the boundary for instance it extrapolates from cell centers to cell boundaries, consequently it seems that the result is wrong for example in case of a fixed value boundary condition. using ghost cells and writing the results including the ghost cells will resolve the problem but this is just a specific solution, not a general purpose one.

hadian August 23, 2008 02:36

Re: cell centered form in TECPLOT
 
i do not work with finite element option. for structured grid by control volume method: 1-load data to tecplot 2-select the zone(s) 3-"points" tab=>"points to plot"=>select "all cell centers"

vadim August 23, 2008 02:50

Re: cell centered form in TECPLOT
 
u should understand that, vertex data is requirement of visualization procedure, in which we need we have some shape function which interpolate color value.

considering this, a cell-centered data is equivalent to picewise-constant interpolation of colors, i.e., we have a fixed color in each cell and so do usually not have a desirable plot.

So you should provide a vertex data (do interpolation of your cell centered data to vertexes) in a consistent manner, if plotter do this for you, it would not be essentially desirable.

btw, Paraview (VTK) (is free) has option for cell-centered data (as i said, picewise constant interpolation),

PS: i use both of paraview and tecplt, paraview is indeed powerful, but bit more difficult to use in particular for begineer

PS: for paraview file format see this: http://www.vtk.org/pdf/file-formats.pdf


All times are GMT -4. The time now is 03:31.