mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
adjust plotting of chemistry data [ci skip]
adjust step size for data selection; add plot of experimental data
This commit is contained in:
@ -16,6 +16,7 @@ col_t = 1;
|
||||
listfile = dir(fullfile(dirfile,filepattern));
|
||||
data = readData(dirfile,listfile);
|
||||
nFiles = length(listfile);
|
||||
dataexp = importdata('R2_experiment.dat', ' ');
|
||||
|
||||
% init figures
|
||||
hFig(1) = figure;
|
||||
@ -28,28 +29,39 @@ for ii=1:nFiles
|
||||
|
||||
fname = data(ii).name;
|
||||
fbasename = strtrunc(fname,index(fname,".dat")-1);
|
||||
timesteps = data(ii).values(1:1:end,col_t);
|
||||
stepsize = 2;
|
||||
timesteps = data(ii).values(1:stepsize:end,col_t)*10;
|
||||
nColumns = columns(data(ii).values);
|
||||
|
||||
figure(hFig(1));
|
||||
clf reset;
|
||||
hold on;
|
||||
nColumns = columns(data(ii).values);
|
||||
|
||||
for jj=2:nColumns
|
||||
xvalue = data(ii).values(1:1:end,jj);
|
||||
xvalue = data(ii).values(1:stepsize:end,jj);
|
||||
%if (strncmp(fbasename,"Aterm",5) || strncmp(fbasename,"Bterm",5))
|
||||
% semilogy(timesteps,xvalue,'Color',cmap(jj,:),'LineStyle',linS{jj-1},'Marker',markers{jj-1},'MarkerSize',5);
|
||||
%else
|
||||
plot(timesteps,xvalue,'Color',cmap(jj,:),'LineStyle',linS{jj-1},'Marker',markers{jj-1},'MarkerSize',5);
|
||||
%endif
|
||||
end
|
||||
xlim auto;
|
||||
if (strncmp(fbasename,"fr_OV",5))
|
||||
timesteps = dataexp.data(1:stepsize:end,col_t);
|
||||
xvalue = dataexp.data(1:stepsize:end,2)*0.01;
|
||||
plot(timesteps-40,xvalue,'Color','red','LineStyle','none','Marker','.','MarkerSize',10);%,'MarkerFaceColor','auto');
|
||||
endif
|
||||
xlim ([0.0, 1200.0]);
|
||||
ylim auto;
|
||||
xlabel('time (s)');
|
||||
ylabel(fbasename);
|
||||
grid on;
|
||||
|
||||
headerline = substr(data(ii).header{1},7);
|
||||
|
||||
if (strncmp(fbasename,"fr_OV",5))
|
||||
headerline = [headerline, " fr_exp_OV"];
|
||||
endif
|
||||
|
||||
legend(strsplit(headerline, " "),'location','eastoutside');
|
||||
|
||||
print(hFig(1),fullfile(dirfile,['figure_',fbasename,'.eps']),'-color','-deps');
|
||||
|
||||
Reference in New Issue
Block a user