Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs
===================================================================
diff -u -r5495 -r5506
--- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 5495)
+++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 5506)
@@ -24,7 +24,6 @@
using System.IO;
using System.Linq;
using System.Threading;
-using Deltares.DamEngine.Calculators.KernelWrappers.Assemblers;
using Deltares.DamEngine.Data.General;
using Deltares.DamEngine.Data.Geometry;
using Deltares.DamEngine.Data.Geotechnics;
@@ -856,7 +855,50 @@
Assert.That(File.Exists(file), Is.False, file + " does exist");
}
}
+
+ ///
+ /// This test uses the location DWP 1 of the Design Tutorial Stability.
+ /// Different values for the degree of consolidation (DoC) of the layers due to the traffic load are tested.
+ /// Expected is that a larger DoC leads to a larger safety factor because the soil effective stresses
+ /// below the traffic load (at the active side) are reduced.
+ /// Note that the test case where the DoC is unchanged (i.e. 100% for sand layers and 0% for cohesive layers)
+ /// and the test case where DoC=0% return the same safety factor because the Bishop slip circle cuts only the cohesive layers.
+ ///
+ ///
+ ///
+ [Test]
+ [TestCase(double.NaN, 1.256)] // DoC is unchanged
+ [TestCase(0, 1.256)]
+ [TestCase(50, 1.283)]
+ [TestCase(100, 1.309)]
+ public void GivenStabilityDesignTutorial_WhenCalculatingWithDifferentDegreeOfConsolidation_ThenReturnsADifferentSafetyFactor(double trafficLoadDegreeOfConsolidation, double expectedSafetyFactor)
+ {
+ const string calcDir = "TestEffectOfTrafficLoadDegreeOfConsolidation";
+ if (Directory.Exists(calcDir))
+ {
+ Directory.Delete(calcDir, true);
+ }
+ string inputString = File.ReadAllText(tutorialStability2D);
+ string[] locations = ["DWP_1"];
+ inputString = XmlAdapter.SelectLocations(inputString, locations);
+ inputString = XmlAdapter.ChangeValueInXml(inputString, "ProjectPath", "");
+ inputString = XmlAdapter.ChangeValueInXml(inputString, "CalculationMap", calcDir);
+ var engineInterface = new EngineInterface(inputString);
+ if (!double.IsNaN(trafficLoadDegreeOfConsolidation))
+ {
+ foreach (TrafficLoadDegreeOfConsolidation degreeOfConsolidation in engineInterface.DamProjectData.Dike.TrafficLoadDegreeOfConsolidations)
+ {
+ degreeOfConsolidation.DegreeOfConsolidation = trafficLoadDegreeOfConsolidation;
+ }
+ }
+
+ Output output = GeneralHelper.RunAfterInputValidation(engineInterface);
+
+ Assert.That(output.Results.CalculationResults, Has.Length.EqualTo(1));
+ Assert.That(output.Results.CalculationResults[0].StabilityDesignResults.SafetyFactor, Is.EqualTo(expectedSafetyFactor).Within(tolerance));
+ }
+
/// Test for different segmentFailureMechanismType
/// The soil probabilities are set tot the specified segmentFailureMechanismType
[TestCase(ConversionHelper.InputSegmentFailureMechanismStability)]