Index: DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs =================================================================== diff -u -r3293 -r3342 --- DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 3293) +++ DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 3342) @@ -158,6 +158,12 @@ CalculationMessages = calculationMessages }); } + else + { + damProjectData.CalculationMessages.Add(new LogMessage(LogMessageType.Warning, null, + String.Format("Location '{0}' has no soilprofiles defined for the current failure mechanisme {1}", location.Name, + soilProbabilityFailureMechanismSystemType.ToString()))); + } } else { Index: DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.IntegrationTests/TestFiles/WesterdijkPiping.xml =================================================================== diff -u -r3332 -r3342 --- DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.IntegrationTests/TestFiles/WesterdijkPiping.xml (.../WesterdijkPiping.xml) (revision 3332) +++ DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.IntegrationTests/TestFiles/WesterdijkPiping.xml (.../WesterdijkPiping.xml) (revision 3342) @@ -5,87 +5,87 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -412,10 +412,10 @@ - - + + - + Index: DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj =================================================================== diff -u -r3249 -r3342 --- DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 3249) +++ DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 3342) @@ -285,6 +285,9 @@ DGSMStabDAM.dll PreserveNewest + + PreserveNewest + Index: DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/DGeoStability.exe =================================================================== diff -u Binary files differ Index: DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs =================================================================== diff -u -r3334 -r3342 --- DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 3334) +++ DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 3342) @@ -94,10 +94,12 @@ SurfaceLine2 surfaceLine = damKernelInput.Location.SurfaceLine; Location location = damKernelInput.Location; UpliftSituation upliftSituation = new UpliftSituation(); + UpliftLocationDeterminator upliftLocationDeterminator = new UpliftLocationDeterminator { PlLines = plLines, SoilProfile = soilProfile1D, + PathForStiFile = damKernelInput.Location.StabilityOptions.SoilGeometries2DPath, SoilGeometry2DName = damKernelInput.SubSoilScenario.StiFileName, SurfaceLine = surfaceLine, DikeEmbankmentMaterial = location.GetDikeEmbankmentSoil(), @@ -118,6 +120,10 @@ { xExit = upliftLocationAndResult.X; surfaceLevel = surfaceLine.Geometry.GetZatX(upliftLocationAndResult.X); + if (soilProfile1D == null) + { + soilProfile1D = upliftLocationDeterminator.SoilProfile; + } SoilLayer1D heaveLayer = soilProfile1D.GetLayerWithName(upliftLocationAndResult.LayerWhereUpliftOccuresId); d70 = Physics.FactorMeterToMicroMeter * heaveLayer.Soil.DiameterD70; var topLevelAquifer = soilProfile1D.GetLayerWithName(upliftLocationAndResult.LayerWhereUpliftOccuresId).TopLevel; Index: DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj =================================================================== diff -u -r3332 -r3342 --- DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 3332) +++ DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 3342) @@ -354,36 +354,36 @@ PreserveNewest - + PreserveNewest - - + + PreserveNewest - - + + PreserveNewest - - + + PreserveNewest - - + + PreserveNewest - - + + PreserveNewest - - + + PreserveNewest - - + + PreserveNewest - - + + PreserveNewest - - + + PreserveNewest - + PreserveNewest Index: DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalWesterDijkPipingTests.cs =================================================================== diff -u -r3334 -r3342 --- DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalWesterDijkPipingTests.cs (.../OperationalWesterDijkPipingTests.cs) (revision 3334) +++ DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalWesterDijkPipingTests.cs (.../OperationalWesterDijkPipingTests.cs) (revision 3342) @@ -20,13 +20,8 @@ // All rights reserved. using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; -using Deltares.DamEngine.Data.Design; -using Deltares.DamEngine.Data.Geotechnics; using Deltares.DamEngine.Interface; using Deltares.DamEngine.Io; using Deltares.DamEngine.TestHelpers; @@ -35,13 +30,12 @@ namespace Deltares.DamEngine.IntegrationTests.IntegrationTests { [TestFixture] - [Category("Work_In_Progress")] class OperationalWesterDijkPipingTests { - private const double tolerance = 0.0005; + private const double Tolerance = 0.0005; [Test] - public void Run_UsingTestFiles_HasExpectedResultsInOutputFile() + public void Run_UsingTestFiles_HasExpectedResultsInOutputFileForDamPipingBligh() { const string calcDir = "TestOperationalWesterdijk"; const string workingDir = @"TestFiles\"; @@ -72,11 +66,16 @@ Assert.IsNotNull(outputString); var output = DamXmlSerialization.LoadOutputFromXmlString(outputString); - // These are now just the values that were produced by Dam itself. These should be checked by hand. - Assert.AreEqual(90, output.Results.OperationalOutputTimeSeries[0].Entries.TimeSerieEntry[0].Value, tolerance); - Assert.AreEqual(Double.NaN, output.Results.OperationalOutputTimeSeries[1].Entries.TimeSerieEntry[0].Value, tolerance); - Assert.AreEqual(90, output.Results.OperationalOutputTimeSeries[2].Entries.TimeSerieEntry[0].Value, tolerance); - Assert.AreEqual(90, output.Results.OperationalOutputTimeSeries[9].Entries.TimeSerieEntry[0].Value, tolerance); + // These are now just the values that were produced by Dam itself. But these are checked by hand as well! So they are correct. + Assert.AreEqual(90, output.Results.OperationalOutputTimeSeries[0].Entries.TimeSerieEntry[0].Value, Tolerance); + // Second location has no soilprofiles for current mechanism, so no result (NaN). See the warning in the messages. + Assert.AreEqual(Double.NaN, output.Results.OperationalOutputTimeSeries[1].Entries.TimeSerieEntry[0].Value, Tolerance); + Assert.AreEqual(3.294, output.Results.OperationalOutputTimeSeries[2].Entries.TimeSerieEntry[0].Value, Tolerance); + Assert.AreEqual(2.4925, output.Results.OperationalOutputTimeSeries[9].Entries.TimeSerieEntry[0].Value, Tolerance); + Assert.AreEqual(2, output.Results.CalculationMessages.Length); + Assert.AreEqual( + "Location 'Dijk_20_DWP_16+102_gedraineerd_zonderBB' has no soilprofiles defined for the current failure mechanisme Piping", + output.Results.CalculationMessages[1].Message1); } } Index: DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/Uplift/UpliftLocationDeterminator.cs =================================================================== diff -u -r3249 -r3342 --- DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/Uplift/UpliftLocationDeterminator.cs (.../UpliftLocationDeterminator.cs) (revision 3249) +++ DamEngine/branches/DamEngine 19.2/src/Deltares.DamEngine.Calculators/Uplift/UpliftLocationDeterminator.cs (.../UpliftLocationDeterminator.cs) (revision 3342) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using Deltares.DamEngine.Calculators.General; using Deltares.DamEngine.Data.General; @@ -41,6 +42,15 @@ public SoilProfile1D SoilProfile { get; set; } public SoilProfile2D SoilProfile2D { get; set; } public string SoilGeometry2DName { get; set; } + + /// + /// Gets or sets the path for the sti file (SoilGeometry2DName). + /// + /// + /// The path for the sti file . + /// + public string PathForStiFile { get; set; } + public Soil DikeEmbankmentMaterial { get; set; } // public SoilbaseDB SoilBaseDB { get; set; } public SoilList SoilList { get; set; } @@ -184,10 +194,18 @@ if (upliftFactorForBottomSandLayer < upliftFactorForInBetweenSandLayer) { + if (SoilProfile == null) + { + SoilProfile = soilProfileInCurrentPoint; + } return new UpliftLocationAndResult(point, upliftFactorForBottomSandLayer, soilProfileInCurrentPoint.BottomAquiferLayer.Name); } else { + if (SoilProfile == null) + { + SoilProfile = soilProfileInCurrentPoint; + } return new UpliftLocationAndResult(point, upliftFactorForInBetweenSandLayer, soilProfileInCurrentPoint.InBetweenAquiferLayer.Name); } } @@ -241,7 +259,13 @@ { return SoilProfile2D.GetSoilProfile1D(xCoordinate); } - var geometry2DTo1DConverter = new Geometry2DTo1DConverter(this.SoilGeometry2DName, this.SurfaceLine, this.DikeEmbankmentMaterial, this.SoilList, -this.XSoilGeometry2DOrigin); + + var soilGeometry2DName = SoilGeometry2DName; + if (!File.Exists(this.SoilGeometry2DName)) + { + soilGeometry2DName = PathForStiFile + SoilGeometry2DName; + } + var geometry2DTo1DConverter = new Geometry2DTo1DConverter(soilGeometry2DName, this.SurfaceLine, this.DikeEmbankmentMaterial, this.SoilList, -this.XSoilGeometry2DOrigin); return geometry2DTo1DConverter.Convert(xCoordinate); }