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 |
|
|
XCenter = Nx/2 ; |
24 |
|
|
YCenter = Ny/2 ; |
25 |
|
|
R2 = 2*r_heat/dm ; |
26 |
|
|
% create large circular mask |
27 |
|
|
mask=ones(Nx,Ny); |
28 |
|
|
for i=1:Nx |
29 |
|
|
for j=1:Ny |
30 |
|
|
DispX=XCenter-i; |
31 |
|
|
DispY=YCenter-j; |
32 |
|
|
if ( DispX^2 + DispY^2 >= R2^2 ) |
33 |
|
|
mask(i,j)=0; |
34 |
|
|
end |
35 |
|
|
end |
36 |
|
|
end |
37 |
|
|
|
38 |
|
|
figure;hold on |
39 |
|
|
%set(gca,'XLim',[10000 35000]) |
40 |
|
|
set(gca,'YLim',[0.0 1.0]) |
41 |
|
|
sizeit=size(iterations); |
42 |
|
|
meanmudgeu=zeros(sizeit(1),1); |
43 |
|
|
|
44 |
|
|
for i=1:sizeit(1) |
45 |
|
|
mufilename=(['TWcorrectionu.' iterations((i),1:10) ]); |
46 |
|
|
mudgeu=rdmeta(mufilename,'b'); |
47 |
|
|
meanmudgeu(i,:)=sum(sum(mudgeu.*mask))/sum(sum(mask)); |
48 |
|
|
plot(eval(iterations((i),1:10)),meanmudgeu(i,:),'o');drawnow |
49 |
|
|
end |
50 |
|
|
|
51 |
|
|
title(descriptor) |
52 |
|
|
xlabel('timestep') |
53 |
|
|
ylabel('mean mudgeu') |
54 |
|
|
grid |
55 |
|
|
|
56 |
|
|
%save meanmudgeu meanmudgeu |
57 |
|
|
%save iterations iterations |
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|