Index: DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingBlighTests.cs =================================================================== diff -u -r1075 -r1080 --- DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingBlighTests.cs (.../PipingBlighTests.cs) (revision 1075) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingBlighTests.cs (.../PipingBlighTests.cs) (revision 1080) @@ -148,8 +148,16 @@ Assert.IsNotNull(outputString); var output = DamXmlSerialization.LoadOutputFromXmlString(outputString); Assert.AreEqual(10, output.Results.CalculationResults.DesignResults.Length); -// Assert.AreEqual(0.7825, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.BlighFactor, tolerance); -// Assert.AreEqual(0.8089, output.Results.CalculationResults.DesignResults[121].PipingDesignResults.BlighFactor, tolerance); + Assert.AreEqual(1.516, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.BlighFactor, tolerance); + Assert.AreEqual(1.497, output.Results.CalculationResults.DesignResults[1].PipingDesignResults.BlighFactor, tolerance); + Assert.AreEqual(1.313, output.Results.CalculationResults.DesignResults[2].PipingDesignResults.BlighFactor, tolerance); + Assert.AreEqual(1.295, output.Results.CalculationResults.DesignResults[3].PipingDesignResults.BlighFactor, tolerance); + Assert.AreEqual(2.166, output.Results.CalculationResults.DesignResults[4].PipingDesignResults.BlighFactor, tolerance); + Assert.AreEqual(1.312, output.Results.CalculationResults.DesignResults[5].PipingDesignResults.BlighFactor, tolerance); + Assert.AreEqual(1.486, output.Results.CalculationResults.DesignResults[6].PipingDesignResults.BlighFactor, tolerance); + Assert.AreEqual(1.356, output.Results.CalculationResults.DesignResults[7].PipingDesignResults.BlighFactor, tolerance); + Assert.AreEqual(1.722, output.Results.CalculationResults.DesignResults[8].PipingDesignResults.BlighFactor, tolerance); + Assert.AreEqual(1.311, output.Results.CalculationResults.DesignResults[9].PipingDesignResults.BlighFactor, tolerance); } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs =================================================================== diff -u -r1075 -r1080 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 1075) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 1080) @@ -284,11 +284,12 @@ List calculationMessages, List designCalculations) { var designResults = new List(); + var location = damKernelInput.Location; + var surfaceLine = location.SurfaceLine; + var orgSurfaceLine = surfaceLine; try { List locationCalculationMessages = new List(); - var location = damKernelInput.Location; - var surfaceLine = location.SurfaceLine; double orgShoulderLength = surfaceLine.DetermineShoulderWidth(); double orgShoulderHeight = surfaceLine.DetermineShoulderHeight(); @@ -367,6 +368,7 @@ } finally { + damKernelInput.Location.SurfaceLine = orgSurfaceLine; foreach (var designResult in designResults) { designCalculations.Add(designResult); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs =================================================================== diff -u -r1070 -r1080 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 1070) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 1080) @@ -334,9 +334,13 @@ double xEntry = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).X; double xExit = upliftLocationAndResult.X; damPipingBlighInput.SeepageLength = xExit - xEntry; + var topLevelAquifer = soilProfile.GetLayerWithName(upliftLocationAndResult.LayerWhereUpliftOccuresId).TopLevel; + double dCoverLayer = DamPipingHelper.DetermineHeightCoverLayer(topLevelAquifer, point.Z); // point.Z is surfacelevel + damPipingBlighInput.DTotal = dCoverLayer; + var referenceLevel = Math.Max(location.PolderLevel, point.Z); // point.Z is surfacelevel + damPipingBlighInput.HExit = referenceLevel; // Calculate the piping safety factor using the level of the given point PerformSingleCalculationBligh(out messages, damPipingBlighOutput, damPipingBlighInput); - //var sp = CalculatePipingFactorAtLevel(location, waterLevel, point.Z); // If too low, then determine required height and length (from uplift) if (damPipingBlighOutput.FoSp < requiredFoS)