Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapperTests.cs =================================================================== diff -u -r938 -r948 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapperTests.cs (.../DamMacroStabilityInwardsKernelWrapperTests.cs) (revision 938) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapperTests.cs (.../DamMacroStabilityInwardsKernelWrapperTests.cs) (revision 948) @@ -45,10 +45,26 @@ private const string TestFolder = @"..\..\Deltares.DamEngine.Calculators.Tests\KernelWrappers\DamMacroStabilityCommon\TestData"; [Test] - public void TestFullCalculation() + public void TestFullCalculationBishop() { // expected results are based on test CanCalculateStabilitySafetyFactorGeometry2D // in 'https://repos.deltares.nl/repos/dam/dam classic' revision 190 + FullCalculation(MStabModelType.Bishop, 1.5570); + } + + [Test] + public void TestFullCalculationUpliftVan() + { + // expected results are based on test CanCalculateStabilitySafetyFactorGeometry2D + // in 'https://repos.deltares.nl/repos/dam/dam classic' revision 190 + // but I changed (in dam classic) the model to UpliftVan + // and added UpliftCriterionStability = 1.2 + // result in dam classic = 1.0105 + FullCalculation(MStabModelType.UpliftVan, 1.0105); + } + + public void FullCalculation(MStabModelType model, double expectedValue) + { const double diff = 0.01; var soilDbName = Path.Combine(TestFolder, "soilmaterials.mdb"); var soilGeometry2DName = "1D1.sti"; @@ -70,7 +86,9 @@ scenario.Location.StabilityOptions.MapForSoilGeometries2D = TestFolder; scenario.Location.StabilityOptions.SoilDatabaseName = soilDbName; scenario.ModelFactors.RequiredSafetyFactorStabilityInnerSlope = 1.1; + scenario.ModelFactors.UpliftCriterionStability = 1.2; + var subSoilScenario = new SoilGeometryProbability(); subSoilScenario.StiFileName = soilGeometry2DName; subSoilScenario.SoilProfileType = SoilProfileType.ProfileTypeStiFile; @@ -80,7 +98,7 @@ failureMechanismParametersMStab.MStabParameters.GridPosition = MStabGridPosition.Right; failureMechanismParametersMStab.MStabParameters.SearchMethod = MStabSearchMethod.GeneticAlgorithm; failureMechanismParametersMStab.MStabParameters.CalculationOptions.MinimalCircleDepth = 1.0; - failureMechanismParametersMStab.MStabParameters.Model = MStabModelType.Bishop; + failureMechanismParametersMStab.MStabParameters.Model = model; var damKernelInput = new DamKernelInput(); damKernelInput.Location = location; @@ -105,13 +123,13 @@ kernelWrapper.Execute(damStabilityInput, kernelOutput, out messages); DamMacroStabilityOutput damMacroStabilityOutput = (DamMacroStabilityOutput) kernelOutput; Assert.AreEqual(0, messages.Count); - Assert.AreEqual(1.5570, damMacroStabilityOutput.StabilityOutputItems[0].Zone1Results.SafetyFactor, diff); + Assert.AreEqual(expectedValue, damMacroStabilityOutput.StabilityOutputItems[0].Zone1Results.SafetyFactor, diff); Assert.IsNull(damMacroStabilityOutput.StabilityOutputItems[0].Zone2Results); // Fill the design results List results; kernelWrapper.PostProcess(damKernelInput, damMacroStabilityOutput, "", out results); - Assert.AreEqual(1.5570, results[0].StabilityDesignResults.SafetyFactor, diff); + Assert.AreEqual(expectedValue, results[0].StabilityDesignResults.SafetyFactor, diff); } private XDocument ModifiedXmlDocument(string stiFileName)