Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Post-Processing Particles

Post-Processing Particles 10 years 1 month ago #14513

  • caiodalaqua
  • caiodalaqua's Avatar
Hi,

I wrote a simple python script to read the drogues file... You could try to use it to write something that tecplot understands...

I noticed a issue however...

If the solution time is too big, the output is something like this:

ZONE DATAPACKING=POINT, T="G_ 604800.0000 seconds", I= 100, SOLUTIONTIME=************

Have anyone else seen something like this ?

Caio
Attachments:
The administrator has disabled public write access.

Post-Processing Particles 10 years 1 month ago #14514

  • schaad
  • schaad's Avatar
Thank you. I ended up post-processing everything in MATLAB so it was easy to read the drogues.

If anybody else is post-processing drogues with MATLAB, this script might help. It sorts the coordinates into their respective locations in a master matrix. The loop calculation is slow, the other guy's python code might be much faster.
fid = fopen(filename);
iRow = 1;
while (~feof(fid)) 
    temp(iRow,:) = textscan(fid,'%f %f %f %f\n','commentStyle','Z','Delimiter',',','headerLines',2);
    iRow = iRow + 1;
end
fclose(fid);

d = zeros(size(temp{1},1),3);
d(:,1) = temp{:,1};
d(:,2) = temp{:,2};
d(:,3) = temp{:,3};
clear temp

LDRO = unique(d(:,1));
NDRO = length(LDRO);
STPMAX = 1500;
XDRO = nan(NDRO,STPMAX);
YDRO = nan(NDRO,STPMAX);

for i = 1:length(d)
    for j = 1:NDRO
        if  d(i,1) == LDRO(j)
            idx = STPMAX - sum(isnan(XDRO(j,:)))+1;
            XDRO(j,idx) = d(i,2);
            YDRO(j,idx) = d(i,3);
            break
        end
    end
    disp([num2str(i/length(d)*100),'%'])
end
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.