| 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 |
|
|
|
| 19 |
|
|
iterations |
| 20 |
|
|
|
| 21 |
|
|
it = input(' Please enter iteration : ','s') |
| 22 |
|
|
radmean = input(' Please enter radius of mean in gridpoints (ie 42) : ') |
| 23 |
|
|
path = this_path |
| 24 |
|
|
cmdstr=['cd ' path ]; |
| 25 |
|
|
eval(cmdstr); |
| 26 |
|
|
path=pwd |
| 27 |
|
|
|
| 28 |
|
|
tfilename=(['T.' it ]); |
| 29 |
|
|
t=rdmeta(tfilename,'b'); |
| 30 |
|
|
|
| 31 |
|
|
% create circular sampling rings |
| 32 |
|
|
|
| 33 |
|
|
|
| 34 |
|
|
Nn=Nx/2; |
| 35 |
|
|
|
| 36 |
|
|
rad=[1:1:(Nn-1)]; |
| 37 |
|
|
ring=ones(Nx,Ny,Nz); |
| 38 |
|
|
weight=zeros(1,Nn-1); |
| 39 |
|
|
radialmean=zeros(1,Nn-1); |
| 40 |
|
|
XCenter = (Nx+1)/2 ; |
| 41 |
|
|
YCenter = (Ny+1)/2 ; |
| 42 |
|
|
|
| 43 |
|
|
|
| 44 |
|
|
for k=1:Nn-1 |
| 45 |
|
|
for i=1:Nx |
| 46 |
|
|
for j=1:Ny |
| 47 |
|
|
radius(i,j) = sqrt((i-XCenter)^2+(j-YCenter)^2); |
| 48 |
|
|
end |
| 49 |
|
|
end |
| 50 |
|
|
radius(find( round(radius) > (k+1) ))=radius(find (round(radius) > (k+1) ))*0; |
| 51 |
|
|
radius(find( round(radius) < (k) ))=radius(find (round(radius) < (k) ))*0; |
| 52 |
|
|
radius(find(radius>0))=1.0; |
| 53 |
|
|
ring(:,:,k)=radius; |
| 54 |
|
|
weight(:,k)=length(find(ring(:,:,k) > 0)); |
| 55 |
|
|
end |
| 56 |
|
|
|
| 57 |
|
|
|
| 58 |
|
|
|
| 59 |
|
|
for i=1:30 |
| 60 |
|
|
tring=t(:,:,i).*ring(:,:,radmean); |
| 61 |
|
|
meant(i)=sum(sum(tring))/weight(radmean); |
| 62 |
|
|
end |
| 63 |
|
|
|
| 64 |
|
|
|
| 65 |
|
|
plot(meant,mdep,'o-') |