| 1 | clear path | 
| 2 |  | 
| 3 | global Nx Ny Nz | 
| 4 | global lat long dz dm mdep | 
| 5 | global delt_su su_its t_su delt | 
| 6 | global descriptor this_path | 
| 7 | global f deltaf Q beta r_expt r_heat H | 
| 8 | global time rots it | 
| 9 | global g Cp rho_bar alpha | 
| 10 | global u v t w | 
| 11 | global iterations | 
| 12 |  | 
| 13 |  | 
| 14 | param_file_name =   ... | 
| 15 | input(' Please enter the name of the m-file with the parameters for this run : ','s') ; | 
| 16 | feval(param_file_name) ; | 
| 17 |  | 
| 18 |  | 
| 19 | iterations | 
| 20 |  | 
| 21 | itstart = input(' Please enter start iteration : ','s') | 
| 22 | itend = input(' Please enter end iteration : ','s') | 
| 23 |  | 
| 24 |  | 
| 25 | sizeit=size(iterations); | 
| 26 | for i=1:sizeit(1) | 
| 27 | iter(i)=eval(iterations(i,1:10)); | 
| 28 | end | 
| 29 | nitstart=find(iter==eval(itstart)) | 
| 30 | nitend=find(iter==eval(itend)) | 
| 31 |  | 
| 32 | path   = this_path | 
| 33 | cmdstr=['cd ' path ]; | 
| 34 | eval(cmdstr); | 
| 35 | path=pwd | 
| 36 |  | 
| 37 | sumtheta=zeros(Nx,Ny,Nz); | 
| 38 | counter=0; | 
| 39 |  | 
| 40 | for i=nitstart:nitend | 
| 41 | tfilename=(['T.' iterations((i),1:10) ]) ; | 
| 42 | t=rdmds(tfilename,'b'); | 
| 43 | sumtheta=sumtheta+t; | 
| 44 | counter=counter+1; | 
| 45 | end | 
| 46 | meantheta=sumtheta/counter; | 
| 47 |  | 
| 48 |  | 
| 49 | sum=zeros(Nx,Ny); | 
| 50 | by=zeros(Nx,Ny); | 
| 51 | bx=zeros(Nx,Ny); | 
| 52 |  | 
| 53 | for k=Nz:-1:1, | 
| 54 | sum=sum-9.8*dz*0.0002*(meantheta(:,:,k)-20); | 
| 55 | end | 
| 56 |  | 
| 57 | bx(2:Nx-1,:)=(sum(3:Nx,:)-sum(1:Nx-2,:))/(2*dm); | 
| 58 | by(:,2:Ny-1)=(sum(:,3:Ny)-sum(:,1:Ny-2))/(2*dm); | 
| 59 |  | 
| 60 | counter=0; | 
| 61 | sumc=0; | 
| 62 | for i=1:Nx | 
| 63 | for j=1:Ny | 
| 64 |  | 
| 65 | r=sqrt((i-Nx/2)*(i-Nx/2)+(j-Ny/2)*(j-Ny/2))*dm; | 
| 66 |  | 
| 67 | if r<0.5 | 
| 68 | counter=counter+1; | 
| 69 | sumc=sumc+bx(i,j)*bx(i,j)+by(i,j)*by(i,j); | 
| 70 | end | 
| 71 |  | 
| 72 | end | 
| 73 | end | 
| 74 |  | 
| 75 | sumc=sumc/counter/f; | 
| 76 | wek=0.000057; | 
| 77 | cc=wek/sumc | 
| 78 |  | 
| 79 |  | 
| 80 |  | 
| 81 |  |