Esempio n. 1
0
        public string reportAnoxicDepth(int bmpID, double PRemoval)
        {
            WetDetention wd = (WetDetention)getBMP(bmpID);

            wd.CalculateAnoxicDepth(PRemoval);
            return(wd.AnoxicDepthReport());
        }
Esempio n. 2
0
        private int RouteWetDetentionToWetDetention(int bmpID)
        {
            // bmpID is the ID 1-3 of the upstream Wet Detention Pond
            double PP      = 0; // Permanent Pool
            double RV      = 0; // Runoff Volume
            int    lastBMP = 0;

            // The entire idea is to calculate a cumulative Permanent Pool and route the Runovv Volume through the entire pool
            if (bmpID == 1)
            {
                lastBMP = 2;
                RV      = ((WetDetention)bmp1).RunoffVolume;
                PP     += ((WetDetention)bmp1).PermanentPoolVolume;
                PP     += ((WetDetention)bmp2).PermanentPoolVolume;
                ProvidedNTreatmentEfficiency = ((WetDetention)bmp1).ProvidedNTreatmentEfficiency;
                ProvidedPTreatmentEfficiency = ((WetDetention)bmp1).ProvidedPTreatmentEfficiency;

                if (bmp3.BMPType == BMPTrainsProject.sWetDetention)
                {
                    PP += ((WetDetention)bmp3).PermanentPoolVolume; lastBMP = 3;
                }
                if (bmp3.BMPType == BMPTrainsProject.sWetDetention)
                {
                    PP += ((WetDetention)bmp3).PermanentPoolVolume; lastBMP = 4;
                }
            }

            if (bmpID == 2)
            {
                lastBMP = 3;
                RV      = ((WetDetention)bmp2).RunoffVolume;
                PP     += ((WetDetention)bmp2).PermanentPoolVolume;
                PP     += ((WetDetention)bmp3).PermanentPoolVolume;
                if (bmp4.BMPType == BMPTrainsProject.sWetDetention)
                {
                    PP += ((WetDetention)bmp4).PermanentPoolVolume; lastBMP = 4;
                }
            }

            if (bmpID == 3)
            {
                lastBMP = 4;
                RV      = ((WetDetention)bmp3).RunoffVolume;
                PP     += ((WetDetention)bmp3).PermanentPoolVolume;
                PP     += ((WetDetention)bmp4).PermanentPoolVolume;
            }

            // Add the permanent pools and use to calculate overall residency.


            double NEff = 0.0;
            double PEff = 0.0;

            double RT = 0;

            if (RV == 0)
            {
                return(lastBMP);
            }

            RT   = PP / RV * 365;
            NEff = WetDetention.CalculateNitrogenRemoval(RT);
            PEff = WetDetention.CalculatePhosphorusRemoval(RT);
            ProvidedNTreatmentEfficiency = CalculateAdjustedEfficiency(ProvidedNTreatmentEfficiency, NEff);

            // This does the same thing for both scenarios

            ProvidedPTreatmentEfficiency = CalculateAdjustedEfficiency(ProvidedPTreatmentEfficiency, PEff);
            CalculateReductions(this);
            return(lastBMP);
        }