Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/ConversionHelper.cs =================================================================== diff -u -r4565 -r4574 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/ConversionHelper.cs (.../ConversionHelper.cs) (revision 4565) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/ConversionHelper.cs (.../ConversionHelper.cs) (revision 4574) @@ -287,14 +287,28 @@ RatioCuPc = soil.RatioCuPc, StrengthIncreaseExponent = soil.StrengthIncreaseExponent, UseSoilClassification = false, // Soil type is not given so make sure it is not used. - BondStressCurve = null // these are not supported in DAM so set to null. + BondStressCurve = null, // these are not supported in DAM so set to null. + SigmaTauTable = new List() }; + if (soil.ShearStrengthModel != null) { macroStabilitySoil.ShearStrengthAbovePhreaticLevelModel = ConvertToMacroStabilityShearStrengthModel(soil.ShearStrengthModel.Value); macroStabilitySoil.ShearStrengthBelowPhreaticLevelModel = ConvertToMacroStabilityShearStrengthModel(soil.ShearStrengthModel.Value); } + if (soil.SigmaTauCurve != null) + { + foreach (SigmaTauPoint point in soil.SigmaTauCurve.Points) + { + macroStabilitySoil.SigmaTauTable.Add(new SigmaTauTablePoint + { + Sigma = point.Sigma, + Tau = point.Tau + }); + } + } + switch (soil.DilatancyType) { case DilatancyType.MinusPhi: @@ -346,9 +360,19 @@ //UsePop = true, //WhitesConstant = 0.00, }; - damSoil.SigmaTauCurve = new SigmaTauCurve(); - // TODO Add damSoil.SigmaTauCurve.Points based on soil.SigmaTauTable (to be implemented) + if (soil.SigmaTauTable != null) + { + damSoil.SigmaTauCurve = new SigmaTauCurve(); + foreach (SigmaTauTablePoint point in soil.SigmaTauTable) + { + damSoil.SigmaTauCurve.Points.Add(new SigmaTauPoint + { + Sigma = point.Sigma, + Tau = point.Tau + }); + } + } if (soil.Dilatancy.AlmostEquals(soil.FrictionAngle, tolerance)) { Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityIoTests.cs =================================================================== diff -u -r4540 -r4574 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityIoTests.cs (.../MacroStabilityIoTests.cs) (revision 4540) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityIoTests.cs (.../MacroStabilityIoTests.cs) (revision 4574) @@ -53,7 +53,7 @@ }; [Test] - public void GivenDamEngineDataModelWhenGoingToAndFromCSharpWrapperForInputTheDataIsEqual() + public void GivenDamEngineDataModelWhenGoingToAndFromCSharpWrapperForInputThenDataIsEqual() { // Given DamEngine data (DamProjectData) DamProjectData expectedDamProjectData = CreateExampleDamProjectData(); Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/Soil.cs =================================================================== diff -u -r4556 -r4574 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/Soil.cs (.../Soil.cs) (revision 4556) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/Soil.cs (.../Soil.cs) (revision 4574) @@ -89,9 +89,9 @@ CuBottom = aSoil.CuBottom; UsePop = aSoil.UsePop; StrengthIncreaseExponent = aSoil.StrengthIncreaseExponent; - if ((ShearStrengthModel == Geotechnics.ShearStrengthModel.SigmaTauCurve) && (aSoil.SigmaTauCurve != null)) + SigmaTauCurve = new SigmaTauCurve(); + if (aSoil.SigmaTauCurve != null) { - SigmaTauCurve = new SigmaTauCurve(); SigmaTauCurve.Assign(aSoil.SigmaTauCurve); } } @@ -269,7 +269,7 @@ /// /// The sigma tau curve (for Shear Strength Model = SigmaTauCurve) /// - public SigmaTauCurve SigmaTauCurve { get; set; } + public SigmaTauCurve SigmaTauCurve { get; set; } = new(); #endregion } \ No newline at end of file