Exemplo n.º 1
0
 private static Catchment MakeFlatPlanterCatchment(
     decimal blndSoilDepth, InfiltrationTestProcedure ift,
     decimal natInfRate, HierarchyLevel lvl, Configuration cfg,
     decimal impArea, int preCN, int postCn,
     int preTC, int postTC, decimal infPcnt, decimal botArea, decimal botWidth,
     decimal botPerimeter, decimal ss, decimal freeBrd, decimal ovflHgt,
     decimal ovflSA, decimal ovflEHgt, decimal ovflESA, decimal rockBotArea,
     decimal rockStrgDepth, decimal rockWidth, decimal porosity,
     decimal belowPipeStrgDepth, decimal?orificeDiameter, OrificeReason rsn)
 {
     return(Catchment.Make("FlatPlanterTestCatchment",
                           ift, PRStatus.Pass, natInfRate,
                           lvl, impArea, preCN, postCn, preTC, postTC,
                           FlatPlanter.Make(true, blndSoilDepth, cfg,
                                            AboveGradeProperties.Make(botArea,
                                                                      botWidth, botPerimeter, ss, freeBrd,
                                                                      ovflHgt, ovflSA,
                                                                      ovflEHgt, ovflESA),
                                            BelowGradeProperties.Make(infPcnt, rockBotArea,
                                                                      rockStrgDepth, rockWidth, porosity, belowPipeStrgDepth,
                                                                      orificeDiameter.HasValue?
                                                                      Orifice.Make(orificeDiameter.Value):
                                                                      Orifice.Make(rsn)))));
 }
Exemplo n.º 2
0
        public void TestFlatPlanterCommonValueResults(decimal blndSoilDepth,
                                                      InfiltrationTestProcedure ift, decimal corrFac, decimal natInfRate,
                                                      HierarchyLevel lvl, Configuration cfg, decimal impArea, int preCN, int postCn,
                                                      int preTC, int postTC, decimal infPcnt, decimal botArea, decimal botWidth,
                                                      decimal botPerimeter, decimal ss, decimal freeBrd, decimal ovflHgt,
                                                      decimal ovflSA, decimal ovflEHgt, decimal ovflESA, decimal rockBotArea,
                                                      decimal rockStrgDepth, decimal rockWidth, decimal porosity,
                                                      decimal belowPipeStrgDepth, decimal?orificeDiameter, OrificeReason rsn,
                                                      // ---------------------------------------------------------------------
                                                      double expORArea, double expUnderDrainlen, double expMaxSurfDepth,
                                                      double expOFEDep, double expBSD, double expBSDAR, double expMaxRSD,
                                                      double?expMaxRSDBP, double?expMaxRSDAP, double?expMedCapN2R,
                                                      double?expMedCapAR, double?expMedCapBPNR, double?expMedCapNRAP,
                                                      double?expMedIFFromStrg, double?expNumberLayers, double?expLayerCapacity,
                                                      double?expRSWidth, double?expRSArea, double?expRockCap,
                                                      double?expRockCapBP, double?expRockCapAP, double?expMaxIncVolInputIntoRock,
                                                      double?expRaM, double?expBotInfArea, double?expMaxDsgnInfVolPerTS,
                                                      double?expSurfArea75, double?expOverFlowESA75,
                                                      double?expMaxSurfVol, double?expOverFlowESurfVol)
        {
            var ctch = MakeFlatPlanterCatchment(blndSoilDepth, ift, natInfRate, lvl, cfg, impArea,
                                                preCN, postCn, preTC, postTC, infPcnt, botArea, botWidth, botPerimeter,
                                                ss, freeBrd, ovflHgt, ovflSA, ovflEHgt, ovflESA, rockBotArea, rockStrgDepth,
                                                rockWidth, porosity, belowPipeStrgDepth, orificeDiameter, rsn);
            var calc = Calculator.Make(ctch.Facility.Category);

            Assert.IsNotNull(calc);
            var cv = calc.CalculateCommonValues(ctch);

            Assert.AreEqual(expORArea, (double)cv.OrificeArea.Value, dlta, "OrificeArea");
            Assert.AreEqual(expUnderDrainlen, (double)cv.UnderDrainLength.Value, dlta, "UnderDrainLength");
            Assert.AreEqual(expMaxSurfDepth, (double)cv.MaxSurfaceAreaDepth, dlta, "MaxSurfaceAreaDepth");
            Assert.AreEqual(expBSD, (double)cv.BSDFt, "BSDFt");
            Assert.AreEqual(expBSDAR, (double)cv.BSDARFt, "BSDARFt");
            Assert.AreEqual(expMaxRSD, (double)cv.MaxRockStorageDepthFt, "MaxRockStorageDepthFt");
            Assert.AreEqual(expMaxRSDBP, (double)cv.UnderdrainHeightFt, "UnderdrainHeightFt");
            Assert.AreEqual(expMaxRSDAP, (double)cv.MaxRSDAbovePipeFt, "MaxRSDAbovePipeFt");
            Assert.AreEqual(expMedCapN2R, (double)cv.MediaCapacityNext2Rock, "MediaCapacityNext2Rock");
            Assert.AreEqual(expMedCapAR, (double)cv.MaxMediaVolumeAboveRock, "MaxMediaVolumeAboveRock");
            Assert.AreEqual(expMedCapBPNR, (double)cv.MediaCapacityBPnr, "MediaCapacityBPnr");
            Assert.AreEqual(expMedCapNRAP, (double)cv.MaxMediaVolumeNRap, "MaxMediaVolumeNRap");
            Assert.AreEqual(expMedIFFromStrg, (double)cv.MaxMediaInflowFromStorageVolume,
                            "MaxMediaInflowFromStorageVolume");
            Assert.AreEqual(expNumberLayers, (double)cv.NumberLayers, "NumberLayers");
            Assert.AreEqual(expLayerCapacity, (double)cv.LayerStorageVolume, "LayerStorageVolume");
            Assert.AreEqual(expRSWidth, (double)cv.RockStorageWidth, "RockStorageWidth");
            Assert.AreEqual(expRSArea, (double)cv.RockStorageArea, "RockStorageArea");
            Assert.AreEqual(expRockCap, (double)cv.RockCapacity, "RockCapacity");
            Assert.AreEqual(expRockCapBP, (double)cv.RockCapacityBelowPipe, "RockCapacityBelowPipe");
            Assert.AreEqual(expRockCapAP, (double)cv.RockCapacityAbovePipe, "RockCapacityAbovePipe");
            Assert.AreEqual(expMaxIncVolInputIntoRock, (double)cv.MaxIncrementalVolumeInputIntoRock,
                            "MaxIncrementalVolumeInputIntoRock");
            Assert.AreEqual(expRaM, (double)cv.RAM, "RAM");
            Assert.AreEqual(expBotInfArea, (double)cv.BottomInfiltrationArea, "BottomInfiltrationArea");
            Assert.AreEqual(expMaxDsgnInfVolPerTS, (double)cv.MaxDesignInfiltrationVolPerTimeStep,
                            "MaxDesignInfiltrationVolPerTimeStep");
            Assert.AreEqual(expSurfArea75, (double)cv.SurfaceArea75, "SurfaceArea75");
            Assert.AreEqual(expMaxSurfVol, (double)cv.MaxSurfaceVolume, "MaxSurfaceVolume");
            if (cfg != Configuration.ConfigE)
            {
                return;
            }
            // -------------------------------------------
            Assert.AreEqual(expOverFlowESurfVol, (double)cv.OverflowESurfaceVolume, "OverflowESurfaceVolume");
            Assert.AreEqual(expOFEDep, (double)cv.OverflowEDepthFt, dlta, "OverflowEDepthFt");
            Assert.AreEqual(expOverFlowESA75, (double)cv.OverflowESurfArea75, "OverflowESurfArea75");
        }
Exemplo n.º 3
0
        public void TestFlatPlanterCommonValues(decimal blndSoilDepth,
                                                InfiltrationTestProcedure ift, decimal natInfRate,
                                                HierarchyLevel lvl, Configuration cfg, decimal impArea, int preCN, int postCn,
                                                int preTC, int postTC, decimal infPcnt, decimal botArea, decimal botWidth,
                                                decimal botPerimeter, decimal ss, decimal freeBrd, decimal ovflHgt,
                                                decimal ovflSA, decimal ovflEHgt, decimal ovflESA, decimal rockBotArea,
                                                decimal rockStrgDepth, decimal rockWidth, decimal porosity,
                                                decimal belowPipeStrgDepth, decimal?orificeDiameter, OrificeReason rsn)
        {
            var ctch = MakeFlatPlanterCatchment(blndSoilDepth, ift, natInfRate, lvl, cfg, impArea,
                                                preCN, postCn, preTC, postTC, infPcnt, botArea, botWidth, botPerimeter,
                                                ss, freeBrd, ovflHgt, ovflSA, ovflEHgt, ovflESA, rockBotArea, rockStrgDepth,
                                                rockWidth, porosity, belowPipeStrgDepth, orificeDiameter, rsn);
            var calc = Calculator.Make(ctch.Facility.Category);

            calc.CalculateCommonValues(ctch);
            Assert.IsNotNull(calc);
        }
Exemplo n.º 4
0
        public void TestFlatPlanterFinalResults(decimal blndSoilDepth,
                                                InfiltrationTestProcedure ift, decimal natInfRate,
                                                HierarchyLevel lvl, Configuration cfg, decimal impArea, int preCN, int postCn,
                                                int preTC, int postTC, decimal infPcnt, decimal botArea, decimal botWidth,
                                                decimal botPerimeter, decimal ss, decimal freeBrd, decimal ovflHgt,
                                                decimal ovflSA, decimal ovflEHgt, decimal ovflESA, decimal rockBotArea,
                                                decimal rockStrgDepth, decimal rockWidth, decimal porosity,
                                                decimal belowPipeStrgDepth, decimal?orificeDiameter, OrificeReason rsn,
                                                // --------------------------------------------------------------------------
                                                double exppkWQInflow, double exppkWQOutflow, double expWQUDOutflow, double exppkWQOverflow,
                                                double expH2YPreDev, double exppkH2YInflow, double exppkH2YOutflow, double expH2YUDOutflow, double exppkH2YOverflow,
                                                double exp2YPreDev, double exppk2YInflow, double exppk2YOutflow, double exp2YUDOutflow, double exppk2YOverflow,
                                                double exp5YPreDev, double exppk5YInflow, double exppk5YOutflow, double exp5YUDOutflow, double exppk5YOverflow,
                                                double exp10YPreDev, double exppk10YInflow, double exppk10YOutflow, double exp10YUDOutflow, double exppk10YOverflow,
                                                double exp25YPreDev, double exppk25YInflow, double exppk25YOutflow, double exp25YUDOutflow, double exppk25YOverflow)
        {
            var ctch = MakeFlatPlanterCatchment(blndSoilDepth, ift, natInfRate, lvl, cfg, impArea,
                                                preCN, postCn, preTC, postTC, infPcnt, botArea, botWidth, botPerimeter,
                                                ss, freeBrd, ovflHgt, ovflSA, ovflEHgt, ovflESA, rockBotArea, rockStrgDepth,
                                                rockWidth, porosity, belowPipeStrgDepth, orificeDiameter, rsn);
            var calc = Calculator.Make(ctch.Facility.Category);

            Assert.IsNotNull(calc);
            var strmRslts = calc.CalculateResults(ctch);

            ValidateResults(strmRslts[DesignStorm.WQ], 0d, exppkWQInflow, exppkWQOutflow, expWQUDOutflow, exppkWQOverflow);
            ValidateResults(strmRslts[DesignStorm.HalfTwoYear], expH2YPreDev, exppkH2YInflow, exppkH2YOutflow, expH2YUDOutflow, exppkH2YOverflow);
            ValidateResults(strmRslts[DesignStorm.TwoYear], exp2YPreDev, exppk2YInflow, exppk2YOutflow, exp2YUDOutflow, exppk2YOverflow);
            ValidateResults(strmRslts[DesignStorm.FivYear], exp5YPreDev, exppk5YInflow, exppk5YOutflow, exp5YUDOutflow, exppk5YOverflow);
            ValidateResults(strmRslts[DesignStorm.TenYear], exp10YPreDev, exppk10YInflow, exppk10YOutflow, exp10YUDOutflow, exppk10YOverflow);
            ValidateResults(strmRslts[DesignStorm.TwntyFiv], exp25YPreDev, exppk25YInflow, exppk25YOutflow, exp25YUDOutflow, exppk25YOverflow);
        }