Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/SoilGeometryProbability.cs
===================================================================
diff -u -r2173 -r3041
--- DamEngine/trunk/src/Deltares.DamEngine.Data/General/SoilGeometryProbability.cs (.../SoilGeometryProbability.cs) (revision 2173)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/SoilGeometryProbability.cs (.../SoilGeometryProbability.cs) (revision 3041)
@@ -19,6 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using Deltares.DamEngine.Data.Geotechnics;
namespace Deltares.DamEngine.Data.General
@@ -120,6 +121,27 @@
return StiFileName;
}
}
- }
+ /// Determines the soilProfile1D at x coordinate, regardless of the soil profile type (1D or 2D).
+ /// Does not support *.sti files
+ /// The x coordinate.
+ ///
+ ///
+ public SoilProfile1D DetermineSoilProfile1DAtX(double xCoordinate)
+ {
+ SoilProfile1D soilProfile1D;
+ switch (this.SoilProfileType)
+ {
+ case SoilProfileType.ProfileType1D:
+ soilProfile1D = SoilProfile1D;
+ break;
+ case SoilProfileType.ProfileType2D:
+ soilProfile1D = SoilProfile2D.GetSoilProfile1D(xCoordinate);
+ break;
+ default:
+ throw new NotSupportedException(String.Format("{0} not supported", SoilProfileType));
+ }
+ return soilProfile1D;
+ }
+ }
}
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/UpliftVanGridCreator.cs
===================================================================
diff -u -r3040 -r3041
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/UpliftVanGridCreator.cs (.../UpliftVanGridCreator.cs) (revision 3040)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/UpliftVanGridCreator.cs (.../UpliftVanGridCreator.cs) (revision 3041)
@@ -20,6 +20,7 @@
// All rights reserved.
using System;
+using System.Linq;
using Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityCommon;
using Deltares.DamEngine.Data.General;
using Deltares.DamEngine.Data.Geotechnics;
@@ -94,14 +95,14 @@
/// Determines the tangent lines.
/// The uplift van calculation grid.
/// The slip circle definition.
- /// The top bottom aquifer at middle of left grid.
- ///
+ /// The soil profile1 d.
/// The minimum circle depth.
- public static void DetermineTangentLines(UpliftVanCalculationGrid upliftVanCalculationGrid,
- SlipCircleDefinition slipCircleDefinition, double bottomAquiferLevel,
- double surfaceLevel, double minimumCircleDepth)
+ public static void DetermineTangentLines(UpliftVanCalculationGrid upliftVanCalculationGrid, SlipCircleDefinition slipCircleDefinition,
+ SoilProfile1D soilProfile1D, double minimumCircleDepth)
{
- double bottomTangentLines = bottomAquiferLevel - slipCircleDefinition.UpliftVanTangentLinesDistance;
+ double topOfBottomLayer = soilProfile1D.Layers.Last().TopLevel;
+ double surfaceLevel = soilProfile1D.Layers.First().TopLevel;
+ double bottomTangentLines = topOfBottomLayer - slipCircleDefinition.UpliftVanTangentLinesDistance;
bottomTangentLines = Math.Min(bottomTangentLines, surfaceLevel - minimumCircleDepth);
double topTangentLines = bottomTangentLines;
int tangentLinesCount = 1;
@@ -114,7 +115,6 @@
upliftVanCalculationGrid.TangentLineCount = tangentLinesCount;
upliftVanCalculationGrid.TangentLineZTop = topTangentLines;
upliftVanCalculationGrid.TangentLineZBottom = bottomTangentLines;
-
}
}
}
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs
===================================================================
diff -u -r3040 -r3041
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 3040)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 3041)
@@ -45,6 +45,7 @@
using LogMessage = Deltares.DamEngine.Data.Standard.Logging.LogMessage;
using LogMessageType = Deltares.DamEngine.Data.Standard.Logging.LogMessageType;
using Soil = Deltares.DamEngine.Data.Geotechnics.Soil;
+using SoilProfile = Deltares.DamEngine.Data.Geotechnics.SoilProfile;
using UpliftVanCalculationGrid = Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityCommon.UpliftVanCalculationGrid;
namespace Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards
@@ -99,6 +100,8 @@
var penetrationLength = damKernelInput.Location.ModelParametersForPlLines.PenetrationLength;
var waterNet = PlLinesToWaternetConverter.ConvertPlLineToWaternet(plLines, damKernelInput.SubSoilScenario.SoilProfile1D,
penetrationLength, left, right);
+
+ // Define traffic load
TrafficLoad trafficLoad = null;
if (damKernelInput.Location.StabilityOptions != null && damKernelInput.Location.StabilityOptions.TrafficLoad.HasValue &&
!damKernelInput.Location.StabilityOptions.TrafficLoad.Value.AlmostZero())
@@ -111,6 +114,7 @@
.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.TrafficLoadOutside).X;
}
+ // Define slip circle UpliftVan
var slipCircleDefinition = damKernelInput.DamFailureMechanismeCalculationSpecification
.FailureMechanismParametersMStab.MStabParameters.SlipCircleDefinition;
double minimumCircleDepth = damKernelInput.DamFailureMechanismeCalculationSpecification
@@ -119,10 +123,11 @@
slipCircleDefinition, damKernelInput.Location.SurfaceLine);
double centerOfLeftGridXCoordinate =
(upliftVanCalculationGrid.LeftGridXLeft + upliftVanCalculationGrid.LeftGridXRight) * 0.5;
- double levelBottomAquiferAtMiddleOfLeftGrid = DetermineLevelBottomLayerAtX(damKernelInput.SubSoilScenario, centerOfLeftGridXCoordinate);
- double surfaceLevelAtMiddleOfLeftGrid = damKernelInput.Location.SurfaceLine.Geometry.GetZatX(centerOfLeftGridXCoordinate);
- UpliftVanGridCreator.DetermineTangentLines(upliftVanCalculationGrid, slipCircleDefinition,
- levelBottomAquiferAtMiddleOfLeftGrid, surfaceLevelAtMiddleOfLeftGrid, minimumCircleDepth);
+ SoilProfile1D soilProfile1DAtCenterOfLeftGridXCoordinate =
+ damKernelInput.SubSoilScenario.DetermineSoilProfile1DAtX(centerOfLeftGridXCoordinate);
+ UpliftVanGridCreator.DetermineTangentLines(upliftVanCalculationGrid, slipCircleDefinition,
+ soilProfile1DAtCenterOfLeftGridXCoordinate, minimumCircleDepth);
+
FillMacroStabilityWrapperInputFromEngine fillMacroStabilityWrapperFromEngine = new FillMacroStabilityWrapperInputFromEngine()
{
TrafficLoad = trafficLoad,
@@ -146,24 +151,6 @@
return PrepareResult.NotRelevant;
}
- private double DetermineLevelBottomLayerAtX(SoilGeometryProbability subSoilScenario, double xCoordinate)
- {
- SoilProfile1D soilProfile1D;
- switch (subSoilScenario.SoilProfileType)
- {
- case SoilProfileType.ProfileType1D:
- soilProfile1D = subSoilScenario.SoilProfile1D;
- break;
- case SoilProfileType.ProfileType2D:
- soilProfile1D = subSoilScenario.SoilProfile2D.GetSoilProfile1D(xCoordinate);
- break;
- default:
- throw new NotSupportedException(String.Format("{0} not supported", subSoilScenario.SoilProfileType));
- }
-
- return soilProfile1D.Layers.Last().TopLevel;
- }
-
private void EnsureSoilProfile2DIsFilled(SoilGeometryProbability subSoilScenario, SurfaceLine2 surfaceLine2, Soil dikeEmbankmentSoil)
{
var soilProfile2D = subSoilScenario.SoilProfile2D;