Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillMacroStabilityWrapperOutputFromEngine.cs =================================================================== diff -u -r3407 -r3409 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillMacroStabilityWrapperOutputFromEngine.cs (.../FillMacroStabilityWrapperOutputFromEngine.cs) (revision 3407) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillMacroStabilityWrapperOutputFromEngine.cs (.../FillMacroStabilityWrapperOutputFromEngine.cs) (revision 3409) @@ -21,6 +21,7 @@ using System.Collections.Generic; using System.Linq; +using Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards; using Deltares.DamEngine.Data.Standard.Logging; using Deltares.MacroStability.CSharpWrapper; using Deltares.MacroStability.CSharpWrapper.Output; @@ -45,27 +46,20 @@ kernelOutput.StabilityOutput.ModelOptionType = ConversionHelper.ConvertToModelOptionsOutput(outputItem.StabilityModelType); if (kernelOutput.StabilityOutput.ModelOptionType == StabilityModelOptionType.Bishop && outputItem.ActiveCenterPoint != null) { - var msc = new SlidingCircleMinimumSafetyCurve - { - Center = new Point2D(outputItem.ActiveCenterPoint.X, outputItem.ActiveCenterPoint.Z), - Radius = outputItem.ActiveCenterPointRadius - }; - kernelOutput.StabilityOutput.MinimumSafetyCurve = msc; + FillBishop(outputItem, kernelOutput); } if (kernelOutput.StabilityOutput.ModelOptionType == StabilityModelOptionType.UpliftVan && outputItem.ActiveCenterPoint != null && outputItem.PassiveCenterPoint != null) { - var msc = new DualSlidingCircleMinimumSafetyCurve - { - ActiveCircleCenter = - new Point2D(outputItem.ActiveCenterPoint.X, outputItem.ActiveCenterPoint.Z), - ActiveCircleRadius = outputItem.ActiveCenterPointRadius, - PassiveCircleCenter = - new Point2D(outputItem.PassiveCenterPoint.X, outputItem.PassiveCenterPoint.Z), - PassiveCircleRadius = outputItem.PassiveCenterPointRadius - }; - kernelOutput.StabilityOutput.MinimumSafetyCurve = msc; + FillUpliftVan(outputItem, kernelOutput); } - // Todo rest of kernel output to be converted later. + + if ((kernelOutput.StabilityOutput.ModelOptionType == StabilityModelOptionType.Bishop || + kernelOutput.StabilityOutput.ModelOptionType == StabilityModelOptionType.UpliftVan) && + outputItem.ResultSlices != null) + { + FillSlices(outputItem, kernelOutput); + } + } else { @@ -86,5 +80,93 @@ } return kernelOutput; } + + private static void FillSlices(MacroStabilityOutputItem outputItem, MacroStability.CSharpWrapper.Output.MacroStabilityOutput kernelOutput) + { + foreach (var resultSlice in outputItem.ResultSlices) + { + var slice = new Slice(); + slice.TopLeftPoint = new Point2D(resultSlice.TopLeftPoint.X, resultSlice.TopLeftPoint.Z); + slice.TopRightPoint = new Point2D(resultSlice.TopRightPoint.X, resultSlice.TopRightPoint.Z); + slice.BottomLeftPoint = new Point2D(resultSlice.BottomLeftPoint.X, resultSlice.BottomLeftPoint.Z); + slice.BottomRightPoint = new Point2D(resultSlice.BottomRightPoint.X, resultSlice.BottomRightPoint.Z); + slice.Name = resultSlice.Name; + slice.Width = resultSlice.Width; + slice.ArcLength = resultSlice.ArcLength; + slice.TopAngle = resultSlice.TopAngle; + slice.BottomAngle = resultSlice.BottomAngle; + slice.CohesionInput = resultSlice.CohesionInput; + slice.Cohesion = resultSlice.Cohesion; + slice.CohesionCalculated = resultSlice.CohesionCalculated; + slice.FrictionAngleInput = resultSlice.FrictionAngleInput; + slice.FrictionAngle = resultSlice.FrictionAngle; + slice.YieldStress = resultSlice.YieldStress; + slice.OCR = resultSlice.OCR; + slice.POP = resultSlice.POP; + slice.DegreeOfConsolidationPorePressure = resultSlice.DegreeOfConsolidationPorePressure; + slice.PorePressureDueToDegreeOfConsolidationLoad = resultSlice.PorePressureDueToDegreeOfConsolidationLoad; + slice.DilatancyInput = resultSlice.DilatancyInput; + slice.Dilatancy = resultSlice.Dilatancy; + slice.ExternalLoad = resultSlice.ExternalLoad; + slice.HydrostaticPorePressure = resultSlice.HydrostaticPorePressure; + slice.LeftForce = resultSlice.LeftForce; + slice.LeftForceAngle = resultSlice.LeftForceAngle; + slice.LeftForceY = resultSlice.LeftForceY; + slice.RightForce = resultSlice.RightForce; + slice.RightForceAngle = resultSlice.RightForceAngle; + slice.RightForceY = resultSlice.RightForceY; + slice.LoadStress = resultSlice.LoadStress; + slice.NormalStress = resultSlice.NormalStress; + slice.PorePressure = resultSlice.PorePressure; + slice.HorizontalPorePressure = resultSlice.HorizontalPorePressure; + slice.VerticalPorePressure = resultSlice.VerticalPorePressure; + slice.PiezometricPorePressure = resultSlice.PiezometricPorePressure; + slice.EffectiveStress = resultSlice.EffectiveStress; + slice.ExcessPorePressure = resultSlice.ExcessPorePressure; + slice.ShearStress = resultSlice.ShearStress; + slice.SoilStress = resultSlice.SoilStress; + slice.TotalPorePressure = resultSlice.TotalPorePressure; + slice.TotalStress = resultSlice.TotalStress; + slice.Weight = resultSlice.Weight; + slice.Su = resultSlice.Su; + slice.ShearStrengthModelType = + ConversionHelper.ConvertToMacroStabilityShearStrengthModel(resultSlice.ShearStrengthModel); + slice.HorizontalSoilQuakeStress = resultSlice.HorizontalSoilQuakeStress; + slice.StrengthIncreaseExponent = resultSlice.StrengthIncreaseExponent; + slice.UpliftFactor = resultSlice.UpliftFactor; + slice.VerticalSoilQuakeStress = resultSlice.VerticalSoilQuakeStress; + slice.WaterQuakeStress = resultSlice.WaterQuakeStress; + slice.UpliftReductionFactor = resultSlice.UpliftReductionFactor; + slice.RatioCuPc = resultSlice.RatioCuPc; + slice.ResultantForce = resultSlice.ResultantForce; + slice.ResultantMoment = resultSlice.ResultantMoment; + slice.ResultantAngle = resultSlice.ResultantAngle; + kernelOutput.StabilityOutput.MinimumSafetyCurve.Slices.ToList().Add(slice); + } + } + + private static void FillUpliftVan(MacroStabilityOutputItem outputItem, MacroStability.CSharpWrapper.Output.MacroStabilityOutput kernelOutput) + { + var msc = new DualSlidingCircleMinimumSafetyCurve + { + ActiveCircleCenter = + new Point2D(outputItem.ActiveCenterPoint.X, outputItem.ActiveCenterPoint.Z), + ActiveCircleRadius = outputItem.ActiveCenterPointRadius, + PassiveCircleCenter = + new Point2D(outputItem.PassiveCenterPoint.X, outputItem.PassiveCenterPoint.Z), + PassiveCircleRadius = outputItem.PassiveCenterPointRadius + }; + kernelOutput.StabilityOutput.MinimumSafetyCurve = msc; + } + + private static void FillBishop(MacroStabilityOutputItem outputItem, MacroStability.CSharpWrapper.Output.MacroStabilityOutput kernelOutput) + { + var msc = new SlidingCircleMinimumSafetyCurve + { + Center = new Point2D(outputItem.ActiveCenterPoint.X, outputItem.ActiveCenterPoint.Z), + Radius = outputItem.ActiveCenterPointRadius + }; + kernelOutput.StabilityOutput.MinimumSafetyCurve = msc; + } } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillEngineFromMacroStabilityWrapperOutput.cs =================================================================== diff -u -r3407 -r3409 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillEngineFromMacroStabilityWrapperOutput.cs (.../FillEngineFromMacroStabilityWrapperOutput.cs) (revision 3407) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillEngineFromMacroStabilityWrapperOutput.cs (.../FillEngineFromMacroStabilityWrapperOutput.cs) (revision 3409) @@ -23,6 +23,8 @@ using System.Linq; using Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards; using Deltares.DamEngine.Data.General; +using Deltares.DamEngine.Data.General.Results; +using Deltares.DamEngine.Data.Geometry; using Deltares.DamEngine.Data.Standard.Logging; using Deltares.MacroStability.CSharpWrapper; using Deltares.MacroStability.CSharpWrapper.Output; @@ -63,26 +65,22 @@ if (outputItem.StabilityModelType == MStabModelType.Bishop) { var msc = (SlidingCircleMinimumSafetyCurve)kernelOutput.StabilityOutput.MinimumSafetyCurve; - if (msc != null && msc.Center != null) - { - outputItem.ActiveCenterPoint = new Data.Geometry.Point2D(msc.Center.X, msc.Center.Z); - outputItem.ActiveCenterPointRadius = msc.Radius; - } + FillBishopSlipCircle(msc, outputItem); } if (outputItem.StabilityModelType == MStabModelType.UpliftVan) { var msc = (DualSlidingCircleMinimumSafetyCurve)kernelOutput.StabilityOutput.MinimumSafetyCurve; - if (msc != null && msc.ActiveCircleCenter != null && msc.PassiveCircleCenter != null) - { - outputItem.ActiveCenterPoint = - new Data.Geometry.Point2D(msc.ActiveCircleCenter.X, msc.ActiveCircleCenter.Z); - outputItem.ActiveCenterPointRadius = msc.ActiveCircleRadius; - outputItem.PassiveCenterPoint = - new Data.Geometry.Point2D(msc.PassiveCircleCenter.X, msc.PassiveCircleCenter.Z); - outputItem.PassiveCenterPointRadius = msc.PassiveCircleRadius; - } + FillUpliftVanDualSlipCircle(msc, outputItem); } + + if (outputItem.StabilityModelType == MStabModelType.Bishop || + outputItem.StabilityModelType == MStabModelType.UpliftVan) + { + var msc = kernelOutput.StabilityOutput.MinimumSafetyCurve; + FillSlices(msc, outputItem); + } + macroStabilityOutput.StabilityOutputItems.Add(outputItem); if (kernelOutput.StabilityOutput.Messages != null && kernelOutput.StabilityOutput.Messages.Any()) @@ -101,7 +99,97 @@ } } } - // output.UpliftSituation = ToDo later } + + private static void FillUpliftVanDualSlipCircle(DualSlidingCircleMinimumSafetyCurve msc, + MacroStabilityOutputItem outputItem) + { + if (msc != null && msc.ActiveCircleCenter != null && msc.PassiveCircleCenter != null) + { + outputItem.ActiveCenterPoint = + new Data.Geometry.Point2D(msc.ActiveCircleCenter.X, msc.ActiveCircleCenter.Z); + outputItem.ActiveCenterPointRadius = msc.ActiveCircleRadius; + outputItem.PassiveCenterPoint = + new Data.Geometry.Point2D(msc.PassiveCircleCenter.X, msc.PassiveCircleCenter.Z); + outputItem.PassiveCenterPointRadius = msc.PassiveCircleRadius; + } + } + + private static void FillBishopSlipCircle(SlidingCircleMinimumSafetyCurve msc, MacroStabilityOutputItem outputItem) + { + if (msc != null && msc.Center != null) + { + outputItem.ActiveCenterPoint = new Data.Geometry.Point2D(msc.Center.X, msc.Center.Z); + outputItem.ActiveCenterPointRadius = msc.Radius; + } + } + + private static void FillSlices(MinimumSafetyCurveBase msc, MacroStabilityOutputItem outputItem) + { + if (msc != null && msc.Slices != null) + { + outputItem.ResultSlices = new List(); + foreach (var slice in msc.Slices) + { + var resultSlice = new StabilityResultSlice(); + resultSlice.TopLeftPoint = new Data.Geometry.Point2D(slice.TopLeftPoint.X, slice.TopLeftPoint.Z); + resultSlice.TopRightPoint = new Data.Geometry.Point2D(slice.TopRightPoint.X, slice.TopRightPoint.Z); + resultSlice.BottomLeftPoint = new Data.Geometry.Point2D(slice.BottomLeftPoint.X, slice.BottomLeftPoint.Z); + resultSlice.BottomRightPoint = new Data.Geometry.Point2D(slice.BottomRightPoint.X, slice.BottomRightPoint.Z); + resultSlice.Name = slice.Name; + resultSlice.Width = slice.Width; + resultSlice.ArcLength = slice.ArcLength; + resultSlice.TopAngle = slice.TopAngle; + resultSlice.BottomAngle = slice.BottomAngle; + resultSlice.CohesionInput = slice.CohesionInput; + resultSlice.Cohesion = slice.Cohesion; + resultSlice.CohesionCalculated = slice.CohesionCalculated; + resultSlice.FrictionAngleInput = slice.FrictionAngleInput; + resultSlice.FrictionAngle = slice.FrictionAngle; + resultSlice.YieldStress = slice.YieldStress; + resultSlice.OCR = slice.OCR; + resultSlice.POP = slice.POP; + resultSlice.DegreeOfConsolidationPorePressure = slice.DegreeOfConsolidationPorePressure; + resultSlice.PorePressureDueToDegreeOfConsolidationLoad = slice.PorePressureDueToDegreeOfConsolidationLoad; + resultSlice.DilatancyInput = slice.DilatancyInput; + resultSlice.Dilatancy = slice.Dilatancy; + resultSlice.ExternalLoad = slice.ExternalLoad; + resultSlice.HydrostaticPorePressure = slice.HydrostaticPorePressure; + resultSlice.LeftForce = slice.LeftForce; + resultSlice.LeftForceAngle = slice.LeftForceAngle; + resultSlice.LeftForceY = slice.LeftForceY; + resultSlice.RightForce = slice.RightForce; + resultSlice.RightForceAngle = slice.RightForceAngle; + resultSlice.RightForceY = slice.RightForceY; + resultSlice.LoadStress = slice.LoadStress; + resultSlice.NormalStress = slice.NormalStress; + resultSlice.PorePressure = slice.PorePressure; + resultSlice.HorizontalPorePressure = slice.HorizontalPorePressure; + resultSlice.VerticalPorePressure = slice.VerticalPorePressure; + resultSlice.PiezometricPorePressure = slice.PiezometricPorePressure; + resultSlice.EffectiveStress = slice.EffectiveStress; + resultSlice.ExcessPorePressure = slice.ExcessPorePressure; + resultSlice.ShearStress = slice.ShearStress; + resultSlice.SoilStress = slice.SoilStress; + resultSlice.TotalPorePressure = slice.TotalPorePressure; + resultSlice.TotalStress = slice.TotalStress; + resultSlice.Weight = slice.Weight; + resultSlice.Su = slice.Su; + resultSlice.ShearStrengthModel = ConversionHelper.ConvertToDamShearStrengthModel(slice.ShearStrengthModelType); + resultSlice.HorizontalSoilQuakeStress = slice.HorizontalSoilQuakeStress; + resultSlice.StrengthIncreaseExponent = slice.StrengthIncreaseExponent; + resultSlice.UpliftFactor = slice.UpliftFactor; + resultSlice.VerticalSoilQuakeStress = slice.VerticalSoilQuakeStress; + resultSlice.WaterQuakeStress = slice.WaterQuakeStress; + resultSlice.UpliftReductionFactor = slice.UpliftReductionFactor; + resultSlice.RatioCuPc = slice.RatioCuPc; + resultSlice.ResultantForce = slice.ResultantForce; + resultSlice.ResultantMoment = slice.ResultantMoment; + resultSlice.ResultantAngle = slice.ResultantAngle; + + outputItem.ResultSlices.Add(resultSlice); + } + } + } } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityOutputItem.cs =================================================================== diff -u -r3407 -r3409 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityOutputItem.cs (.../MacroStabilityOutputItem.cs) (revision 3407) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityOutputItem.cs (.../MacroStabilityOutputItem.cs) (revision 3409) @@ -19,7 +19,9 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System.Collections.Generic; using Deltares.DamEngine.Data.General; +using Deltares.DamEngine.Data.General.Results; using Deltares.DamEngine.Data.Geometry; using Deltares.DamEngine.Data.Standard.Calculation; @@ -99,6 +101,12 @@ /// public double PassiveCenterPointRadius { get; set; } - + /// + /// Gets or sets the result slices. + /// + /// + /// The result slices. + /// + public List ResultSlices { get; set; } } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r3407 -r3409 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 3407) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 3409) @@ -183,6 +183,7 @@ // For now a simple check to see if any data has been past at all. var inputAsXml = stabilityCalculator.KernelInputXml; File.WriteAllText("TestfileFromPrepare.xml", inputAsXml); + //Todo #Bka : this would be the place to write the stix file based on the input. Separate method as some additional as yet unavailable data needs to be set first. if (inputAsXml.Length > 10) { return PrepareResult.Successful; @@ -324,6 +325,7 @@ macroStabilityOutputItem.ActiveCenterPoint; designResult.StabilityDesignResults.ActiveCenterPointRadius = macroStabilityOutputItem.ActiveCenterPointRadius; + designResult.StabilityDesignResults.ResultSlices = macroStabilityOutputItem.ResultSlices; } if (macroStabilityOutputItem.StabilityModelType == MStabModelType.UpliftVan) { Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj =================================================================== diff -u -r3238 -r3409 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 3238) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 3409) @@ -69,6 +69,7 @@ + Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs =================================================================== diff -u -r3407 -r3409 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 3407) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 3409) @@ -125,17 +125,77 @@ }; List results; macroStabilityOutput.CalculationResult = CalculationResult.Succeeded; - var macroStabilityOutputItem = new MacroStabilityOutputItem(); - macroStabilityOutputItem.StabilityModelType = MStabModelType.UpliftVan; - macroStabilityOutputItem.CalculationResult = CalculationResult.Succeeded; + var macroStabilityOutputItem = new MacroStabilityOutputItem + { + StabilityModelType = MStabModelType.UpliftVan, CalculationResult = CalculationResult.Succeeded + }; macroStabilityOutput.UpliftSituation = new UpliftSituation { IsUplift = true }; - macroStabilityOutputItem.SafetyFactor = 2.34; - macroStabilityOutput.StabilityOutputItems = new List(); - macroStabilityOutput.StabilityOutputItems.Add(macroStabilityOutputItem); + macroStabilityOutputItem.SafetyFactor = 2.34; + macroStabilityOutput.StabilityOutputItems = new List {macroStabilityOutputItem}; macroStabilityOutput.StabilityOutputItems[0].ActiveCenterPoint = new Point2D(10,10); macroStabilityOutput.StabilityOutputItems[0].ActiveCenterPointRadius = 8; macroStabilityOutput.StabilityOutputItems[0].PassiveCenterPoint = new Point2D(22,11); macroStabilityOutput.StabilityOutputItems[0].PassiveCenterPointRadius = 7; + var resultSlice = new StabilityResultSlice + { + TopLeftPoint = new Point2D(9, 3), + TopRightPoint = new Point2D(9.2, 3.01), + BottomLeftPoint = new Point2D(9, -3), + BottomRightPoint = new Point2D(9.2, -3.1), + Name = "slice1", + Width = 0.2, + ArcLength = 0.22, + TopAngle = 0, + BottomAngle = 12.2, + CohesionInput = 14, + Cohesion = 14.5, + CohesionCalculated = 15.5, + FrictionAngleInput = 30, + FrictionAngle = 30.5, + YieldStress = 22, + OCR = 23, + POP = 24, + DegreeOfConsolidationPorePressure = 25, + PorePressureDueToDegreeOfConsolidationLoad = 26, + DilatancyInput = 27, + Dilatancy = 28, + ExternalLoad = 29, + HydrostaticPorePressure = 30, + LeftForce = 31, + LeftForceAngle = 32, + LeftForceY = 33, + RightForce = 34, + RightForceAngle = 35, + RightForceY = 36, + LoadStress = 37, + NormalStress = 38, + PorePressure = 39, + HorizontalPorePressure = 40, + VerticalPorePressure = 41, + PiezometricPorePressure = 42, + EffectiveStress = 43, + ExcessPorePressure = 44, + ShearStress = 45, + SoilStress = 46, + TotalPorePressure = 47, + TotalStress = 48, + Weight = 49, + Su = 50, + ShearStrengthModel = ShearStrengthModel.CPhi, + HorizontalSoilQuakeStress = 51, + StrengthIncreaseExponent = 52, + UpliftFactor = 53, + VerticalSoilQuakeStress = 54, + WaterQuakeStress = 55, + UpliftReductionFactor = 56, + RatioCuPc = 57, + ResultantForce = 58, + ResultantMoment = 59, + ResultantAngle = 60 + }; + macroStabilityOutput.StabilityOutputItems[0].ResultSlices = new List(); + macroStabilityOutput.StabilityOutputItems[0].ResultSlices.Add(resultSlice); + kernelWrapper.PostProcess(kernelInput, macroStabilityOutput, designScenario, "", out results); Assert.IsTrue(results.Count > 0); foreach (var result in results) @@ -153,6 +213,67 @@ Assert.AreEqual(22, result.StabilityDesignResults.PassiveCenterPoint.X); Assert.AreEqual(11, result.StabilityDesignResults.PassiveCenterPoint.Z); Assert.AreEqual(7, result.StabilityDesignResults.PassiveCenterPointRadius); + + Assert.AreEqual(9, result.StabilityDesignResults.ResultSlices[0].TopLeftPoint.X); + Assert.AreEqual(3, result.StabilityDesignResults.ResultSlices[0].TopLeftPoint.Z); + Assert.AreEqual(9.2, result.StabilityDesignResults.ResultSlices[0].TopRightPoint.X); + Assert.AreEqual(3.01, result.StabilityDesignResults.ResultSlices[0].TopRightPoint.Z); + Assert.AreEqual(9, result.StabilityDesignResults.ResultSlices[0].BottomLeftPoint.X); + Assert.AreEqual(-3, result.StabilityDesignResults.ResultSlices[0].BottomLeftPoint.Z); + Assert.AreEqual(9.2, result.StabilityDesignResults.ResultSlices[0].BottomRightPoint.X); + Assert.AreEqual(-3.1, result.StabilityDesignResults.ResultSlices[0].BottomRightPoint.Z); + + Assert.AreEqual("slice1", result.StabilityDesignResults.ResultSlices[0].Name); + Assert.AreEqual(0.2, result.StabilityDesignResults.ResultSlices[0].Width); + Assert.AreEqual(0.22, result.StabilityDesignResults.ResultSlices[0].ArcLength); + Assert.AreEqual(0, result.StabilityDesignResults.ResultSlices[0].TopAngle); + Assert.AreEqual(12.2, result.StabilityDesignResults.ResultSlices[0].BottomAngle); + Assert.AreEqual(14, result.StabilityDesignResults.ResultSlices[0].CohesionInput); + Assert.AreEqual(14.5, result.StabilityDesignResults.ResultSlices[0].Cohesion); + Assert.AreEqual(15.5, result.StabilityDesignResults.ResultSlices[0].CohesionCalculated); + Assert.AreEqual(30, result.StabilityDesignResults.ResultSlices[0].FrictionAngleInput); + Assert.AreEqual(30.5, result.StabilityDesignResults.ResultSlices[0].FrictionAngle); + Assert.AreEqual(22, result.StabilityDesignResults.ResultSlices[0].YieldStress); + Assert.AreEqual(23, result.StabilityDesignResults.ResultSlices[0].OCR); + Assert.AreEqual(24, result.StabilityDesignResults.ResultSlices[0].POP); + Assert.AreEqual(25, result.StabilityDesignResults.ResultSlices[0].DegreeOfConsolidationPorePressure); + Assert.AreEqual(26, result.StabilityDesignResults.ResultSlices[0].PorePressureDueToDegreeOfConsolidationLoad); + Assert.AreEqual(27, result.StabilityDesignResults.ResultSlices[0].DilatancyInput); + Assert.AreEqual(28, result.StabilityDesignResults.ResultSlices[0].Dilatancy); + Assert.AreEqual(29, result.StabilityDesignResults.ResultSlices[0].ExternalLoad); + Assert.AreEqual(30, result.StabilityDesignResults.ResultSlices[0].HydrostaticPorePressure); + Assert.AreEqual(31, result.StabilityDesignResults.ResultSlices[0].LeftForce); + Assert.AreEqual(32, result.StabilityDesignResults.ResultSlices[0].LeftForceAngle); + Assert.AreEqual(33, result.StabilityDesignResults.ResultSlices[0].LeftForceY); + Assert.AreEqual(34, result.StabilityDesignResults.ResultSlices[0].RightForce); + Assert.AreEqual(35, result.StabilityDesignResults.ResultSlices[0].RightForceAngle); + Assert.AreEqual(36, result.StabilityDesignResults.ResultSlices[0].RightForceY); + Assert.AreEqual(37, result.StabilityDesignResults.ResultSlices[0].LoadStress); + Assert.AreEqual(38, result.StabilityDesignResults.ResultSlices[0].NormalStress); + Assert.AreEqual(39, result.StabilityDesignResults.ResultSlices[0].PorePressure); + Assert.AreEqual(40, result.StabilityDesignResults.ResultSlices[0].HorizontalPorePressure); + Assert.AreEqual(41, result.StabilityDesignResults.ResultSlices[0].VerticalPorePressure); + Assert.AreEqual(42, result.StabilityDesignResults.ResultSlices[0].PiezometricPorePressure); + Assert.AreEqual(43, result.StabilityDesignResults.ResultSlices[0].EffectiveStress); + Assert.AreEqual(44, result.StabilityDesignResults.ResultSlices[0].ExcessPorePressure); + Assert.AreEqual(45, result.StabilityDesignResults.ResultSlices[0].ShearStress); + Assert.AreEqual(46, result.StabilityDesignResults.ResultSlices[0].SoilStress); + Assert.AreEqual(47, result.StabilityDesignResults.ResultSlices[0].TotalPorePressure); + Assert.AreEqual(48, result.StabilityDesignResults.ResultSlices[0].TotalStress); + Assert.AreEqual(49, result.StabilityDesignResults.ResultSlices[0].Weight); + Assert.AreEqual(50, result.StabilityDesignResults.ResultSlices[0].Su); + Assert.AreEqual(51, result.StabilityDesignResults.ResultSlices[0].HorizontalSoilQuakeStress); + Assert.AreEqual(52, result.StabilityDesignResults.ResultSlices[0].StrengthIncreaseExponent); + Assert.AreEqual(53, result.StabilityDesignResults.ResultSlices[0].UpliftFactor); + Assert.AreEqual(54, result.StabilityDesignResults.ResultSlices[0].VerticalSoilQuakeStress); + Assert.AreEqual(55, result.StabilityDesignResults.ResultSlices[0].WaterQuakeStress); + Assert.AreEqual(56, result.StabilityDesignResults.ResultSlices[0].UpliftReductionFactor); + Assert.AreEqual(57, result.StabilityDesignResults.ResultSlices[0].RatioCuPc); + Assert.AreEqual(58, result.StabilityDesignResults.ResultSlices[0].ResultantForce); + Assert.AreEqual(59, result.StabilityDesignResults.ResultSlices[0].ResultantMoment); + Assert.AreEqual(60, result.StabilityDesignResults.ResultSlices[0].ResultantAngle); + + Assert.AreEqual(ShearStrengthModel.CPhi, result.StabilityDesignResults.ResultSlices[0].ShearStrengthModel); } } Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Results/StabilityDesignResults.cs =================================================================== diff -u -r3405 -r3409 --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Results/StabilityDesignResults.cs (.../StabilityDesignResults.cs) (revision 3405) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Results/StabilityDesignResults.cs (.../StabilityDesignResults.cs) (revision 3409) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System.Collections.Generic; using Deltares.DamEngine.Data.Geometry; using Deltares.DamEngine.Data.Geotechnics; @@ -290,5 +291,13 @@ /// public double PassiveCenterPointRadius { get; set; } + /// + /// Gets or sets the result slices. + /// + /// + /// The result slices. + /// + public List ResultSlices { get; set; } + } } Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Results/StabilityResultSlice.cs =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Results/StabilityResultSlice.cs (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Results/StabilityResultSlice.cs (revision 3409) @@ -0,0 +1,304 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Deltares.DamEngine.Data.Geometry; +using Deltares.DamEngine.Data.Geotechnics; + +namespace Deltares.DamEngine.Data.General.Results +{ + /// + /// Class to hold all result values per slice (stability calculations) + /// + public class StabilityResultSlice + { + + /// + /// The top left point + /// + public Point2D TopLeftPoint; + + /// + /// The top right point + /// + public Point2D TopRightPoint; + + /// + /// The bottom left point + /// + public Point2D BottomLeftPoint; + + /// + /// The bottom right point + /// + public Point2D BottomRightPoint; + + /// + /// The name + /// + public string Name; + + /// + /// The width + /// + public double Width; + + /// + /// The arc length + /// + public double ArcLength; + + /// + /// The top angle + /// + public double TopAngle; + + /// + /// The bottom angle + /// + public double BottomAngle; + + /// + /// The cohesion input + /// + public double CohesionInput; + + /// + /// The cohesion + /// + public double Cohesion; + + /// + /// The cohesion calculated + /// + public double CohesionCalculated; + + /// + /// The friction angle input + /// + public double FrictionAngleInput; + + /// + /// The friction angle + /// + public double FrictionAngle; + + /// + /// The yield stress + /// + public double YieldStress; + + /// + /// The ocr + /// + public double OCR; + + /// + /// The pop + /// + public double POP; + + /// + /// The degree of consolidation pore pressure + /// + public double DegreeOfConsolidationPorePressure; + + /// + /// The pore pressure due to degree of consolidation load + /// + public double PorePressureDueToDegreeOfConsolidationLoad; + + /// + /// The dilatancy input + /// + public double DilatancyInput; + + /// + /// The dilatancy + /// + public double Dilatancy; + + /// + /// The external load + /// + public double ExternalLoad; + + /// + /// The hydrostatic pore pressure + /// + public double HydrostaticPorePressure; + + /// + /// The left force + /// + public double LeftForce; + + /// + /// The left force angle + /// + public double LeftForceAngle; + + /// + /// The left force y + /// + public double LeftForceY; + + /// + /// The right force + /// + public double RightForce; + + /// + /// The right force angle + /// + public double RightForceAngle; + + /// + /// The right force y + /// + public double RightForceY; + + /// + /// The load stress + /// + public double LoadStress; + + /// + /// The normal stress + /// + public double NormalStress; + + /// + /// The pore pressure + /// + public double PorePressure; + + /// + /// The horizontal pore pressure + /// + public double HorizontalPorePressure; + + /// + /// The vertical pore pressure + /// + public double VerticalPorePressure; + + /// + /// The piezometric pore pressure + /// + public double PiezometricPorePressure; + + /// + /// The effective stress + /// + public double EffectiveStress; + + /// + /// The excess pore pressure + /// + public double ExcessPorePressure; + + /// + /// The shear stress + /// + public double ShearStress; + + /// + /// The soil stress + /// + public double SoilStress; + + /// + /// The total pore pressure + /// + public double TotalPorePressure; + + /// + /// The total stress + /// + public double TotalStress; + + /// + /// The weight + /// + public double Weight; + + /// + /// The su + /// + public double Su; + + /// + /// The shear strength model + /// + public ShearStrengthModel ShearStrengthModel; + + /// + /// The horizontal soil quake stress + /// + public double HorizontalSoilQuakeStress; + + /// + /// The strength increase exponent + /// + public double StrengthIncreaseExponent; + + /// + /// The uplift factor + /// + public double UpliftFactor; + + /// + /// The vertical soil quake stress + /// + public double VerticalSoilQuakeStress; + + /// + /// The water quake stress + /// + public double WaterQuakeStress; + + /// + /// The uplift reduction factor + /// + public double UpliftReductionFactor; + + /// + /// The ratio cu pc + /// + public double RatioCuPc; + + /// + /// The resultant force + /// + public double ResultantForce; + + /// + /// The resultant moment + /// + public double ResultantMoment; + + /// + /// The resultant angle + /// + public double ResultantAngle; + + } +}