using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; namespace Deltares.DamPiping.Tests { [TestFixture] public class PipingCalculatorBlighTests { [Test] public void CanCalculateThePipingFactorUsingBlighNoUplift() { var calculator = new PipingCalculatorBligh(); var actual = calculator.CalculatePipingFactor(); // Phreatic level in profile // Mass of soil volume above // dry 6 m x 12 kN/m3 = 72 // wet 9 m x 16 kN/m3 = 144 // Total: 72 + 144 = 216 // Phreatic pressure // 20 m x 10 kN/m3 = 200 // UpliftFactor = 216/200 = 1.08 // UpliftFactor > 1.0, so no piping, so returns cDefaultMaxReturnValue var expected = PipingCalculatorBligh.cDefaultMaxReturnValue; Assert.AreEqual(expected, actual); } // [Test] // public void CanCalculateThePipingFactorUsingBligh() // { // using (var surfaceLine = FactoryForSurfaceLineTests.CreateSurfaceLineTutorial1()) // using (var dike = new Dike()) // { // var soilProfile = FactoryForSoilProfileTests.CreateClaySandProfileForPipingBligh(); // var modelParametersForPLLines = new ModelParametersForPLLines(); // modelParametersForPLLines.DampingFactorPL4 = 0.0; // // var calculator = new PipingCalculatorBligh(modelParametersForPLLines, // 1.0, dike.GaugePLLines, dike.Gauges, 1.0); // // using (var location = new Location()) // { // var actual = calculator.CalculatePipingFactor(location, surfaceLine, soilProfile, 2.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 // // // // L = ToeOfDike.x - entrypoint.x = 50.5 - 10.0 = 40.5 // // d = height coverlayer = 5.0 // // Fluidisationgradient = 0.3 // // Hc = L / 18 = 40.5 / 18 = 2.25 // // Ha = 2.0 - 0.0 - (Fluidisationgradient * d) = 2.0 - 0.3 * 5.0 = 0.5 // // Piping factor = Hc / Ha = 2.25 / 0.5 // const double expected = 4.5; // // Assert.AreEqual(expected, actual); // } // } // } } }