scalarField InitializationTime(nf-1);
scalar SOI(0);
scalar EOI(0);
scalar delta(0);
if(nf > 1)
{
        scalarField p2_ratio( CMCdict.lookup("p2_ratio") );
        scalarField p1_ratio( CMCdict.lookup("p1_ratio") );
        scalarField main_ratio( CMCdict.lookup("main_ratio") );

        scalar sum(0);

        for(label i = 0 ; i<(nf_p2-1) ; i++)
        {
                sum = sum + p2_ratio[i];
                SOI = parcels.injectors()[0].timeStart();
                EOI = parcels.injectors()[0].timeEnd();
                delta = EOI - SOI;
                InitializationTime[i] = SOI + delta * sum;
        }

        sum=0;
        SOI = parcels.injectors()[1].timeStart();
        EOI = parcels.injectors()[1].timeEnd();
        delta = EOI - SOI;

        for(label i = 0 ; i<nf_p1 ; i++)
        {
                InitializationTime[i+(nf_p2 -1)] = SOI + delta * sum;
                sum = sum + p1_ratio[i];
        }

        sum=0;
        SOI = parcels.injectors()[2].timeStart();
        EOI = parcels.injectors()[2].timeEnd();
        delta = EOI - SOI;

        for(label i = 0 ; i<nf_main ; i++)
        {
                InitializationTime[i+nf_p1+(nf_p2 -1)] = SOI + delta * sum;
                sum = sum + main_ratio[i];
        }

        //Info<<dieselSpray.injector_soi(0)<<tab<<dieselSpray.injector_eoi(0)<<endl;
        //Info<<dieselSpray.injector_soi(1)<<tab<<dieselSpray.injector_eoi(1)<<endl;
        //Info<<dieselSpray.injector_soi(2)<<tab<<dieselSpray.injector_eoi(2)<<endl;

        //for(label i = 0 ; i<nf-1 ; i++)
        //{
        //Info<<InitializationTime[i]<<endl;
        //}

}
Info<<"Number of flame group = (pilot2 pilot1 main)"<<nf_p2<<tab<<nf_p1<<tab<<nf_main<<endl;
