Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSemiProbabilisticDesignValueFactory.cs
===================================================================
diff -u -r708bcebfe9e5db209c818a12d630cb418231f863 -re8655c3b4b463b40f20e289ffeaf9d9605c291c0
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSemiProbabilisticDesignValueFactory.cs (.../MacroStabilityInwardsSemiProbabilisticDesignValueFactory.cs) (revision 708bcebfe9e5db209c818a12d630cb418231f863)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSemiProbabilisticDesignValueFactory.cs (.../MacroStabilityInwardsSemiProbabilisticDesignValueFactory.cs) (revision e8655c3b4b463b40f20e289ffeaf9d9605c291c0)
@@ -37,5 +37,53 @@
{
return SemiProbabilisticDesignValueFactory.CreateDesignVariable(properties.AbovePhreaticLevel, 0.5);
}
+
+ ///
+ /// Creates the design variable for .
+ ///
+ public static VariationCoefficientLogNormalDistributionDesignVariable GetBelowPhreaticLevel(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties)
+ {
+ return SemiProbabilisticDesignValueFactory.CreateDesignVariable(properties.BelowPhreaticLevel, 0.5);
+ }
+
+ ///
+ /// Creates the design variable for .
+ ///
+ public static VariationCoefficientLogNormalDistributionDesignVariable GetCohesion(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties)
+ {
+ return SemiProbabilisticDesignValueFactory.CreateDesignVariable(properties.Cohesion, 0.05);
+ }
+
+ ///
+ /// Creates the design variable for .
+ ///
+ public static VariationCoefficientLogNormalDistributionDesignVariable GetFrictionAngle(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties)
+ {
+ return SemiProbabilisticDesignValueFactory.CreateDesignVariable(properties.FrictionAngle, 0.05);
+ }
+
+ ///
+ /// Creates the design variable for .
+ ///
+ public static VariationCoefficientLogNormalDistributionDesignVariable GetShearStrengthRatio(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties)
+ {
+ return SemiProbabilisticDesignValueFactory.CreateDesignVariable(properties.ShearStrengthRatio, 0.05);
+ }
+
+ ///
+ /// Creates the design variable for .
+ ///
+ public static VariationCoefficientLogNormalDistributionDesignVariable GetStrengthIncreaseExponent(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties)
+ {
+ return SemiProbabilisticDesignValueFactory.CreateDesignVariable(properties.StrengthIncreaseExponent, 0.05);
+ }
+
+ ///
+ /// Creates the design variable for .
+ ///
+ public static VariationCoefficientLogNormalDistributionDesignVariable GetPop(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties)
+ {
+ return SemiProbabilisticDesignValueFactory.CreateDesignVariable(properties.Pop, 0.05);
+ }
}
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.cs
===================================================================
diff -u -r215064b63d899a054496d365818feb84cd1ab8b4 -re8655c3b4b463b40f20e289ffeaf9d9605c291c0
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.cs (.../MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.cs) (revision 215064b63d899a054496d365818feb84cd1ab8b4)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.cs (.../MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.cs) (revision e8655c3b4b463b40f20e289ffeaf9d9605c291c0)
@@ -67,6 +67,12 @@
CoefficientOfVariation = (RoundedDouble) properties.FrictionAngleCoefficientOfVariation
};
+ StrengthIncreaseExponent = new VariationCoefficientLogNormalDistribution(2)
+ {
+ Mean = (RoundedDouble) properties.StrengthIncreaseExponentMean,
+ CoefficientOfVariation = (RoundedDouble) properties.StrengthIncreaseExponentCoefficientOfVariation
+ };
+
ShearStrengthRatio = new VariationCoefficientLogNormalDistribution(2)
{
Mean = (RoundedDouble) properties.ShearStrengthRatioMean,
@@ -132,6 +138,12 @@
public VariationCoefficientLogNormalDistribution FrictionAngle { get; }
///
+ /// Gets the strength increase component.
+ /// [-]
+ ///
+ public VariationCoefficientLogNormalDistribution StrengthIncreaseExponent { get; set; }
+
+ ///
/// Gets the shear strength ratio.
/// [-]
///
@@ -168,6 +180,11 @@
public RoundedDouble FrictionAngleDesignVariable { get; set; }
///
+ /// Gets or sets the design variable of the distribution for the strength increase exponent.
+ ///
+ public RoundedDouble StrengthIncreaseExponentDesignVariable { get; set; }
+
+ ///
/// Gets or sets the design variable of the distribution for the shear strength ratio.
///
public RoundedDouble ShearStrengthRatioDesignVariable { get; set; }
@@ -196,6 +213,8 @@
CohesionCoefficientOfVariation = double.NaN;
FrictionAngleMean = double.NaN;
FrictionAngleCoefficientOfVariation = double.NaN;
+ StrengthIncreaseExponentMean = double.NaN;
+ StrengthIncreaseExponentCoefficientOfVariation = double.NaN;
ShearStrengthRatioMean = double.NaN;
ShearStrengthRatioCoefficientOfVariation = double.NaN;
PopMean = double.NaN;
@@ -253,6 +272,18 @@
public double FrictionAngleCoefficientOfVariation { internal get; set; }
///
+ /// Gets or sets the mean of the distribution for the strength increase exponent.
+ /// [-]
+ ///
+ public double StrengthIncreaseExponentMean { internal get; set; }
+
+ ///
+ /// Gets or sets the coefficient of variation of the distribution for the strength increase exponent.
+ /// [-]
+ ///
+ public double StrengthIncreaseExponentCoefficientOfVariation { internal get; set; }
+
+ ///
/// Gets or sets the mean of the distribution for the shear strength ratio.
/// [-]
///
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSemiProbabilisticDesignValueFactoryTest.cs
===================================================================
diff -u -r708bcebfe9e5db209c818a12d630cb418231f863 -re8655c3b4b463b40f20e289ffeaf9d9605c291c0
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSemiProbabilisticDesignValueFactoryTest.cs (.../MacroStabilityInwardsSemiProbabilisticDesignValueFactoryTest.cs) (revision 708bcebfe9e5db209c818a12d630cb418231f863)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSemiProbabilisticDesignValueFactoryTest.cs (.../MacroStabilityInwardsSemiProbabilisticDesignValueFactoryTest.cs) (revision e8655c3b4b463b40f20e289ffeaf9d9605c291c0)
@@ -19,6 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using NUnit.Framework;
using Ringtoets.Common.Data.Probabilistics;
using Ringtoets.Common.Data.TestUtil;
@@ -29,15 +30,27 @@
[TestFixture]
public class MacroStabilityInwardsSemiProbabilisticDesignValueFactoryTest
{
+ private Random random;
+ private double mean;
+ private double coefficientOfVariation;
+
+ [SetUp]
+ public void Setup()
+ {
+ random = new Random();
+ mean = random.NextDouble();
+ coefficientOfVariation = random.NextDouble();
+ }
+
[Test]
- public void GetAbovePhreaticLevel_ValidSoilLayerProperties_CreateDesignValueForAbovePhreaticLevel()
+ public void GetAbovePhreaticLevel_ValidSoilLayerProperties_CreateDesignVariableForAbovePhreaticLevel()
{
// Setup
var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(
new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties
{
- AbovePhreaticLevelMean = 1,
- AbovePhreaticLevelCoefficientOfVariation = 0.4
+ AbovePhreaticLevelMean = mean,
+ AbovePhreaticLevelCoefficientOfVariation = coefficientOfVariation
});
// Call
@@ -48,6 +61,120 @@
AssertPercentile(0.5, abovePhreaticLevel);
}
+ [Test]
+ public void GetBelowPhreaticLevel_ValidSoilLayerProperties_CreateDesignVariableForBelowPhreaticLevel()
+ {
+ // Setup
+ var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(
+ new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties
+ {
+ BelowPhreaticLevelMean = mean,
+ BelowPhreaticLevelCoefficientOfVariation = coefficientOfVariation
+ });
+
+ // Call
+ VariationCoefficientLogNormalDistributionDesignVariable belowPhreaticLevel = MacroStabilityInwardsSemiProbabilisticDesignValueFactory.GetBelowPhreaticLevel(properties);
+
+ // Assert
+ DistributionAssert.AreEqual(properties.BelowPhreaticLevel, belowPhreaticLevel.Distribution);
+ AssertPercentile(0.5, belowPhreaticLevel);
+ }
+
+ [Test]
+ public void GetCohesion_ValidSoilLayerProperties_CreateDesignVariableForCohesion()
+ {
+ // Setup
+ var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(
+ new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties
+ {
+ CohesionMean = mean,
+ CohesionCoefficientOfVariation = coefficientOfVariation
+ });
+
+ // Call
+ VariationCoefficientLogNormalDistributionDesignVariable cohesion = MacroStabilityInwardsSemiProbabilisticDesignValueFactory.GetCohesion(properties);
+
+ // Assert
+ DistributionAssert.AreEqual(properties.Cohesion, cohesion.Distribution);
+ AssertPercentile(0.05, cohesion);
+ }
+
+ [Test]
+ public void GetFrictionAngle_ValidSoilLayerProperties_CreateDesignVariableForFrictionAngle()
+ {
+ // Setup
+ var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(
+ new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties
+ {
+ FrictionAngleMean = mean,
+ FrictionAngleCoefficientOfVariation = coefficientOfVariation
+ });
+
+ // Call
+ VariationCoefficientLogNormalDistributionDesignVariable frictionAngle = MacroStabilityInwardsSemiProbabilisticDesignValueFactory.GetFrictionAngle(properties);
+
+ // Assert
+ DistributionAssert.AreEqual(properties.FrictionAngle, frictionAngle.Distribution);
+ AssertPercentile(0.05, frictionAngle);
+ }
+
+ [Test]
+ public void GetShearStrengthRatio_ValidSoilLayerProperties_CreateDesignVariableForShearStrengthRatio()
+ {
+ // Setup
+ var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(
+ new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties
+ {
+ ShearStrengthRatioMean = mean,
+ ShearStrengthRatioCoefficientOfVariation = coefficientOfVariation
+ });
+
+ // Call
+ VariationCoefficientLogNormalDistributionDesignVariable shearStrengthRatio = MacroStabilityInwardsSemiProbabilisticDesignValueFactory.GetShearStrengthRatio(properties);
+
+ // Assert
+ DistributionAssert.AreEqual(properties.ShearStrengthRatio, shearStrengthRatio.Distribution);
+ AssertPercentile(0.05, shearStrengthRatio);
+ }
+
+ [Test]
+ public void GetStrengthIncreaseExponent_ValidSoilLayerProperties_CreateDesignVariableForStrengthIncreaseExponent()
+ {
+ // Setup
+ var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(
+ new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties
+ {
+ StrengthIncreaseExponentMean = mean,
+ StrengthIncreaseExponentCoefficientOfVariation = coefficientOfVariation
+ });
+
+ // Call
+ VariationCoefficientLogNormalDistributionDesignVariable strengthIncreaseExponent = MacroStabilityInwardsSemiProbabilisticDesignValueFactory.GetStrengthIncreaseExponent(properties);
+
+ // Assert
+ DistributionAssert.AreEqual(properties.StrengthIncreaseExponent, strengthIncreaseExponent.Distribution);
+ AssertPercentile(0.05, strengthIncreaseExponent);
+ }
+
+ [Test]
+ public void GetPop_ValidSoilLayerProperties_CreateDesignVariableForPop()
+ {
+ // Setup
+ var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(
+ new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties
+ {
+ PopMean = mean,
+ PopCoefficientOfVariation = coefficientOfVariation
+ });
+
+ // Call
+ VariationCoefficientLogNormalDistributionDesignVariable pop = MacroStabilityInwardsSemiProbabilisticDesignValueFactory.GetPop(properties);
+
+ // Assert
+ DistributionAssert.AreEqual(properties.Pop, pop.Distribution);
+ AssertPercentile(0.05, pop);
+ }
+
private static void AssertPercentile(double percentile, VariationCoefficientDesignVariable designVariable)
{
Assert.IsInstanceOf(designVariable);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLineTest.cs
===================================================================
diff -u -r215064b63d899a054496d365818feb84cd1ab8b4 -re8655c3b4b463b40f20e289ffeaf9d9605c291c0
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLineTest.cs (.../MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLineTest.cs) (revision 215064b63d899a054496d365818feb84cd1ab8b4)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLineTest.cs (.../MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLineTest.cs) (revision e8655c3b4b463b40f20e289ffeaf9d9605c291c0)
@@ -69,6 +69,10 @@
double frictionAngleCoefficientOfVariation = random.NextDouble();
RoundedDouble frictionAngleDesignVariable = random.NextRoundedDouble();
+ double strengthIncreaseExponentMean = random.NextDouble();
+ double strengthIncreaseExponentCoefficientOfVariation = random.NextDouble();
+ RoundedDouble strengthIncreaseExponentDesignVariable = random.NextRoundedDouble();
+
double shearStrengthRatioMean = random.NextDouble();
double shearStrengthRatioCoefficientOfVariation = random.NextDouble();
RoundedDouble shearStrengthRatioDesignVariable = random.NextRoundedDouble();
@@ -91,6 +95,8 @@
CohesionCoefficientOfVariation = cohesionCoefficientOfVariation,
FrictionAngleMean = frictionAngleMean,
FrictionAngleCoefficientOfVariation = frictionAngleCoefficientOfVariation,
+ StrengthIncreaseExponentMean = strengthIncreaseExponentMean,
+ StrengthIncreaseExponentCoefficientOfVariation = strengthIncreaseExponentCoefficientOfVariation,
ShearStrengthRatioMean = shearStrengthRatioMean,
ShearStrengthRatioCoefficientOfVariation = shearStrengthRatioCoefficientOfVariation,
PopMean = popMean,
@@ -104,6 +110,7 @@
BelowPhreaticLevelDesignVariable = belowPhreaticLevelDesignVariable,
CohesionDesignVariable = cohesionDesignVariable,
FrictionAngleDesignVariable = frictionAngleDesignVariable,
+ StrengthIncreaseExponentDesignVariable = strengthIncreaseExponentDesignVariable,
ShearStrengthRatioDesignVariable = shearStrengthRatioDesignVariable,
PopDesignVariable = popDesignVariable
};
@@ -117,6 +124,7 @@
Assert.AreEqual(belowPhreaticLevelDesignVariable, properties.BelowPhreaticLevelDesignVariable);
Assert.AreEqual(cohesionDesignVariable, properties.CohesionDesignVariable);
Assert.AreEqual(frictionAngleDesignVariable, properties.FrictionAngleDesignVariable);
+ Assert.AreEqual(strengthIncreaseExponentDesignVariable, properties.StrengthIncreaseExponentDesignVariable);
Assert.AreEqual(shearStrengthRatioDesignVariable, properties.ShearStrengthRatioDesignVariable);
Assert.AreEqual(popDesignVariable, properties.PopDesignVariable);
DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2)
@@ -141,6 +149,11 @@
}, properties.FrictionAngle);
DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2)
{
+ Mean = (RoundedDouble) strengthIncreaseExponentMean,
+ CoefficientOfVariation = (RoundedDouble) strengthIncreaseExponentCoefficientOfVariation
+ }, properties.StrengthIncreaseExponent);
+ DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2)
+ {
Mean = (RoundedDouble) shearStrengthRatioMean,
CoefficientOfVariation = (RoundedDouble) shearStrengthRatioCoefficientOfVariation
}, properties.ShearStrengthRatio);
@@ -182,6 +195,11 @@
{
Mean = RoundedDouble.NaN,
CoefficientOfVariation = RoundedDouble.NaN
+ }, properties.StrengthIncreaseExponent);
+ DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2)
+ {
+ Mean = RoundedDouble.NaN,
+ CoefficientOfVariation = RoundedDouble.NaN
}, properties.ShearStrengthRatio);
DistributionAssert.AreEqual(new VariationCoefficientLogNormalDistribution(2)
{