// ALFA1
jj=0; sum=0; kk=0; ii=0; scalar ww=0;
forAll(alfa,cellI){
	alfa[cellI]=0;
}
 while(jj<(nx*ny*nz)){ 
	 sum=sum+(psi1[jj]*fi1[jj]*(1/vv1)+psi2[jj]*fi2[jj]*(1/vv2))*dx*dz;
    	 
	 if (kk==(nx-1))
	 {   
         alfa[ii]=alfa[ii]+sum;
		 kk=0; 
		 ii=ii+1;
		 sum=0;
	 } else{	 
		kk=kk+1; 
	 }
	 	    	
	 if(ww==(nx*ny-1)){
		 ww=0; 
		 ii=0;
	 }else{
		 ww=ww+1;		 
	 }
	  jj=jj+1;
	 
    }
alfa.write();
Info<<"alfa "<<endl;
		
// DELTA
jj=0; sum=0; kk=0; ii=0; ww=0;
forAll(alfa,cellI){
	delta[cellI]=0;
}
 while(jj<(nx*ny*nz)){ 
     sum=sum+(psi1[jj]*(DD1[jj]+dDD1[jj])*fi1[jj]+psi2[jj]*(DD2[jj]+dDD2[jj])*fi2[jj])*dx*dz;
     
	 if (kk==(nx-1))
	 {   
         delta[ii]=delta[ii]+sum;
		 kk=0; 
		 ii=ii+1;
		 sum=0;
	 } else{	 
		kk=kk+1; 
	 }
	 if(ww==(nx*ny-1)){
		 ww=0; 
		 ii=0;
	 }else{
		 ww=ww+1;		 
	 }
	 jj=jj+1;
	 
    } 
delta.write();
Info<<"delta "<<endl;
		
// GAMMA1
jj=0; sum=0; kk=0; ii=0; ww=0;
forAll(alfa,cellI){
	gamma[cellI]=0;
}
 while(jj<(nx*ny*nz)){ 
	 sum=sum+(psi1[jj]*((DD1[jj]+dDD1[jj])*grad_fi1_y[jj]+grad_DD1_fi1_y[jj])+psi2[jj]*((DD2[jj]+dDD2[jj])*grad_fi2_y[jj]+grad_DD2_fi2_y[jj]))*dx*dz;
	 
	 
	 if (kk==(nx-1))
	 {   
         gamma[ii]=gamma[ii]+sum;
		 kk=0; 
		 ii=ii+1;
		 sum=0;
	 } else{	 
		kk=kk+1; 
	 }
	 if(ww==(nx*ny-1)){
		 ww=0; 
		 ii=0;
	 }else{
		 ww=ww+1;		 
	 }

	 jj=jj+1;
	 
    } 
gamma.write();
	Info<<"gamma "<<endl;
	
	
// ETA1
jj=0; sum=0; kk=0; ii=0; ww=0;
forAll(alfa,cellI){
	eta[cellI]=0;
}
 while(jj<(nx*ny*nz)){ 
       sum=sum+(psi1[jj]*(lap_dDD1_fi1[jj]+(dnisf1[jj]-ds1[jj])*fi1[jj]+dnisf2[jj]*fi2[jj])+psi2[jj]*(lap_dDD2_fi2[jj]+ds12[jj]*fi1[jj]-ds2[jj]*fi2[jj]))*dx*dz;
	 
	 if (kk==(nx-1))
	 {   
         eta[ii]=eta[ii]+sum;
		 kk=0; 
		 ii=ii+1;
		 sum=0;
	 } else{	 
		kk=kk+1; 
	 }
	 if(ww==(nx*ny-1)){
		 ww=0; 
		 ii=0;
	 }else{
		 ww=ww+1;		 
	 }

	 jj=jj+1;
	 
 } 
eta.write();
Info<<"eta "<<endl;
		




