Index: dam failuremechanisms/damPiping/trunk/src/Tests/Deltares.DamPiping.SellmeijerVNKCalculatorTests/PipingCalculatorSellmeijerVNKTest.cs =================================================================== diff -u -r371 -r372 --- dam failuremechanisms/damPiping/trunk/src/Tests/Deltares.DamPiping.SellmeijerVNKCalculatorTests/PipingCalculatorSellmeijerVNKTest.cs (.../PipingCalculatorSellmeijerVNKTest.cs) (revision 371) +++ dam failuremechanisms/damPiping/trunk/src/Tests/Deltares.DamPiping.SellmeijerVNKCalculatorTests/PipingCalculatorSellmeijerVNKTest.cs (.../PipingCalculatorSellmeijerVNKTest.cs) (revision 372) @@ -7,159 +7,105 @@ public class PipingCalculatorSellmeijerVNKTest { [Test] - public void TestCalculationDefault() + public void TestCalculateTheSellmeijerPipingFactorForProfileWithTwoSandlayers() { + // See dgs-as2.geodelft.nl/DGWebPiping for calculation + // =========== + // gamma_w = 9.81 + // mu = 1.33E-06 + // gamma_p = 26.5 + // eta = 0.25 + // theta = 37 + // F = 1.2 + // i = 0.3 + // =========== + // D1 = dikte bovenste zandlaag = 2.0 + // D2 = dikte onderste zandlaag = 6.0 + // k1 = 0.0001 + // k2 = 0.0002 + // k3 = 0.0001 + // Do = 2.0 + // D70 = 200 + // Calculate dH + // L = ToeOfDike.x - entrypoint.x = 50.5 - 10.0 = 40.5 + // =========== + + // reducedFall = HRiver - HExit = 1.0 - 0.0 = 1.0 + // FoSp = Hc / reducedFall = 3.65 / 1.0 = 3.65 + // For calculation of Hc see TestCanCalculateHCritical + const double diff = 0.01; var bc = new PipingCalculatorSellmeijerVNK { - HRiver = 1 + HRiver = 1.0, + HExit = 0.0, + PolderLevel = 0.0, + SurfaceLevel = 0.0, + Rc = 0.3, + DTotal = 2.0, + DInBetweenAquiferlayer = 2.0, + DBottomAquiferlayer = 6.0, + PermeabilityInBetweenAquiferlayer = 0.0001, + PermeabilityBottomAquiferlayer = 0.0002, + SeepageLength = 40.5, + D70 = 200.0, + WhitesConstant = 0.25, + BeddingAngle = 37.0, + WaterViscosity = 1.33E-06, }; -// bc.Calculate(); -// Assert.AreEqual(0.123, bc.FoSp); -// Assert.AreEqual(1.222, bc.Hc); - // Assert.AreEqual(0, bc.FoSp); - // Assert.AreEqual(double.NaN, bc.Hc); + bc.Calculate(); + Assert.AreEqual(3.65, bc.FoSp, diff); + Assert.AreEqual(3.65, bc.Hc, diff); } [Test] - public void TestCalculation() + public void TestCalculateTheSellmeijerPipingFactorForProfileWithOneSandlayer() { -// // reducedFall = HRiver - HExit - (Rc * DTotal) = 1.0 - 0.0 - (0.3 * 2.0) = 0.4 -// // FoSp = Hc / reducedFall = 4.7596 / 0.4 = 11.899 -// // For calculation of Hc see TestCanCalculateHCritical -// // See also "..\..\doc\Evaluation Piping\Nieuwe rekenregel bligh Sellmeijeruli.xls" -// const double diff = 0.0001; + // See dgs-as2.geodelft.nl/DGWebPiping for calculation + // =========== + // gamma_w = 9.81 + // mu = 1.33E-06 + // gamma_p = 26.5 + // eta = 0.25 + // theta = 37 + // F = 1.2 + // i = 0.3 + // =========== + // D1 = dikte bovenste zandlaag = 4.0 + // D2 = dikte onderste zandlaag = 4.0 + // k1 = 0.0001 + // k2 = 0.0001 + // k3 = 0.0001 + // Do = 2.0 + // D70 = 200 + // Calculate dH + // L = ToeOfDike.x - entrypoint.x = 50.5 - 10.0 = 40.5 + // =========== + + // reducedFall = HRiver - HExit = 1.0 - 0.0 = 1.0 + // FoSp = Hc / reducedFall = 4.13581 / 1.0 = 4.13581 + // For calculation of Hc see TestCanCalculateHCritical + const double diff = 0.00001; var bc = new PipingCalculatorSellmeijerVNK { -// HRiver = 1.0, -// HExit = 0.0, -// Rc = 0.3, -// DTotal = 2.0, -// AquiferHeight = 8.0, -// SeepageLength = 40.5, -// D70 = 200.0, -// WhitesConstant = 0.25, -// BeddingAngle = 37.0, -// WaterViscosity = 1.33E-06, -// PermeabilityKx = 0.0001 + HRiver = 1.0, + HExit = 0.0, + PolderLevel = 0.0, + SurfaceLevel = 0.0, + Rc = 0.3, + DTotal = 2.0, + DInBetweenAquiferlayer = 4.0, + DBottomAquiferlayer = 4.0, + PermeabilityInBetweenAquiferlayer = 0.0001, + PermeabilityBottomAquiferlayer = 0.0001, + SeepageLength = 40.5, + D70 = 200.0, + WhitesConstant = 0.25, + BeddingAngle = 37.0, + WaterViscosity = 1.33E-06, }; -// bc.Calculate(); -// Assert.AreEqual(11.899117458988471, bc.FoSp, diff); -// Assert.AreEqual(4.7596469835953883, bc.Hc, diff); + bc.Calculate(); + Assert.AreEqual(4.13581, bc.FoSp, diff); + Assert.AreEqual(4.13581, bc.Hc, diff); } - -// [Test] -// public void CalculateTheSellmeijerPipingFactorForProfileWithTwoSandlayers() -// { -// const double cTolerance = 0.01; -// using (var surfaceLine = FactoryForSurfaceLineTests.CreateSurfaceLineTutorial1()) -// using (var dike = new Dike()) -// using (var location = new Location()) -// { -// var soilProfile = FactoryForSoilProfileTests.CreatePipingSellmeijerProfileWithTwoSandlayers(); -// var modelParametersForPLLines = new ModelParametersForPLLines(); -// modelParametersForPLLines.DampingFactorPL4 = 0.0; -// -// var calculator = new PipingCalculatorSellmeijer(modelParametersForPLLines, -// 1.0, dike.GaugePLLines, dike.Gauges, null, 1.0); -// -// var actual = calculator.CalculatePipingFactor(location, surfaceLine, soilProfile, 1.0); -// -// // Phreatic level in profile -// // Mass of soil volume above -// // material above bottom sandlayer: 0 to -5 m -// // dry/wet 5 m x 1 kN/m3 = 5 -// // Phreatic pressure (Head PLLine 4 is ca. 1.0 -// // 6.0 m x 10 kN/m3 = 60,0 -// // UpliftFactor = 5/60.0 = 0.0833 -// // UpliftFactor < 1.0, so piping will occur in toe of dike -// // -// // See dgs-as2.geodelft.nl/DGWebPiping for calculation -// // =========== -// // gamma_w = 9.81 -// // mu = 1.33E-06 -// // gamma_p = 26.5 -// // eta = 0.25 -// // theta = 37 -// // F = 1.2 -// // i = 0.3 -// // =========== -// // D1 = dikte bovenste zandlaag = 2.0 -// // D2 = dikte onderste zandlaag = 6.0 -// // k1 = 0.0001 -// // k2 = 0.0002 -// // k3 = 0.0001 -// // Do = 2.0 -// // D70 = 200 -// // Calculate dH -// // L = ToeOfDike.x - entrypoint.x = 50.5 - 10.0 = 40.5 -// // =========== -// // Hc = Calculated dH = 3.65 -// // Ha = waterlevel - polderlevel = 1.0 - 0.0 = 1.0 -// // Piping factor = Hc / Ha = 3.46 -// const double expected = 3.65; -// -// Assert.AreEqual(expected, actual.Value, cTolerance); -// } -// } -// -// [Test] -// public void CalculateTheSellmeijerPipingFactorForProfileWithOneSandlayer() -// { -// const double cTolerance = 0.01; -// using (var surfaceLine = FactoryForSurfaceLineTests.CreateSurfaceLineTutorial1()) -// using (var dike = new Dike()) -// using (var location = new Location()) -// { -// var soilProfile = FactoryForSoilProfileTests.CreatePipingSellmeijerProfileWithOneSandlayer(); -// var modelParametersForPLLines = new ModelParametersForPLLines(); -// modelParametersForPLLines.DampingFactorPL4 = 0.0; -// -// var calculator = new PipingCalculatorSellmeijer(modelParametersForPLLines, -// 1.0, dike.GaugePLLines, dike.Gauges, null, 1.0); -// calculator.FilenameCalculation = Path.GetFullPath(".\\CalculateTheSellmeijerPipingFactorForProfileWithOneSandlayer"); -// -// var actual = calculator.CalculatePipingFactor(location, surfaceLine, soilProfile, 1.0); -// -// // Phreatic level in profile -// // Mass of soil volume above -// // material above bottom sandlayer: 0 to -5 m -// // dry/wet 5 m x 1 kN/m3 = 5 -// // Phreatic pressure (Head PLLine 4 is ca. 1.0 -// // 6.0 m x 10 kN/m3 = 60,0 -// // UpliftFactor = 5/60.0 = 0.0833 -// // UpliftFactor < 1.0, so piping will occur in toe of dike -// // -// // See dgs-as2.geodelft.nl/DGWebPiping for calculation -// // =========== -// // gamma_w = 9.81 -// // mu = 1.33E-06 -// // gamma_p = 26.5 -// // eta = 0.25 -// // theta = 37 -// // F = 1.2 -// // i = 0.3 -// // =========== -// // D1 = dikte bovenste zandlaag = 4.0 -// // D2 = dikte onderste zandlaag = 4.0 -// // k1 = 0.0001 -// // k2 = 0.0001 -// // k3 = 0.0001 -// // Do = 2.0 -// // D70 = 200 -// // Calculate dH -// // L = ToeOfDike.x - entrypoint.x = 50.5 - 10.0 = 40.5 -// // =========== -// // Hc = Calculated dH = 4.13581 -// // Ha = waterlevel - polderlevel = 1.0 - 0.0 = 1.0 -// // Piping factor = Hc / Ha = 4.13581 -// const double expected = 4.13581; -// -// Assert.AreEqual(expected, actual.Value, cTolerance); -// } -// } - - - - } }