CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Matlab PP: Generating X-vel Contour Error Plot (http://www.cfd-online.com/Forums/fluent/85685-matlab-pp-generating-x-vel-contour-error-plot.html)

Bennp2000 March 4, 2011 07:40

Matlab PP: Generating X-vel Contour Error Plot
 
Hi,
I'd like to generate a 2d contour plot through a slice (y=0) from two different versions of the same model (one meshed by me, one by my predecessor) and then create a plot of the difference in velocities between them.

There are a few problems here that I can see:
the meshes are different (one structure one tets)
the meshes have a different origin (0,0,0)

I've output two ASCII files (one from each) of x-vel along the relevant plane but I can't work out how on earth to generate the required plot.

I've been trying this in matlab but this:

%-Clear all
clear all;
close all;
format('longe')

%-Common Grid Density Settings
meshmax=1.5;
meshdens=0.01;

%-Input data files
low1 = csvread('192.csv',2,1);
low2 = csvread('248.csv',2,1);

x=low1(:,1);
y=low1(:,2);
V=low1(:,4);

commongrid = meshgrid(-meshmax:meshdens:meshmax,-meshmax:meshdens:meshmax);


is as far as I've got. Can anyone suggest how to progress?

Amir March 4, 2011 08:58

if the problem is different meshes, you can interpolate one of the results to another in FLUENT and then compare.

Bennp2000 March 4, 2011 10:12

(can I ask how?)

I'm not sure this will work as one mesh has some extra (pipe) at either end of the model and the origin will still be different.

Amir March 4, 2011 11:36

different origin is not a matter and you can get rid of.
this method will work if you want to compare to slices with the same boundary positions. (it seems that this constraint should be satisfied!)

Bennp2000 March 4, 2011 11:41

the boundary positions aren't the same unfortunately. (Both in the x and Y directions. Only the Z [cross section] is the same). I think I have to do it either solely in Tecplot or in Matlab?

Amir March 4, 2011 16:58

I meant that 2 planes which you want to compare should be similar and have the same dimensions not positions,i.e. similar in local coordinates. their origin and/or angles with axises can be different and as I said before you can get rid of them.
if this is the case, using profile files after translating or rotating grids may help.


All times are GMT -4. The time now is 16:17.