using Deltares.Dam.Data; using Deltares.Geometry; using Deltares.Geotechnics; using Deltares.Geotechnics.SurfaceLines; using Deltares.Geotechnics.TestUtils; using Deltares.Standard.TestUtils; using NUnit.Framework; namespace Deltares.Dam.Tests { [TestFixture] public class PipingCalculatorWti2017Test { [Test] [Ignore("No effort to be put in Dam Piping WTI 2017 Failure mechanism in Dam Classic")] public void CanCalculateThePipingFactorUsingWti2017NoUplift() { using (var surfaceLine = FactoryForSurfaceLineTests.CreateSurfaceLineTutorial1()) using(var dike = new Dike()) using (var location = new Location()) { var soilProfile = FactoryForSoilProfileTests.CreatePipingSellmeijerProfileWithOneSandlayer(); soilProfile.Layers[0].Soil.AbovePhreaticLevel = 20.0; soilProfile.Layers[0].Soil.BelowPhreaticLevel = 22.0; var modelParametersForPLLines = new ModelParametersForPLLines();//are the values initialized correctly? var calculator = new PipingCalculatorWti2017(modelParametersForPLLines, 1.0, dike.GaugePLLines, dike.Gauges, 1.0); location.HeadPl3 = 1.0; location.PolderLevel = -1.0; // Push bottom of ditch up so nouplift will occur in ditch surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchDikeSide).Z = -0.5; surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide).Z = -0.5; var actual = calculator.CalculatePipingFactor(location, surfaceLine, soilProfile, 1.0); // Calculation at toe of dike // Phreatic level in profile = 0 // PL3 = waterlevel = 1 m // Mass of soil volume above // wet 2 m x (22-9.81) kN/m3 = 2 x 12.19 = 24.38 // dry 0 m x 20 kN/m3 = 0 // Total: 24.38 + 0 = 24.38 // deltaPhiCu = EffectiveStress / VolumetricWeightOfWater // = 24.38 / 9.81 = 2.485219164 // UpliftFactor = ModelFactor x deltaPhiCu / (PhiExit - HExit) = 1 x 2.485219164/ (1-0) = 2.485219164 // UpliftFactor > 1.0, so no piping, so returns cDefaultMaxReturnValue var expected = PipingCalculatorWti2017.cDefaultMaxReturnValue; Assert.AreEqual(expected, actual); } } /// /// These results are documented in the document /// [Test] [Ignore("No effort to be put in Dam Piping WTI 2017 Failure mechanism in Dam Classic")] public void CanCalculateThePipingFactorUsingWti2017() { using (var surfaceLine = FactoryForSurfaceLineTests.CreateSurfaceLineTutorial1()) using(var dike = new Dike()) using (var location = new Location()) { var soilProfile = FactoryForSoilProfileTests.CreatePipingSellmeijerProfileWithOneSandlayer(); soilProfile.Layers[0].Soil.AbovePhreaticLevel = 11.0; soilProfile.Layers[0].Soil.BelowPhreaticLevel = 12.0; var modelParametersForPLLines = new ModelParametersForPLLines(); modelParametersForPLLines.DampingFactorPL4 = 0.0; var calculator = new PipingCalculatorWti2017(modelParametersForPLLines, 1.0, dike.GaugePLLines, dike.Gauges, 1.0); location.HeadPl3 = 1.0; location.PolderLevel = -1.0; var actual = calculator.CalculatePipingFactor(location, surfaceLine, soilProfile, 1.0); // Calculation at toe of dike // Phreatic level in profile = 0 // PL3 = waterlevel = 1 m // Mass of soil volume above // wet 2 m x (12 - 9.81) kN/m3 = 2 x 2.19 = 4.38 // dry 0 m x 11 kN/m3 = 0 // Total: 4.38 + 0 = 4.38 // deltaPhiCu = EffectiveStress / VolumetricWeightOfWater // = 4.38 / 9.81 = 0.44648318 // UpliftFactor = ModelFactor x deltaPhiCu / (PhiExit - HExit) = 1 x 0.44648318/ (1-0) = 0.44648318 // UpliftFactor < 1.0, so piping occurs const double cTolerance = 0.000001; const double expectedUpliftFactor = 0.44648318; const double expectedHeaveFactor = 90.0; const double expectedPipingFactor = 4.3308781917152679; // Value is taken from the actual calculation itself and not manual calculated const double expectedHCritical = 4.3308781917152679; // Value is taken from the actual calculation itself and not manual calculated Assert.AreEqual(expectedUpliftFactor, calculator.UpliftLocationAndResult.UpliftFactor, cTolerance); Assert.AreEqual(expectedHeaveFactor, calculator.HeaveFactor, cTolerance); Assert.IsNotNull(actual); Assert.AreEqual(expectedPipingFactor, actual.Value, cTolerance); Assert.AreEqual(expectedHCritical, calculator.HCritical, cTolerance); } } [Test, Ignore("Following test is derived PipingCalculatorSellmeijerTest and should be revised for PipingCalculatorWti2017")] public void CanCalculatePipingDesignUsingWti2017() { const double cTolerance = 0.01; using (var surfaceLine = FactoryForSurfaceLineTests.CreateSurfaceLineTutorial1()) using (var dike = new Dike()) using (var location = new Location()) using (var location1 = new Location()) { var soilProfile = FactoryForSoilProfileTests.CreatePipingDesignSellmeijerDesign(); var modelParametersForPLLines = new ModelParametersForPLLines(); modelParametersForPLLines.DampingFactorPL4 = 0.0; var calculator = new PipingCalculatorWti2017(modelParametersForPLLines, 2.0, dike.GaugePLLines, dike.Gauges, 1.0); calculator.IsHydraulicShortcut = true; var point = new GeometryPoint(55, 0, 0); var pipingFactor = calculator.CalculatePipingFactor(location, surfaceLine, soilProfile, 4.0); var actualPipingDesign = calculator.CalculateDesignAtPoint(location1, surfaceLine, soilProfile, 4.0, point); // Following calculation is from PipingCalculatorSellmeijerTest and should be revised for PipingCalculatorWti2017 // // Phreatic level in profile // Mass of soil volume above // material above bottom sandlayer: 0 to -2 m // dry/wet 2 m x 5 kN/m3 = 10 // Phreatic pressure (Head PLLine 4) is 4.0 - -2 = 6 // 6.0 m x 9.81 kN/m3 = 58.86 // UpliftFactor = 10.0/58.86 = 0.1699 (in inbetween aquiferlayer; for bottomlayer its 0.25 so inbetween layer is prevelant) // 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 = Point.x - entrypoint.x = 55 - 10.0 = 45 // =========== // Ha = waterlevel - polderlevel = 4.0 - 0.0 = 4.0 // Hcrit = 3.96 // Pipingfactor = 0.9911 (smaller then required so shoulder is needed) // Shoulder length = point.x - diketoe.x = 55 -50.5 = 4.5 // Shoulderheight calculation // Phreatic pressure (Head PLLine 4) is 4.0 // 6.0 m x 9.81 kN/m3 = 58.86 // Materialweight = UpliftFactor * Wateruplift = 1.0 * 58.86 // material height above bottom sandlayer should be // Height = Materialweight / (dry or wet) = 58.86 / 5.0 = 11.772 3.924; // Height shoulder = Height - (Height to Surfacelevel) = 11.772 - 2.0 = 9.772 m // var expectedPipingDesign = new PipingDesign(4.50, 9.772); Assert.AreEqual(expectedPipingDesign.PipingLengthFromToe, actualPipingDesign.PipingLengthFromToe, cTolerance); Assert.AreEqual(expectedPipingDesign.ShoulderHeightFromToe, actualPipingDesign.ShoulderHeightFromToe, cTolerance); } } } }