| 1 |
edhill |
1.1 |
clear |
| 2 |
|
|
clear path |
| 3 |
|
|
|
| 4 |
|
|
global Nx Ny Nz |
| 5 |
|
|
global lat long dz dm mdep |
| 6 |
|
|
global delt_su su_its t_su delt |
| 7 |
|
|
global descriptor this_path |
| 8 |
|
|
global f deltaf Q beta r_expt r_heat H |
| 9 |
|
|
global time rots it |
| 10 |
|
|
global g Cp rho_bar alpha |
| 11 |
|
|
global u v t w |
| 12 |
|
|
global iterations |
| 13 |
|
|
|
| 14 |
|
|
|
| 15 |
|
|
param_file_name = ... |
| 16 |
|
|
input(' Please enter the name of the m-file with the parameters for this run : ','s') ; |
| 17 |
|
|
feval(param_file_name) ; |
| 18 |
|
|
path = this_path |
| 19 |
|
|
cmdstr=['cd ' path ]; |
| 20 |
|
|
eval(cmdstr); |
| 21 |
|
|
path=pwd |
| 22 |
|
|
|
| 23 |
|
|
iterations |
| 24 |
|
|
|
| 25 |
|
|
itstart = input(' Please enter start iteration : ','s') |
| 26 |
|
|
sizeit=size(iterations); |
| 27 |
|
|
for i=1:sizeit(1) |
| 28 |
|
|
iter(i)=eval(iterations(i,1:10)); |
| 29 |
|
|
end |
| 30 |
|
|
nitstart=find(iter==eval(itstart)) |
| 31 |
|
|
|
| 32 |
|
|
|
| 33 |
|
|
figure;hold on |
| 34 |
|
|
|
| 35 |
|
|
for i=nitstart:sizeit(1)-2 |
| 36 |
|
|
tfilename=(['T.' iterations((i),1:10) ]); |
| 37 |
|
|
iterations((i),1:10) |
| 38 |
|
|
i |
| 39 |
|
|
t=rdmds(tfilename,'b'); |
| 40 |
|
|
|
| 41 |
|
|
meantee=mean(mean(mean(t(1:Nx/2,1:Ny-1,1)))); |
| 42 |
|
|
meantee1=mean(mean(mean(t(1:Nx-1,1:Ny-1,1:Nz-1)))); |
| 43 |
|
|
|
| 44 |
|
|
% tval(i)=meantee-meantee1; |
| 45 |
|
|
tval(i)=meantee1-20; |
| 46 |
|
|
|
| 47 |
|
|
% tval(i)=max(max(max(t)))-meantee1; |
| 48 |
|
|
% plot(eval(iterations((i),1:10)),tval(i),'.');drawnow |
| 49 |
|
|
|
| 50 |
|
|
% time(i)=eval(iterations(i,1:10)); |
| 51 |
|
|
|
| 52 |
|
|
if i==1 |
| 53 |
|
|
time(i)=100; |
| 54 |
|
|
elseif i<=30 |
| 55 |
|
|
time(i)=time(i-1)+100; |
| 56 |
|
|
else |
| 57 |
|
|
time(i)=time(i-1)+50; |
| 58 |
|
|
end |
| 59 |
|
|
|
| 60 |
|
|
% time(i)=i*50; |
| 61 |
|
|
plot(time(i),tval(i),'.');drawnow |
| 62 |
|
|
|
| 63 |
|
|
|
| 64 |
|
|
end |
| 65 |
|
|
|
| 66 |
|
|
|
| 67 |
|
|
|
| 68 |
|
|
tcol=tval; |
| 69 |
|
|
title(descriptor) |
| 70 |
|
|
xlabel('timestep') |
| 71 |
|
|
ylabel('central temperature') |
| 72 |
|
|
grid |
| 73 |
|
|
|
| 74 |
|
|
computertime=time; |
| 75 |
|
|
|
| 76 |
|
|
%save centralt centralt |
| 77 |
|
|
%save iterations iterations |
| 78 |
|
|
%save tcol tcol |
| 79 |
|
|
%save tincol tincol |
| 80 |
|
|
%save mdep mdep |
| 81 |
|
|
save working tcol tincol mdep computertime |