//get conditional SDR
        scalar C2(0); 
        scalar Airside(0);
        scalar Fuelside(0);

        forAll(rho , celli) 
        {
                Airside = Peta[0][celli]*deta[0]; 
                Fuelside = Peta[etamax][celli]*deta[etamax]; 
                if( (1-Airside) < 0.000001 || (1-Fuelside) < 0.000001 )//if there exist delta function at eta = 0 or 1
                {
                        for(label j = 0 ; j<= etamax ; j++)
                        {
                                CSDRCELL[j][celli] = 0;
                        }
                }
                else
                {
                        scalar C1(0);
			for(label j=0 ; j<=etamax ;j++)
			{
				f[j] = AMC(etaValue[j]);
				pdf[j] = Peta[j][celli];
			}
			C1 = integration(deltaftn[celli], MFcut, Neta, pdf, f);
                        C2 = SDR[celli] / C1; //Eqn (13) from SH Kim C&F paper 120:75-90(20)

                        for(label j = 0 ; j <= etamax ; j++)
                        {
                                scalar eta = etaValue[j];
                                CSDRCELL[j][celli] = C2 * AMC(eta);
                        }
                }
		if(F_total[celli] > 0)
               	{
			for(label k=0 ; k<=group ; k++)
			{
                		Ffrac[k][celli] = F[k][celli]/F_total[celli];
			}
              	}
		else if(F_total[celli] <= 0)
		{
                        for(label k=0 ; k<=group ; k++)
                        {
                                Ffrac[k][celli] = 0.0;
                        }			
		}
        }

//get density weighted averaged value of conditional SDR for each eta and flame-group 
        for(label k=0 ; k <= group ; k++)
        {
                for(label j = 0 ; j<=etamax ; j++) //density weighted average of conditional SDR 
                {
                        scalar SDRTemp(0), DENOMTemp(0);

                        SDRTemp = fvc::domainIntegrate(Ffrac[k]*rho*Peta[j]*CSDRCELL[j]).value();
                        DENOMTemp = fvc::domainIntegrate(Ffrac[k]*rho*Peta[j]).value();
			
                        if(SDRTemp == 0 || DENOMTemp == 0)
                        {
                                SDRCMC[j+k*(etamax+1)] = 0;
                        }
                        else
                        {
                                SDRCMC[j+k*(etamax+1)] = SDRTemp / DENOMTemp ;
                        }

                }
        }

