Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SigmaTauCurveTests.cs
===================================================================
diff -u
--- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SigmaTauCurveTests.cs (revision 0)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SigmaTauCurveTests.cs (revision 4556)
@@ -0,0 +1,112 @@
+// Copyright (C) Stichting Deltares 2024. 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 System.Collections.Generic;
+using Deltares.DamEngine.Data.Geotechnics;
+using NUnit.Framework;
+
+namespace Deltares.DamEngine.Data.Tests.Geotechnics;
+
+[TestFixture]
+public class SigmaTauCurveTests
+{
+ [Test]
+ public void GivenSigmaTauCurveWhenSettingNameThenNameIsSetCorrectly()
+ {
+ // Given
+ var curve = new SigmaTauCurve();
+ var expectedName = "Test Curve";
+
+ // When
+ curve.Name = expectedName;
+
+ // Then
+ Assert.AreEqual(expectedName, curve.Name);
+ }
+
+ [Test]
+ public void GivenSigmaTauCurveWhenInitializingPointsThenPointsAreInitializedCorrectly()
+ {
+ // Given
+ var curve = new SigmaTauCurve();
+
+ // When
+ List points = curve.Points;
+
+ // Then
+ Assert.IsNotNull(points);
+ Assert.IsInstanceOf>(points);
+ Assert.AreEqual(0, points.Count);
+ }
+
+ [Test]
+ public void GivenSigmaTauCurveWhenAddingPointThenPointIsAddedCorrectly()
+ {
+ // Given
+ var curve = new SigmaTauCurve();
+ var point = new SigmaTauPoint
+ {
+ Sigma = 1.0,
+ Tau = 2.0
+ };
+
+ // When
+ curve.Points.Add(point);
+
+ // Then
+ Assert.AreEqual(1, curve.Points.Count);
+ Assert.AreEqual(point, curve.Points[0]);
+ }
+
+ [Test]
+ public void GivenTwoSigmaTauCurvesWhenAssigningThenPropertiesAreAssignedCorrectly()
+ {
+ // Given
+ var sourceCurve = new SigmaTauCurve
+ {
+ Name = "Source Curve"
+ };
+ sourceCurve.Points.Add(new SigmaTauPoint
+ {
+ Sigma = 1.0,
+ Tau = 2.0
+ });
+ sourceCurve.Points.Add(new SigmaTauPoint
+ {
+ Sigma = 3.0,
+ Tau = 4.0
+ });
+
+ var targetCurve = new SigmaTauCurve();
+
+ // When
+ targetCurve.Assign(sourceCurve);
+
+ // Then
+ Assert.AreEqual(sourceCurve.Name, targetCurve.Name);
+ Assert.AreEqual(sourceCurve.Points.Count, targetCurve.Points.Count);
+ for (var i = 0; i < sourceCurve.Points.Count; i++)
+ {
+ Assert.AreEqual(sourceCurve.Points[i].Sigma, targetCurve.Points[i].Sigma);
+ Assert.AreEqual(sourceCurve.Points[i].Tau, targetCurve.Points[i].Tau);
+ }
+ }
+}
\ No newline at end of file
Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/Soil.cs
===================================================================
diff -u -r4540 -r4556
--- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/Soil.cs (.../Soil.cs) (revision 4540)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/Soil.cs (.../Soil.cs) (revision 4556)
@@ -89,6 +89,11 @@
CuBottom = aSoil.CuBottom;
UsePop = aSoil.UsePop;
StrengthIncreaseExponent = aSoil.StrengthIncreaseExponent;
+ if ((ShearStrengthModel == Geotechnics.ShearStrengthModel.SigmaTauCurve) && (aSoil.SigmaTauCurve != null))
+ {
+ SigmaTauCurve = new SigmaTauCurve();
+ SigmaTauCurve.Assign(aSoil.SigmaTauCurve);
+ }
}
#region property Name
@@ -261,5 +266,10 @@
///
public double SlopeRestProfile { get; set; } = double.NaN;
+ ///
+ /// The sigma tau curve (for Shear Strength Model = SigmaTauCurve)
+ ///
+ public SigmaTauCurve SigmaTauCurve { get; set; }
+
#endregion
}
\ No newline at end of file
Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SigmaTauCurve.cs
===================================================================
diff -u
--- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SigmaTauCurve.cs (revision 0)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SigmaTauCurve.cs (revision 4556)
@@ -0,0 +1,51 @@
+// Copyright (C) Stichting Deltares 2024. 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 System.Collections.Generic;
+
+namespace Deltares.DamEngine.Data.Geotechnics;
+
+///
+/// The Sigma Tau curve.
+///
+public class SigmaTauCurve
+{
+ ///
+ /// The name.
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// The points of the curve.
+ ///
+ public List Points { get; } = new();
+
+ ///
+ /// Assigns the specified curve.
+ ///
+ ///
+ public void Assign(SigmaTauCurve curve)
+ {
+ Name = curve.Name;
+ Points.Clear();
+ Points.AddRange(curve.Points);
+ }
+}
\ No newline at end of file
Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SigmaTauPoint.cs
===================================================================
diff -u
--- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SigmaTauPoint.cs (revision 0)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SigmaTauPoint.cs (revision 4556)
@@ -0,0 +1,48 @@
+// Copyright (C) Stichting Deltares 2024. 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.
+
+namespace Deltares.DamEngine.Data.Geotechnics;
+
+///
+/// The Sigma Tau point.
+///
+public class SigmaTauPoint
+{
+ ///
+ /// The sigma.
+ ///
+ public double Sigma { get; set; }
+
+ ///
+ /// The tau.
+ ///
+ public double Tau { get; set; }
+
+ ///
+ /// Assigns the specified point.
+ ///
+ ///
+ public void Assign(SigmaTauPoint point)
+ {
+ Sigma = point.Sigma;
+ Tau = point.Tau;
+ }
+}
\ No newline at end of file
Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/ShearStrengthModel.cs
===================================================================
diff -u -r4551 -r4556
--- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/ShearStrengthModel.cs (.../ShearStrengthModel.cs) (revision 4551)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/ShearStrengthModel.cs (.../ShearStrengthModel.cs) (revision 4556)
@@ -34,5 +34,10 @@
///
/// The Su calculated model (with POP)
///
- SuCalculated = 2
+ SuCalculated = 2,
+
+ ///
+ /// The Sigma Tau curve model
+ ///
+ SigmaTauCurve = 3
}
\ No newline at end of file
Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SigmaTauPointTests.cs
===================================================================
diff -u
--- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SigmaTauPointTests.cs (revision 0)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SigmaTauPointTests.cs (revision 4556)
@@ -0,0 +1,76 @@
+// Copyright (C) Stichting Deltares 2024. 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.Geotechnics;
+using NUnit.Framework;
+
+namespace Deltares.DamEngine.Data.Tests.Geotechnics;
+
+[TestFixture]
+public class SigmaTauPointTests
+{
+ [Test]
+ public void GivenSigmaTauPointWhenSettingSigmaThenSigmaIsSetCorrectly()
+ {
+ // Given
+ var point = new SigmaTauPoint();
+ var expectedSigma = 1.0;
+
+ // When
+ point.Sigma = expectedSigma;
+
+ // Then
+ Assert.AreEqual(expectedSigma, point.Sigma);
+ }
+
+ [Test]
+ public void GivenSigmaTauPointWhenSettingTauThenTauIsSetCorrectly()
+ {
+ // Given
+ var point = new SigmaTauPoint();
+ var expectedTau = 2.0;
+
+ // When
+ point.Tau = expectedTau;
+
+ // Then
+ Assert.AreEqual(expectedTau, point.Tau);
+ }
+
+ [Test]
+ public void GivenTwoSigmaTauPointsWhenAssigningThenPropertiesAreAssignedCorrectly()
+ {
+ // Given
+ var sourcePoint = new SigmaTauPoint
+ {
+ Sigma = 1.0,
+ Tau = 2.0
+ };
+ var targetPoint = new SigmaTauPoint();
+
+ // When
+ targetPoint.Assign(sourcePoint);
+
+ // Then
+ Assert.AreEqual(sourcePoint.Sigma, targetPoint.Sigma);
+ Assert.AreEqual(sourcePoint.Tau, targetPoint.Tau);
+ }
+}
\ No newline at end of file
Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilTests.cs
===================================================================
diff -u
--- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilTests.cs (revision 0)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilTests.cs (revision 4556)
@@ -0,0 +1,97 @@
+// Copyright (C) Stichting Deltares 2024. 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.Geotechnics;
+using NUnit.Framework;
+
+namespace Deltares.DamEngine.Data.Tests.Geotechnics;
+
+[TestFixture]
+public class SoilTests
+{
+ [Test]
+ public void GivenTwoSoilsWhenAssigningThenPropertiesAreAssignedCorrectly()
+ {
+ // Given
+ var sourceSoil = new Soil("Source Soil", 10.0, 20.0)
+ {
+ BeddingAngle = 30.0,
+ DiameterD70 = 0.5,
+ PermeabKx = 0.01,
+ WhitesConstant = 1.2,
+ DiameterD90 = 0.7,
+ Cohesion = 5.0,
+ FrictionAngle = 25.0,
+ PoP = 100.0,
+ Ocr = 1.5,
+ RatioCuPc = 0.8,
+ CuTop = 2.0,
+ CuBottom = 3.0,
+ UsePop = true,
+ StrengthIncreaseExponent = 0.3,
+ ShearStrengthModel = ShearStrengthModel.SigmaTauCurve,
+ SigmaTauCurve = new SigmaTauCurve
+ {
+ Name = "Curve"
+ }
+ };
+ sourceSoil.SigmaTauCurve.Points.Add(new SigmaTauPoint
+ {
+ Sigma = 1.0,
+ Tau = 2.0
+ });
+ sourceSoil.SigmaTauCurve.Points.Add(new SigmaTauPoint
+ {
+ Sigma = 3.0,
+ Tau = 4.0
+ });
+
+ var targetSoil = new Soil();
+
+ // When
+ targetSoil.Assign(sourceSoil);
+
+ // Then
+ Assert.AreEqual(sourceSoil.Name, targetSoil.Name);
+ Assert.AreEqual(sourceSoil.BeddingAngle, targetSoil.BeddingAngle);
+ Assert.AreEqual(sourceSoil.DiameterD70, targetSoil.DiameterD70);
+ Assert.AreEqual(sourceSoil.PermeabKx, targetSoil.PermeabKx);
+ Assert.AreEqual(sourceSoil.WhitesConstant, targetSoil.WhitesConstant);
+ Assert.AreEqual(sourceSoil.DiameterD90, targetSoil.DiameterD90);
+ Assert.AreEqual(sourceSoil.Cohesion, targetSoil.Cohesion);
+ Assert.AreEqual(sourceSoil.FrictionAngle, targetSoil.FrictionAngle);
+ Assert.AreEqual(sourceSoil.PoP, targetSoil.PoP);
+ Assert.AreEqual(sourceSoil.Ocr, targetSoil.Ocr);
+ Assert.AreEqual(sourceSoil.RatioCuPc, targetSoil.RatioCuPc);
+ Assert.AreEqual(sourceSoil.CuTop, targetSoil.CuTop);
+ Assert.AreEqual(sourceSoil.CuBottom, targetSoil.CuBottom);
+ Assert.AreEqual(sourceSoil.UsePop, targetSoil.UsePop);
+ Assert.AreEqual(sourceSoil.StrengthIncreaseExponent, targetSoil.StrengthIncreaseExponent);
+ Assert.AreEqual(sourceSoil.ShearStrengthModel, targetSoil.ShearStrengthModel);
+ Assert.AreEqual(sourceSoil.SigmaTauCurve.Name, targetSoil.SigmaTauCurve.Name);
+ Assert.AreEqual(sourceSoil.SigmaTauCurve.Points.Count, targetSoil.SigmaTauCurve.Points.Count);
+ for (int i = 0; i < sourceSoil.SigmaTauCurve.Points.Count; i++)
+ {
+ Assert.AreEqual(sourceSoil.SigmaTauCurve.Points[i].Sigma, targetSoil.SigmaTauCurve.Points[i].Sigma);
+ Assert.AreEqual(sourceSoil.SigmaTauCurve.Points[i].Tau, targetSoil.SigmaTauCurve.Points[i].Tau);
+ }
+ }
+}
\ No newline at end of file
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj
===================================================================
diff -u -r4540 -r4556
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 4540)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 4556)
@@ -29,7 +29,7 @@
- 23.2.1.39
+ 24.1.1.43
23.2.1.6