Friday, July 15, 2011

Vector Plots - Visualizing the Results

Have been trying out some different packages to assist in analyzing the model results. I hate always using Excel as it really never does what I want. Plus with all the open source packages available, it is a shame not to use them. I am currently looking to generate vector plots of the velocity. I used Blue Kenue to extract an ASCII file containing the 3D velocity vectors at a specific time as a 3D Tetra Vector Mesh (t4v). I tried performing an average but Blue Kenue seems to loose the velocity vectors and records only the magnitude.

Anyways I wrote some code to load the t4v into a database where I attempt to normalize the data set. I then use a simple query to extract the profile along a set of nodes to an ASCII file in a CSV format. This can be easily opened by the numerical packages.

Octave - very simple to use and easily handles my non-uniform vector data:

 mdl = csvread("qryProfile_ke.txt");
 h = quiver(mdl(:,8),mdl(:,4),mdl(:,9),mdl(:,7),0.025);


Scilab: Will not handle my non-uniform data without a fight:

mdl2 = read_csv("qryProfile_ke.txt");
mdl = evstr(mdl2)
x = mdl(:,8);
y = mdl(:,4);
u = mdl(:,9);
v = mdl(:,7);

for i = 1:518,
xi = x(i);
yi = y(i);
ui = u(i);
vi = v(i);

champ1(xi,yi,ui,vi,rect=[13,9.9,15.5,10.2],arfact=0.2);
sleep(1);

end;


Anyways here is one of my plots from Octave from the k-epsilon model.

No comments:

Post a Comment