Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/DerivedPipingInput.cs
===================================================================
diff -u -r6a19166f5818e07d3430442efc50b8dfabb92e1b -r04e39e2be6e56f40de8ca5ade95a2e9c0c736c85
--- Ringtoets/Piping/src/Ringtoets.Piping.Data/DerivedPipingInput.cs (.../DerivedPipingInput.cs) (revision 6a19166f5818e07d3430442efc50b8dfabb92e1b)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Data/DerivedPipingInput.cs (.../DerivedPipingInput.cs) (revision 04e39e2be6e56f40de8ca5ade95a2e9c0c736c85)
@@ -108,6 +108,25 @@
}
///
+ /// Gets the effective thickness of the coverage layers at the exit point.
+ /// [m]
+ ///
+ public LogNormalDistribution EffectiveThicknessCoverageLayer
+ {
+ get
+ {
+ LogNormalDistribution thicknessCoverageLayer = new LogNormalDistribution(2)
+ {
+ Mean = RoundedDouble.NaN,
+ StandardDeviation = (RoundedDouble) 0.5
+ };
+ UpdateEffectiveThicknessCoverageLayerMean(thicknessCoverageLayer);
+
+ return thicknessCoverageLayer;
+ }
+ }
+
+ ///
/// Gets the total thickness of the aquifer layers at the exit point.
/// [m]
///
@@ -203,10 +222,28 @@
private void UpdateThicknessCoverageLayerMean(LogNormalDistribution thicknessCoverageLayerDistribution)
{
- if (input.SurfaceLine != null && input.StochasticSoilProfile != null && input.StochasticSoilProfile.SoilProfile != null && !double.IsNaN(input.ExitPointL))
+ StochasticSoilProfile stochasticSoilProfile = input.StochasticSoilProfile;
+ RingtoetsPipingSurfaceLine surfaceLine = input.SurfaceLine;
+ RoundedDouble exitPointL = input.ExitPointL;
+
+ if (stochasticSoilProfile != null && stochasticSoilProfile.SoilProfile != null && surfaceLine != null && !double.IsNaN(exitPointL))
{
var weightedMean = new RoundedDouble(thicknessCoverageLayerDistribution.Mean.NumberOfDecimalPlaces,
- InputParameterCalculationService.CalculateThicknessCoverageLayer(
+ GetThicknessCoverageLayers(stochasticSoilProfile.SoilProfile, surfaceLine, exitPointL));
+
+ if (weightedMean > 0)
+ {
+ thicknessCoverageLayerDistribution.Mean = weightedMean;
+ }
+ }
+ }
+
+ private void UpdateEffectiveThicknessCoverageLayerMean(LogNormalDistribution effectiveThicknessCoverageLayerDistribution)
+ {
+ if (input.SurfaceLine != null && input.StochasticSoilProfile != null && input.StochasticSoilProfile.SoilProfile != null && !double.IsNaN(input.ExitPointL))
+ {
+ var weightedMean = new RoundedDouble(effectiveThicknessCoverageLayerDistribution.Mean.NumberOfDecimalPlaces,
+ InputParameterCalculationService.CalculateEffectiveThicknessCoverageLayer(
input.WaterVolumetricWeight,
PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(input).GetDesignValue(),
input.ExitPointL,
@@ -215,7 +252,7 @@
if (weightedMean > 0)
{
- thicknessCoverageLayerDistribution.Mean = weightedMean;
+ effectiveThicknessCoverageLayerDistribution.Mean = weightedMean;
}
}
}
@@ -446,5 +483,22 @@
throw;
}
}
+
+ private static double GetThicknessCoverageLayers(PipingSoilProfile soilProfile, RingtoetsPipingSurfaceLine surfaceLine, RoundedDouble exitPointL)
+ {
+ try
+ {
+ double zAtL = surfaceLine.GetZAtL(exitPointL);
+ return soilProfile.GetConsecutiveCoverageLayerThicknessBelowLevel(zAtL);
+ }
+ catch (Exception e)
+ {
+ if (e is RingtoetsPipingSurfaceLineException || e is InvalidOperationException || e is ArgumentException)
+ {
+ return double.NaN;
+ }
+ throw;
+ }
+ }
}
}
\ No newline at end of file