Index: DamClients/DamUI/trunk/src/Dam/Tests/DamPipingBenchmarkTest.cs =================================================================== diff -u -r1947 -r2409 --- DamClients/DamUI/trunk/src/Dam/Tests/DamPipingBenchmarkTest.cs (.../DamPipingBenchmarkTest.cs) (revision 1947) +++ DamClients/DamUI/trunk/src/Dam/Tests/DamPipingBenchmarkTest.cs (.../DamPipingBenchmarkTest.cs) (revision 2409) @@ -39,7 +39,7 @@ /// /// /// - private static List ComputeProject(string projectFilename, PipingModelType pipingModel) + private static List ComputeProject(string projectFilename, PipingModelType pipingModel, double distanceToEntryPoint) { // Read dikering using (var damProjectData = ProjectLoader.LoadProjectData(projectFilename)) @@ -50,6 +50,7 @@ Assert.AreEqual(1, damProjectData.WaterBoard.Dikes.Count); var dike = damProjectData.WaterBoard.Dikes[0]; Assert.AreEqual(1, dike.Locations.Count); + dike.Locations[0].DistanceToEntryPoint = distanceToEntryPoint; damProjectData.DamProjectCalculationSpecification.CurrentSpecification.PipingModelType = pipingModel; DamProjectCalculationSpecification.SelectedAnalysisType = AnalysisType.NoAdaption; @@ -95,7 +96,7 @@ string projectFilename = @"..\..\..\data\Dam\Benchmarks\Piping\Test 1\Integratietest piping 1.damx"; - var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces); + var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, 0); double expectedPipingFactor = 0.506; // This is calculated according to spreadsheet double expectedHCritical = 1.618839023; // This is calculated according to spreadsheet double expectedLocalPipingExitPointX = 35; // This is just taken from the calculation result itself @@ -110,13 +111,13 @@ Assert.AreEqual(expectedPl4HeadAdjusted, allCalculationresults[0].Pl4HeadAdjusted.Value, cTolerance); allCalculationresults.Clear(); - allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, 0); expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 allCalculationresults.Clear(); - allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017, 0); expectedPipingFactor = 0.43219776821374467; // This is just taken from the calculation result itself expectedHCritical = 1.9830328582839827; // This is just taken from the calculation result itself expectedLocalPipingExitPointX = 35; // This is just taken from the calculation result itself @@ -162,18 +163,18 @@ { string projectFilename = @"..\..\..\data\Dam\Benchmarks\Piping\Test 2\Integratietest piping 2.damx"; - var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces); + var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, 0); double expectedPipingFactor = 0.489; // This is calculated according to spreadsheet Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); allCalculationresults.Clear(); - allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, 0); expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 allCalculationresults.Clear(); - allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017, 0); expectedPipingFactor = 0.42241892923665264; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Wti2017BackwardErosionSafetyFactor.Value, cTolerance); } @@ -186,18 +187,18 @@ { string projectFilename = @"..\..\..\data\Dam\Benchmarks\Piping\Test 3\Integratietest piping 3.damx"; - var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces); + var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, 0); double expectedPipingFactor = 0.494; // This is calculated according to spreadsheet Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); allCalculationresults.Clear(); - allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, 0); expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 allCalculationresults.Clear(); - allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017, 0); expectedPipingFactor = 0.4275708873438484; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Wti2017BackwardErosionSafetyFactor.Value, cTolerance); } @@ -210,18 +211,18 @@ { string projectFilename = @"..\..\..\data\Dam\Benchmarks\Piping\Test 4\Integratietest piping 4.damx"; - var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces); + var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, 0); double expectedPipingFactor = 0.608; // This is calculated according to spreadsheet Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); allCalculationresults.Clear(); - allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, 0); expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 is not supported for now allCalculationresults.Clear(); - allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017, 0); expectedPipingFactor = 0.50501856442086579; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Wti2017BackwardErosionSafetyFactor.Value, cTolerance); } @@ -234,20 +235,52 @@ { string projectFilename = @"..\..\..\data\Dam\Benchmarks\Piping\Test 5\Integratietest piping 5.damx"; - var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces); + var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, 0); double expectedPipingFactor = 0.618; // This is calculated according to spreadsheet Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); allCalculationresults.Clear(); - allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, 0); expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 is not supported for now allCalculationresults.Clear(); - allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017, 0); expectedPipingFactor = 0.51473283261943303; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Wti2017BackwardErosionSafetyFactor.Value, cTolerance); } + + /// + /// Benchmark test 6, based on 5 + /// It is used to show that DistanceToEntryPoint + /// - has no influence at all on DamPiping models + /// - has influence on wti model (SellmeijerRevised) + /// + [TestCase(0, 0.51473283261943303, 25, 2.2471450643821855, 15.177776712324395)] + [TestCase(10, 0.69719708066856745, 35, 2.8310306581394156, 15.687816692392971)] + [TestCase(-10, 0.32597553155657433, 15, 1.2619775739041792, 14.379913662895481)] + public void Bm06TwoAquifersTwoLayersWithDifferentDistanceToEntryPoint(double distanceToEntryPoint, double expectedWtiPipingFactor, + double expectedSeepageLength, double expectedHc, double expectedCCreep) + { + string projectFilename = @"..\..\..\data\Dam\Benchmarks\Piping\Test 5\Integratietest piping 5.damx"; + + var allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, distanceToEntryPoint); + double expectedPipingFactor = 0.618; // This is calculated according to spreadsheet + Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); + + allCalculationresults.Clear(); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, distanceToEntryPoint); + expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself + Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); + + // Wti2017 is not supported for now + allCalculationresults.Clear(); + allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017, distanceToEntryPoint); + Assert.AreEqual(expectedWtiPipingFactor, allCalculationresults[0].Wti2017BackwardErosionSafetyFactor.Value, cTolerance); + Assert.AreEqual(expectedSeepageLength, allCalculationresults[0].SeepageLength.Value, cTolerance); + Assert.AreEqual(expectedHc, allCalculationresults[0].HCritical.Value, cTolerance); + Assert.AreEqual(expectedCCreep, allCalculationresults[0].Wti2017CCreep, cTolerance); + } } }