Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs =================================================================== diff -u -r3254da22c99c7eb680cdb838519684ce314afb0a -r124e30d6f914a8e154ae8de0827ca363c89bba64 --- Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs (.../AddNewDemoAssessmentSectionCommandTest.cs) (revision 3254da22c99c7eb680cdb838519684ce314afb0a) +++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs (.../AddNewDemoAssessmentSectionCommandTest.cs) (revision 124e30d6f914a8e154ae8de0827ca363c89bba64) @@ -420,7 +420,7 @@ GetAccuracy(inputParameters.PhreaticLevelExit)); Assert.AreEqual(0.011453, PipingSemiProbabilisticDesignValueFactory.GetDiameter70(inputParameters).GetDesignValue(), GetAccuracy(inputParameters.Diameter70)); - Assert.AreEqual(1.179897, PipingSemiProbabilisticDesignValueFactory.GetDarcyPermeability(inputParameters).GetDesignValue(), + Assert.AreEqual(1.179895, PipingSemiProbabilisticDesignValueFactory.GetDarcyPermeability(inputParameters).GetDesignValue(), GetAccuracy(inputParameters.DarcyPermeability)); Assert.AreEqual(17.5, PipingSemiProbabilisticDesignValueFactory.GetSaturatedVolumicWeightOfCoverageLayer(inputParameters).GetDesignValue(), GetAccuracy(inputParameters.SaturatedVolumicWeightOfCoverageLayer)); Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/DerivedPipingInput.cs =================================================================== diff -u -r3254da22c99c7eb680cdb838519684ce314afb0a -r124e30d6f914a8e154ae8de0827ca363c89bba64 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/DerivedPipingInput.cs (.../DerivedPipingInput.cs) (revision 3254da22c99c7eb680cdb838519684ce314afb0a) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/DerivedPipingInput.cs (.../DerivedPipingInput.cs) (revision 124e30d6f914a8e154ae8de0827ca363c89bba64) @@ -283,8 +283,11 @@ numberOfDecimals)) { PipingSoilLayer topMostAquiferLayer = aquiferLayers.First(); - double deviationFraction = (topMostAquiferLayer.PermeabilityDeviation / topMostAquiferLayer.PermeabilityMean); + var permeabilityDeviation = new RoundedDouble(numberOfDecimals, topMostAquiferLayer.PermeabilityDeviation); + var permeabilityMean = new RoundedDouble(numberOfDecimals, topMostAquiferLayer.PermeabilityMean); + double deviationFraction = (permeabilityDeviation / permeabilityMean); + var weightedMean = new RoundedDouble(numberOfDecimals, GetWeightedMeanForDarcyPermeabilityOfAquiferLayer(aquiferLayers, input.StochasticSoilProfile.SoilProfile, @@ -374,7 +377,7 @@ return true; } - return distributions.All(currentLayerDistribution => AreDeviationAndFractionEqual( + return distributions.All(currentLayerDistribution => AreDeviationAndMeanFractionEqual( currentLayerDistribution, distributions[0])); } @@ -418,7 +421,7 @@ currentLayerDistribution.Shift == baseLayerDistribution.Shift; } - private static bool AreDeviationAndFractionEqual(LogNormalDistribution currentLayerDistribution, LogNormalDistribution baseLayerDistribution) + private static bool AreDeviationAndMeanFractionEqual(LogNormalDistribution currentLayerDistribution, LogNormalDistribution baseLayerDistribution) { var baseLayerDeviationFraction = (baseLayerDistribution.StandardDeviation / baseLayerDistribution.Mean); var currentLayerDeviationFraction = (currentLayerDistribution.StandardDeviation / currentLayerDistribution.Mean); Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs =================================================================== diff -u -r3254da22c99c7eb680cdb838519684ce314afb0a -r124e30d6f914a8e154ae8de0827ca363c89bba64 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs (.../DerivedPipingInputTest.cs) (revision 3254da22c99c7eb680cdb838519684ce314afb0a) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs (.../DerivedPipingInputTest.cs) (revision 124e30d6f914a8e154ae8de0827ca363c89bba64) @@ -765,7 +765,7 @@ PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); - double belowPhreaticLevelMean = random.NextDouble(); + double belowPhreaticLevelMean = 0.1 + random.NextDouble(); double deviation = random.NextDouble(); double shift = random.NextDouble(); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", 0.0, new[] @@ -798,8 +798,8 @@ PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); - var belowPhreaticLevelMeanA = random.NextDouble(); - var belowPhreaticLevelMeanB = random.NextDouble(); + var belowPhreaticLevelMeanA = 0.1 + random.NextDouble(); + var belowPhreaticLevelMeanB = 0.1 + random.NextDouble(); double deviation = random.NextDouble(); double shift = random.NextDouble(); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] @@ -846,8 +846,8 @@ PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); - var belowPhreaticLevelMeanA = random.NextDouble(); - var belowPhreaticLevelMeanB = random.NextDouble(); + var belowPhreaticLevelMeanA = 0.1 + random.NextDouble(); + var belowPhreaticLevelMeanB = 0.1 + random.NextDouble(); double deviation = random.NextDouble(); double shift = random.NextDouble(); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] @@ -1124,9 +1124,9 @@ PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); - double mean = random.NextDouble(); + double mean = 0.1 + random.NextDouble(); double deviation = mean / 2; - double mean2 = random.NextDouble(); + double mean2 = 0.1 + random.NextDouble(); double deviation2 = mean2/2; input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", 0.0, new[] { @@ -1148,7 +1148,7 @@ var result = derivedInput.DarcyPermeability; // Assert - var weightedMean = 0.885136; + var weightedMean = (mean * 0.5 + mean2) / 1.5; Assert.AreEqual(weightedMean, result.Mean, result.Mean.GetAccuracy()); Assert.AreEqual(weightedMean / 2, result.StandardDeviation, result.StandardDeviation.GetAccuracy()); } @@ -1160,7 +1160,7 @@ PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); - var permeabilityMean = random.NextDouble(); + var permeabilityMean = 0.1 + random.NextDouble(); var permeabilityDeviation = random.NextDouble(); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -1177,7 +1177,7 @@ // Assert var expectedMean = new RoundedDouble(6, permeabilityMean); - var expectedDeviation = new RoundedDouble(6, expectedMean * (permeabilityDeviation / permeabilityMean)); + var expectedDeviation = new RoundedDouble(6, permeabilityDeviation); Assert.AreEqual(expectedMean, result.Mean); Assert.AreEqual(expectedDeviation, result.StandardDeviation, result.StandardDeviation.GetAccuracy()); } @@ -1304,7 +1304,7 @@ PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); - var diameterD70Mean = random.NextDouble(); + var diameterD70Mean = 0.1 + random.NextDouble(); var diameterD70Deviation = random.NextDouble(); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] {