CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Post processing - graphs (http://www.cfd-online.com/Forums/main/6585-post-processing-graphs.html)

Lucas Rainer September 19, 2003 02:36

Post processing - graphs
 
Dear friends

I need some advice. I have results on arbitrary unstructured meshes, obtained with the Finite Volume method. Now I need to plot graphs of the results along certain straight lines through the mesh (2D meshes).

But there are 2 problems

1) The cell centres are not located in straight lines due to the complex mesh structure. 2) The cell centres are not evenly spaced along lines

How do I solve this problem without spending millions $$$ on high tech pp software??

Any advice will be greatly appreciated!


Praveen September 19, 2003 03:06

Re: Post processing - graphs
 
Tecplot can extract data along any specified line but it costs $$$, and I dont think it takes cell-centered data. The best option is to interpolate your CC data onto the specified line. Its quite simple to use least squares interpolation. First choose some points on the line, then find in which cell each one lies and then find the neighbouring cells. Using the data at all these cells interpolate to the required point using least squares. If you want any help with least squares interpolation mail me praveen[at]aero.iisc.ernet.in

Lucas Rainer September 19, 2003 05:04

Re: Post processing - graphs
 
Hello Praveen

Thank you for the information. Once I have the point, the cell it lies in and that cells neighbouring cells, do I calculate the gradient over the cell (using Gauss theorem) the point lies in and then use the gradient and the cell value to predict the value at the point?

Thank you Lucas

Praveen September 19, 2003 07:10

Re: Post processing - graphs
 
Suppose (xo,yo) is the point where you need the value. First locate neighbouring cells (say n cells) and their values ui, i=1 to n are known. Assume

u(x,y) = uo + a(x-xo) + b(y-yo)

as approximating u in a neighbourhood of (xo,yo). You have 3 unknowns (uo, a, b) and required is uo. Take n>3 we have an overdetermined system. Solve using least squares

minimize sum_i [ui - uo - a(xi-xo) - b(yi-yo)]^2 wrt uo,a,b


All times are GMT -4. The time now is 04:25.