Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoDikeAssessmentSectionCommand.cs
===================================================================
diff -u -ra8d92ed8a79b45075e5e3a388da73d0ea40a25e3 -r3c10891728420f1c0aa0071574bbfb149710c556
--- Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoDikeAssessmentSectionCommand.cs (.../AddNewDemoDikeAssessmentSectionCommand.cs) (revision a8d92ed8a79b45075e5e3a388da73d0ea40a25e3)
+++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoDikeAssessmentSectionCommand.cs (.../AddNewDemoDikeAssessmentSectionCommand.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -4,6 +4,7 @@
using Core.Common.Controls.Commands;
using Core.Common.Gui;
using Ringtoets.Common.Forms.PresentationObjects;
+using Ringtoets.HydraRing.Data;
using Ringtoets.Integration.Data;
using Ringtoets.Integration.Forms.PresentationObjects;
using Ringtoets.Integration.Plugin.FileImporters;
@@ -118,7 +119,10 @@
calculation.InputParameters.SetSurfaceLine(pipingFailureMechanism.SurfaceLines.First(sl => sl.Name == "PK001_0001"));
calculation.InputParameters.SetSoilProfile(pipingFailureMechanism.SoilProfiles.First(sl => sl.Name == "W1-6_0_1D1"));
calculation.InputParameters.PhreaticLevelExit.Mean = (RoundedDouble)3;
- calculation.InputParameters.AssessmentLevel = (RoundedDouble)0.0;
+ calculation.InputParameters.HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, string.Empty, 0.0, 0.0)
+ {
+ DesignWaterLevel = 0.0
+ };
}
}
}
\ No newline at end of file
Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoDikeAssessmentSectionCommandTest.cs
===================================================================
diff -u -rb902215a3a5f2ea3547a1c85b1adfc1e11391694 -r3c10891728420f1c0aa0071574bbfb149710c556
--- Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoDikeAssessmentSectionCommandTest.cs (.../AddNewDemoDikeAssessmentSectionCommandTest.cs) (revision b902215a3a5f2ea3547a1c85b1adfc1e11391694)
+++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoDikeAssessmentSectionCommandTest.cs (.../AddNewDemoDikeAssessmentSectionCommandTest.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -137,9 +137,9 @@
PipingCalculationService.Calculate(calculation);
Assert.IsTrue(calculation.HasOutput);
Assert.AreEqual(99.0, calculation.Output.HeaveFactorOfSafety, 1e-3);
- Assert.AreEqual(0.533, calculation.Output.HeaveZValue, 1e-3);
+ Assert.AreEqual(1.154, calculation.Output.HeaveZValue, 1e-3);
Assert.AreEqual(99.0, calculation.Output.UpliftFactorOfSafety, 1e-3);
- Assert.AreEqual(5.689, calculation.Output.UpliftZValue, 1e-3);
+ Assert.AreEqual(9.296, calculation.Output.UpliftZValue, 1e-3);
Assert.AreEqual(-0.346, calculation.Output.SellmeijerFactorOfSafety, 1e-3);
Assert.AreEqual(4.171, calculation.Output.SellmeijerZValue, 1e-3);
}
@@ -151,7 +151,6 @@
Assert.AreEqual(10.0, inputParameters.WaterVolumetricWeight, 1e-3);
Assert.AreEqual(0.0, inputParameters.AssessmentLevel, 1e-3);
- Assert.AreEqual(0.0, inputParameters.PiezometricHeadExit, 1e-3);
Assert.AreEqual(0.3, inputParameters.SellmeijerReductionFactor, 1e-3);
Assert.AreEqual(16.5, inputParameters.SandParticlesVolumicWeight, 1e-3);
Assert.AreEqual(0.25, inputParameters.WhitesDragCoefficient, 1e-3);
Index: Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculator.cs
===================================================================
diff -u -rb2ba7b44c143bc91056e634e2fb8b329994501cd -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculator.cs (.../PipingCalculator.cs) (revision b2ba7b44c143bc91056e634e2fb8b329994501cd)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculator.cs (.../PipingCalculator.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -274,7 +274,7 @@
{
var calculator = factory.CreateHeaveCalculator();
calculator.Ich = input.CriticalHeaveGradient;
- calculator.PhiExit = input.PiezometricHeadExit;
+ calculator.PhiExit = CalculatePiezometricHeadAtExit();
calculator.DTotal = input.ThicknessCoverageLayer;
calculator.PhiPolder = input.PhreaticLevelExit;
calculator.RExit = input.DampingFactorExit;
@@ -291,7 +291,7 @@
calculator.ModelFactorUplift = input.UpliftModelFactor;
calculator.EffectiveStress = effectiveStress;
calculator.HRiver = input.AssessmentLevel;
- calculator.PhiExit = input.PiezometricHeadExit;
+ calculator.PhiExit = CalculatePiezometricHeadAtExit();
calculator.RExit = input.DampingFactorExit;
calculator.HExit = input.PhreaticLevelExit;
calculator.PhiPolder = input.PhreaticLevelExit;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculatorInput.cs
===================================================================
diff -u -rb2ba7b44c143bc91056e634e2fb8b329994501cd -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculatorInput.cs (.../PipingCalculatorInput.cs) (revision b2ba7b44c143bc91056e634e2fb8b329994501cd)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculatorInput.cs (.../PipingCalculatorInput.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -31,7 +31,6 @@
private readonly double waterVolumetricWeight;
private readonly double upliftModelFactor;
private readonly double assessmentLevel;
- private readonly double piezometricHeadExit;
private readonly double dampingFactorExit;
private readonly double phreaticLevelExit;
private readonly double criticalHeaveGradient;
@@ -61,7 +60,6 @@
///
/// The calculation value used to account for uncertainty in the model for uplift.
/// The outside high water level. [m]
- /// The piezometric head at the exit point. [m]
/// The damping factor at the exit point.
/// The phreatic level at the exit point. [m]
/// The critical exit gradient for heave.
@@ -81,13 +79,12 @@
/// The x coordinate of the exit point. [m]
/// The surface line.
/// The profile which contains a 1 dimensional definition of soil layers with properties.
- public PipingCalculatorInput(double waterVolumetricWeight, double saturatedVolumicWeightOfCoverageLayer, double upliftModelFactor, double assessmentLevel, double piezometricHeadExit, double dampingFactorExit, double phreaticLevelExit, double criticalHeaveGradient, double thicknessCoverageLayer, double sellmeijerModelFactor, double sellmeijerReductionFactor, double seepageLength, double sandParticlesVolumicWeight, double whitesDragCoefficient, double diameter70, double darcyPermeability, double waterKinematicViscosity, double gravity, double thicknessAquiferLayer, double meanDiameter70, double beddingAngle, double exitPointXCoordinate, RingtoetsPipingSurfaceLine surfaceLine, PipingSoilProfile soilProfile)
+ public PipingCalculatorInput(double waterVolumetricWeight, double saturatedVolumicWeightOfCoverageLayer, double upliftModelFactor, double assessmentLevel, double dampingFactorExit, double phreaticLevelExit, double criticalHeaveGradient, double thicknessCoverageLayer, double sellmeijerModelFactor, double sellmeijerReductionFactor, double seepageLength, double sandParticlesVolumicWeight, double whitesDragCoefficient, double diameter70, double darcyPermeability, double waterKinematicViscosity, double gravity, double thicknessAquiferLayer, double meanDiameter70, double beddingAngle, double exitPointXCoordinate, RingtoetsPipingSurfaceLine surfaceLine, PipingSoilProfile soilProfile)
{
this.waterVolumetricWeight = waterVolumetricWeight;
this.saturatedVolumicWeightOfCoverageLayer = saturatedVolumicWeightOfCoverageLayer;
this.upliftModelFactor = upliftModelFactor;
this.assessmentLevel = assessmentLevel;
- this.piezometricHeadExit = piezometricHeadExit;
this.dampingFactorExit = dampingFactorExit;
this.phreaticLevelExit = phreaticLevelExit;
this.criticalHeaveGradient = criticalHeaveGradient;
@@ -147,18 +144,6 @@
}
///
- /// Gets the piezometric head at the exit point.
- /// [m]
- ///
- public double PiezometricHeadExit
- {
- get
- {
- return piezometricHeadExit;
- }
- }
-
- ///
/// Gets the damping factor at the exit point.
///
public double DampingFactorExit
Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs
===================================================================
diff -u -rc4a451685003d5e96ddcc9ef043f0a9be9311839 -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs (.../PipingInput.cs) (revision c4a451685003d5e96ddcc9ef043f0a9be9311839)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs (.../PipingInput.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -41,6 +41,7 @@
private RoundedDouble assessmentLevel;
private RoundedDouble exitPointL;
private RoundedDouble entryPointL;
+ private HydraulicBoundaryLocation hydraulicBoundaryLocation;
///
/// Initializes a new instance of the class.
@@ -103,7 +104,7 @@
{
return assessmentLevel;
}
- set
+ private set
{
assessmentLevel = value.ToPrecision(assessmentLevel.NumberOfDecimalPlaces);
}
@@ -158,12 +159,6 @@
}
///
- /// Gets or sets the piezometric head at the exit point.
- /// [m]
- ///
- public double PiezometricHeadExit { get; set; }
-
- ///
/// Gets or sets the surface line.
///
public RingtoetsPipingSurfaceLine SurfaceLine { get; set; }
@@ -176,7 +171,18 @@
///
/// Gets or set the hydraulic boundary location from which to use the assessment level.
///
- public HydraulicBoundaryLocation HydraulicBoundaryLocation { get; set; }
+ public HydraulicBoundaryLocation HydraulicBoundaryLocation
+ {
+ get
+ {
+ return hydraulicBoundaryLocation;
+ }
+ set
+ {
+ AssessmentLevel = (RoundedDouble)value.DesignWaterLevel;
+ hydraulicBoundaryLocation = value;
+ }
+ }
#region General input parameters
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Extensions/PipingInputExtensions.cs
===================================================================
diff -u -r98a9ab8c8767367a37ccde50f98af06d1c28ed3e -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Extensions/PipingInputExtensions.cs (.../PipingInputExtensions.cs) (revision 98a9ab8c8767367a37ccde50f98af06d1c28ed3e)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Extensions/PipingInputExtensions.cs (.../PipingInputExtensions.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -82,6 +82,11 @@
}
}
+ public static RoundedDouble GetPiezometricHeadExit(this PipingInput input)
+ {
+ return new RoundedDouble(2, PipingCalculationService.CalculatePiezometricHeadAtExit(input));
+ }
+
private static void UpdateThicknessAquiferLayer(this PipingInput input)
{
PipingSoilProfile soilProfile = input.SoilProfile;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs
===================================================================
diff -u -rc7814fa3fc22bf7efe81f387e9366a3582019469 -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs (.../PipingInputContextProperties.cs) (revision c7814fa3fc22bf7efe81f387e9366a3582019469)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs (.../PipingInputContextProperties.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -19,7 +19,6 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing.Design;
@@ -82,15 +81,6 @@
}
set
{
- if (double.IsNaN(value.DesignWaterLevel))
- {
- string message = string.Format(Resources.PipingInputContextProperties_HydraulicBoundaryLocation_Could_not_set_Location_0_Cause_1_,
- value.Name,
- Resources.PipingInputContextProperties_AssessmentLevel_cannot_be_NaN);
- throw new ArgumentException(message);
- }
-
- data.WrappedData.AssessmentLevel = (RoundedDouble)value.DesignWaterLevel;
data.WrappedData.HydraulicBoundaryLocation = value;
data.WrappedData.NotifyObservers();
}
@@ -110,17 +100,12 @@
[ResourcesCategory(typeof(Resources), "Categories_HydraulicData")]
[ResourcesDisplayName(typeof(Resources), "PipingInput_PiezometricHeadExit_DisplayName")]
[ResourcesDescription(typeof(Resources), "PipingInput_PiezometricHeadExit_Description")]
- public double PiezometricHeadExit
+ public RoundedDouble PiezometricHeadExit
{
get
{
- return data.WrappedData.PiezometricHeadExit;
+ return data.WrappedData.GetPiezometricHeadExit();
}
- set
- {
- data.WrappedData.PiezometricHeadExit = value;
- data.WrappedData.NotifyObservers();
- }
}
[TypeConverter(typeof(NormalDistributionDesignVariableTypeConverter))]
Index: Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationService.cs
===================================================================
diff -u -rb2ba7b44c143bc91056e634e2fb8b329994501cd -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationService.cs (.../PipingCalculationService.cs) (revision b2ba7b44c143bc91056e634e2fb8b329994501cd)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationService.cs (.../PipingCalculationService.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -126,7 +126,6 @@
PipingSemiProbabilisticDesignValueFactory.GetSaturatedVolumicWeightOfCoverageLayer(inputParameters).GetDesignValue(),
inputParameters.UpliftModelFactor,
inputParameters.AssessmentLevel,
- inputParameters.PiezometricHeadExit,
PipingSemiProbabilisticDesignValueFactory.GetDampingFactorExit(inputParameters).GetDesignValue(),
PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(inputParameters).GetDesignValue(),
inputParameters.CriticalHeaveGradient,
Index: Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingCalculatorInputTest.cs
===================================================================
diff -u -rb2ba7b44c143bc91056e634e2fb8b329994501cd -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingCalculatorInputTest.cs (.../PipingCalculatorInputTest.cs) (revision b2ba7b44c143bc91056e634e2fb8b329994501cd)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingCalculatorInputTest.cs (.../PipingCalculatorInputTest.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -17,7 +17,6 @@
double saturatedVolumicWeightOfCoverageLayer = random.NextDouble();
double modelFactorUpliftValue = random.NextDouble();
double hRiverValue = random.NextDouble();
- double phiExitValue = random.NextDouble();
double rExitValue = random.NextDouble();
double hExitValue = random.NextDouble();
double ichValue = random.NextDouble();
@@ -49,7 +48,6 @@
saturatedVolumicWeightOfCoverageLayer,
modelFactorUpliftValue,
hRiverValue,
- phiExitValue,
rExitValue,
hExitValue,
ichValue,
@@ -74,7 +72,6 @@
Assert.AreEqual(saturatedVolumicWeightOfCoverageLayer, input.SaturatedVolumicWeightOfCoverageLayer);
Assert.AreEqual(modelFactorUpliftValue, input.UpliftModelFactor);
Assert.AreEqual(hRiverValue, input.AssessmentLevel);
- Assert.AreEqual(phiExitValue, input.PiezometricHeadExit);
Assert.AreEqual(rExitValue, input.DampingFactorExit);
Assert.AreEqual(hExitValue, input.PhreaticLevelExit);
Assert.AreEqual(ichValue, input.CriticalHeaveGradient);
Index: Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingCalculatorTest.cs
===================================================================
diff -u -rb2ba7b44c143bc91056e634e2fb8b329994501cd -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingCalculatorTest.cs (.../PipingCalculatorTest.cs) (revision b2ba7b44c143bc91056e634e2fb8b329994501cd)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingCalculatorTest.cs (.../PipingCalculatorTest.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -140,7 +140,7 @@
// Setup
PipingCalculatorInput input = new TestPipingInput
{
- PiezometricHeadExit = level,
+ AssessmentLevel = (RoundedDouble)level,
PhreaticLevelExit = level
}.AsRealInput();
@@ -161,6 +161,7 @@
// Setup
PipingCalculatorInput input = new TestPipingInput
{
+ AssessmentLevel = (RoundedDouble) 0.1,
DampingFactorExit = 0
}.AsRealInput();
@@ -170,8 +171,10 @@
List validationMessages = calculation.Validate();
// Assert
- Assert.AreEqual(2, validationMessages.Count);
+ Assert.AreEqual(4, validationMessages.Count);
Assert.AreEqual(2, validationMessages.Count(message => message.Contains("Rexit")));
+ Assert.AreEqual(1, validationMessages.Count(message => message.Contains("PhiExit - HExit")));
+ Assert.AreEqual(1, validationMessages.Count(message => message.Contains("phiExit - hExit")));
}
[Test]
Index: Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/Ringtoets.Piping.Calculation.Test.csproj
===================================================================
diff -u -r1069905ff1d4bb81d6acff6c130a4bed0b041b58 -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/Ringtoets.Piping.Calculation.Test.csproj (.../Ringtoets.Piping.Calculation.Test.csproj) (revision 1069905ff1d4bb81d6acff6c130a4bed0b041b58)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/Ringtoets.Piping.Calculation.Test.csproj (.../Ringtoets.Piping.Calculation.Test.csproj) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -78,6 +78,10 @@
{D749EE4C-CE50-4C17-BF01-9A953028C126}
Core.Common.TestUtil
+
+ {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2}
+ Ringtoets.HydraRing.Data
+
{ce994cc9-6f6a-48ac-b4be-02c30a21f4db}
Ringtoets.Piping.Data
Index: Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/Ringtoets.Piping.Calculation.TestUtil.csproj
===================================================================
diff -u -r1069905ff1d4bb81d6acff6c130a4bed0b041b58 -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/Ringtoets.Piping.Calculation.TestUtil.csproj (.../Ringtoets.Piping.Calculation.TestUtil.csproj) (revision 1069905ff1d4bb81d6acff6c130a4bed0b041b58)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/Ringtoets.Piping.Calculation.TestUtil.csproj (.../Ringtoets.Piping.Calculation.TestUtil.csproj) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -66,6 +66,10 @@
{3bbfd65b-b277-4e50-ae6d-bd24c3434609}
Core.Common.Base
+
+ {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2}
+ Ringtoets.HydraRing.Data
+
{ce994cc9-6f6a-48ac-b4be-02c30a21f4db}
Ringtoets.Piping.Data
Index: Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/TestPipingInput.cs
===================================================================
diff -u -rb2ba7b44c143bc91056e634e2fb8b329994501cd -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/TestPipingInput.cs (.../TestPipingInput.cs) (revision b2ba7b44c143bc91056e634e2fb8b329994501cd)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/TestPipingInput.cs (.../TestPipingInput.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -13,7 +13,6 @@
public double SaturatedVolumicWeightOfCoverageLayer;
public double UpliftModelFactor;
public RoundedDouble AssessmentLevel;
- public double PiezometricHeadExit;
public double DampingFactorExit;
public double PhreaticLevelExit;
public double CriticalHeaveGradient;
@@ -43,7 +42,6 @@
SaturatedVolumicWeightOfCoverageLayer = NextIncrementalDouble();
UpliftModelFactor = NextIncrementalDouble();
AssessmentLevel = (RoundedDouble)NextIncrementalDouble();
- PiezometricHeadExit = NextIncrementalDouble();
PhreaticLevelExit = NextIncrementalDouble();
DampingFactorExit = NextIncrementalDouble();
CriticalHeaveGradient = NextIncrementalDouble();
@@ -108,7 +106,6 @@
SaturatedVolumicWeightOfCoverageLayer,
UpliftModelFactor,
AssessmentLevel,
- PiezometricHeadExit,
DampingFactorExit,
PhreaticLevelExit,
CriticalHeaveGradient,
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs
===================================================================
diff -u -rb2ba7b44c143bc91056e634e2fb8b329994501cd -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision b2ba7b44c143bc91056e634e2fb8b329994501cd)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -4,7 +4,7 @@
using Core.Common.Base.Data;
using Core.Common.TestUtil;
using NUnit.Framework;
-
+using Ringtoets.HydraRing.Data;
using Ringtoets.Piping.Data.Probabilistics;
using Ringtoets.Piping.Data.Properties;
@@ -56,7 +56,6 @@
GetErrorTolerance(inputParameters.DarcyPermeability.StandardDeviation));
Assert.AreEqual(3, inputParameters.DarcyPermeability.StandardDeviation.NumberOfDecimalPlaces);
- Assert.AreEqual(0, inputParameters.PiezometricHeadExit);
Assert.IsNull(inputParameters.SurfaceLine);
Assert.IsNull(inputParameters.SoilProfile);
Assert.IsNull(inputParameters.HydraulicBoundaryLocation);
@@ -225,15 +224,18 @@
}
[Test]
- public void AssessmentLevel_SetToNewValueWithTooManyDecimalPlaces_ValueIsRounded()
+ public void HydraulicBoundary_SetToNewValue_AssessmentLevelValueIsRounded()
{
// Setup
var pipingInput = new PipingInput(new GeneralPipingInput());
-
+ var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, string.Empty, 0.0, 0.0)
+ {
+ DesignWaterLevel = -8.29292
+ };
int originalNumberOfDecimalPlaces = pipingInput.AssessmentLevel.NumberOfDecimalPlaces;
// Call
- pipingInput.AssessmentLevel = new RoundedDouble(5, -8.29292);
+ pipingInput.HydraulicBoundaryLocation = hydraulicBoundaryLocation;
// Assert
Assert.AreEqual(originalNumberOfDecimalPlaces, pipingInput.AssessmentLevel.NumberOfDecimalPlaces);
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingCalculationFactory.cs
===================================================================
diff -u -rb2ba7b44c143bc91056e634e2fb8b329994501cd -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingCalculationFactory.cs (.../PipingCalculationFactory.cs) (revision b2ba7b44c143bc91056e634e2fb8b329994501cd)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingCalculationFactory.cs (.../PipingCalculationFactory.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -2,6 +2,7 @@
using Core.Common.Base.Data;
using Core.Common.Base.Geometry;
+using Ringtoets.HydraRing.Data;
namespace Ringtoets.Piping.Data.TestUtil
{
@@ -45,12 +46,15 @@
surfaceLine.SetBottomDitchDikeSideAt(thirdCharacteristicPointLocation);
surfaceLine.SetBottomDitchPolderSideAt(fourthCharacteristicPointLocation);
surfaceLine.SetDitchPolderSideAt(fifthCharacteristicPointLocation);
-
+
+ HydraulicBoundaryLocation hydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, string.Empty, 0.0, 0.0)
+ {
+ DesignWaterLevel = (RoundedDouble) 1.0
+ };
return new PipingCalculation(new GeneralPipingInput())
{
InputParameters =
{
- AssessmentLevel = (RoundedDouble)1.0,
DampingFactorExit =
{
Mean = (RoundedDouble)1.0
@@ -64,7 +68,6 @@
Mean = (RoundedDouble)1.0
},
ExitPointL = (RoundedDouble)1.0,
- PiezometricHeadExit = 1.0,
PhreaticLevelExit =
{
Mean = (RoundedDouble)2.0
@@ -82,7 +85,8 @@
Mean = (RoundedDouble)1.0
},
SurfaceLine = surfaceLine,
- SoilProfile = soilProfile
+ SoilProfile = soilProfile,
+ HydraulicBoundaryLocation = hydraulicBoundaryLocation
}
};
}
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/Ringtoets.Piping.Data.TestUtil.csproj
===================================================================
diff -u -rf98cc7191a717793f69485dad2923cd34f6d48de -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/Ringtoets.Piping.Data.TestUtil.csproj (.../Ringtoets.Piping.Data.TestUtil.csproj) (revision f98cc7191a717793f69485dad2923cd34f6d48de)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/Ringtoets.Piping.Data.TestUtil.csproj (.../Ringtoets.Piping.Data.TestUtil.csproj) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -58,6 +58,10 @@
Ringtoets.Common.Data
False
+
+ {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2}
+ Ringtoets.HydraRing.Data
+
{CE994CC9-6F6A-48AC-B4BE-02C30A21F4DB}
Ringtoets.Piping.Data
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Extensions/PipingInputExtensionsTest.cs
===================================================================
diff -u -r98a9ab8c8767367a37ccde50f98af06d1c28ed3e -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Extensions/PipingInputExtensionsTest.cs (.../PipingInputExtensionsTest.cs) (revision 98a9ab8c8767367a37ccde50f98af06d1c28ed3e)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Extensions/PipingInputExtensionsTest.cs (.../PipingInputExtensionsTest.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -4,9 +4,13 @@
using Core.Common.Base.Geometry;
using Core.Common.TestUtil;
using NUnit.Framework;
+using Ringtoets.Piping.Calculation;
+using Ringtoets.Piping.Calculation.TestUtil.SubCalculator;
using Ringtoets.Piping.Data;
using Ringtoets.Piping.Forms.Extensions;
using Ringtoets.Piping.Forms.Properties;
+using Ringtoets.Piping.Service;
+using Ringtoets.Piping.Service.TestUtil;
namespace Ringtoets.Piping.Forms.Test.Extensions
{
@@ -1024,6 +1028,31 @@
#endregion
+ [Test]
+ public void GetPiezometricHeadExit_Always_SetsParametersForCalculatorAndReturnRoundedDouble()
+ {
+ // Setup
+ var input = new PipingInput(new GeneralPipingInput());
+
+ using (new PipingCalculationServiceConfig())
+ {
+ // Call
+ var result = input.GetPiezometricHeadExit();
+
+ // Assert
+ Assert.AreEqual(2, result.NumberOfDecimalPlaces);
+
+ var factory = (TestPipingSubCalculatorFactory) PipingCalculationService.SubCalculatorFactory;
+ var piezometricHeadAtExitCalculator = factory.LastCreatedPiezometricHeadAtExitCalculator;
+
+ Assert.AreEqual(input.AssessmentLevel.Value, piezometricHeadAtExitCalculator.HRiver);
+ Assert.AreEqual(PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(input).GetDesignValue(), piezometricHeadAtExitCalculator.PhiPolder,
+ GetAccuracy(input.PhreaticLevelExit.Mean));
+ Assert.AreEqual(PipingSemiProbabilisticDesignValueFactory.GetDampingFactorExit(input).GetDesignValue(), piezometricHeadAtExitCalculator.RExit,
+ GetAccuracy(input.DampingFactorExit.Mean));
+ }
+ }
+
#region test input creation helpers
private static RingtoetsPipingSurfaceLine ValidSurfaceLine(double xMin, double xMax)
@@ -1136,5 +1165,9 @@
}
#endregion
+ private static double GetAccuracy(RoundedDouble roundedDouble)
+ {
+ return Math.Pow(10.0, -roundedDouble.NumberOfDecimalPlaces);
+ }
}
}
\ No newline at end of file
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs
===================================================================
diff -u -rc7814fa3fc22bf7efe81f387e9366a3582019469 -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision c7814fa3fc22bf7efe81f387e9366a3582019469)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -16,6 +16,7 @@
using Ringtoets.Piping.Forms.Extensions;
using Ringtoets.Piping.Forms.PresentationObjects;
using Ringtoets.Piping.Forms.PropertyClasses;
+using Ringtoets.Piping.Service;
namespace Ringtoets.Piping.Forms.Test.PropertyClasses
{
@@ -55,10 +56,10 @@
var inputParameters = new PipingInput(new GeneralPipingInput())
{
- SurfaceLine = surfaceLine,
- SoilProfile = soilProfile,
HydraulicBoundaryLocation = testHydraulicBoundaryLocation
};
+ inputParameters.SetSurfaceLine(surfaceLine);
+ inputParameters.SetSoilProfile(soilProfile);
var properties = new PipingInputContextProperties
{
@@ -76,8 +77,8 @@
Assert.AreSame(inputParameters.DarcyPermeability, properties.DarcyPermeability.Distribution);
Assert.AreSame(inputParameters.ThicknessAquiferLayer, properties.ThicknessAquiferLayer.Distribution);
- Assert.AreEqual(inputParameters.PiezometricHeadExit, properties.PiezometricHeadExit);
Assert.AreEqual(inputParameters.AssessmentLevel, properties.AssessmentLevel);
+ Assert.AreEqual(inputParameters.GetPiezometricHeadExit(), properties.PiezometricHeadExit);
Assert.AreSame(inputParameters.SeepageLength, properties.SeepageLength.Distribution);
Assert.AreEqual(inputParameters.SeepageLength.Mean, properties.ExitPointL - properties.EntryPointL);
@@ -128,7 +129,7 @@
var mocks = new MockRepository();
var assessmentSectionMock = mocks.StrictMock();
var projectObserver = mocks.StrictMock();
- int numberProperties = 11;
+ int numberProperties = 10;
projectObserver.Expect(o => o.UpdateObserver()).Repeat.Times(numberProperties);
mocks.ReplayAll();
@@ -138,7 +139,6 @@
Random random = new Random(22);
double assessmentLevel = random.NextDouble();
- double piezometricHeadExit = random.NextDouble();
var dampingFactorExit = new LognormalDistribution(3);
var phreaticLevelExit = new NormalDistribution(2);
@@ -158,7 +158,6 @@
Enumerable.Empty(),
Enumerable.Empty(),
assessmentSectionMock),
- PiezometricHeadExit = piezometricHeadExit,
DampingFactorExit = new LognormalDistributionDesignVariable(dampingFactorExit),
PhreaticLevelExit = new NormalDistributionDesignVariable(phreaticLevelExit),
ThicknessCoverageLayer = new LognormalDistributionDesignVariable(thicknessCoverageLayer),
@@ -173,7 +172,6 @@
// Assert
Assert.AreEqual(assessmentLevel, inputParameters.AssessmentLevel, 1e-2);
- Assert.AreEqual(piezometricHeadExit, inputParameters.PiezometricHeadExit);
Assert.AreEqual(dampingFactorExit, inputParameters.DampingFactorExit);
Assert.AreEqual(phreaticLevelExit, inputParameters.PhreaticLevelExit);
Assert.AreEqual(thicknessCoverageLayer, inputParameters.ThicknessCoverageLayer);
@@ -339,18 +337,22 @@
}
[Test]
- public void HydraulicBoundaryLocation_DesignWaterLevelIsNaN_ThrowsArgumentException()
+ public void HydraulicBoundaryLocation_DesignWaterLevelIsNaN_AssessmentLevelSetToNaN()
{
// Setup
var mocks = new MockRepository();
var assessmentSectionMock = mocks.StrictMock();
var projectObserver = mocks.StrictMock();
+ projectObserver.Expect(o => o.UpdateObserver());
mocks.ReplayAll();
double assessmentLevel = new Random(21).NextDouble();
var inputParameters = new PipingInput(new GeneralPipingInput())
{
- AssessmentLevel = (RoundedDouble)assessmentLevel
+ HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, String.Empty, 0.0,0.0)
+ {
+ DesignWaterLevel = assessmentLevel
+ }
};
inputParameters.Attach(projectObserver);
@@ -368,17 +370,12 @@
DesignWaterLevel = double.NaN
};
- double originalRoundedAssessmentLevel = inputParameters.AssessmentLevel;
-
// Call
- TestDelegate test = () => properties.HydraulicBoundaryLocation = hydraulicBoundaryLocation;
+ properties.HydraulicBoundaryLocation = hydraulicBoundaryLocation;
// Assert
- var message = string.Format("Kan locatie '{0}' niet gebruiken als invoer. Toetspeil moet een geldige waarde hebben.", testName);
- TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, message);
+ Assert.IsNaN(properties.AssessmentLevel.Value);
- Assert.AreEqual(originalRoundedAssessmentLevel, properties.AssessmentLevel.Value);
-
mocks.VerifyAll();
}
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj
===================================================================
diff -u -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -154,6 +154,10 @@
{70f8cc9c-5bc8-4fb2-b201-eae7fa8088c2}
Ringtoets.HydraRing.Data
+
+ {d64e4f0e-e341-496f-82b2-941ad202b4e3}
+ Ringtoets.Piping.Calculation
+
{ce994cc9-6f6a-48ac-b4be-02c30a21f4db}
Ringtoets.Piping.Data
@@ -166,6 +170,10 @@
{1D3D58B6-EF7E-401E-92A0-104067D222EE}
Ringtoets.Piping.Plugin
+
+ {10B8D63D-87E8-46DF-ACA9-A8CF22EE8FB5}
+ Ringtoets.Piping.Service
+
{27E0A5C9-3ABF-426A-A3DA-7D0B83A218C8}
Ringtoets.Piping.Calculation.TestUtil
@@ -174,6 +182,10 @@
{955e574d-67ce-4347-aa6b-7df8a04ed754}
Ringtoets.Piping.Data.TestUtil
+
+ {C05B4F73-480E-46A4-B037-40954F8276DC}
+ Ringtoets.Piping.Service.TestUtil
+
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs
===================================================================
diff -u -rb2ba7b44c143bc91056e634e2fb8b329994501cd -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs (.../PipingCalculationContextTreeNodeInfoTest.cs) (revision b2ba7b44c143bc91056e634e2fb8b329994501cd)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs (.../PipingCalculationContextTreeNodeInfoTest.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -12,6 +12,7 @@
using NUnit.Framework;
using Rhino.Mocks;
using Ringtoets.Common.Data;
+using Ringtoets.HydraRing.Data;
using Ringtoets.Piping.Calculation.TestUtil;
using Ringtoets.Piping.Data;
using Ringtoets.Piping.Forms.PresentationObjects;
@@ -624,18 +625,19 @@
plugin.Gui = gui;
- calculation.InputParameters.AssessmentLevel = validPipingInput.AssessmentLevel;
calculation.InputParameters.DampingFactorExit.Mean = (RoundedDouble)validPipingInput.DampingFactorExit;
calculation.InputParameters.DarcyPermeability.Mean = (RoundedDouble)validPipingInput.DarcyPermeability;
calculation.InputParameters.Diameter70.Mean = (RoundedDouble)validPipingInput.Diameter70;
calculation.InputParameters.ExitPointL = validPipingInput.ExitPointXCoordinate;
calculation.InputParameters.PhreaticLevelExit.Mean = (RoundedDouble)validPipingInput.PhreaticLevelExit;
- calculation.InputParameters.PiezometricHeadExit = validPipingInput.PiezometricHeadExit;
calculation.InputParameters.SeepageLength.Mean = (RoundedDouble)validPipingInput.SeepageLength;
calculation.InputParameters.ThicknessAquiferLayer.Mean = (RoundedDouble)validPipingInput.ThicknessAquiferLayer;
calculation.InputParameters.ThicknessCoverageLayer.Mean = (RoundedDouble)validPipingInput.ThicknessCoverageLayer;
calculation.InputParameters.SurfaceLine = validPipingInput.SurfaceLine;
calculation.InputParameters.SoilProfile = validPipingInput.SoilProfile;
+ calculation.InputParameters.HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, string.Empty,0.0,0.0) {
+ DesignWaterLevel = validPipingInput.AssessmentLevel
+ };
calculation.Attach(observer);
Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs
===================================================================
diff -u -rb902215a3a5f2ea3547a1c85b1adfc1e11391694 -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs (.../PipingCalculationServiceTest.cs) (revision b902215a3a5f2ea3547a1c85b1adfc1e11391694)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs (.../PipingCalculationServiceTest.cs) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -8,6 +8,7 @@
using Ringtoets.Piping.Calculation.TestUtil;
using NUnit.Framework;
+using Ringtoets.HydraRing.Data;
using Ringtoets.Piping.Calculation;
using Ringtoets.Piping.Calculation.TestUtil.SubCalculator;
using Ringtoets.Piping.Data;
@@ -123,7 +124,10 @@
// Setup
PipingInput input = new PipingInput(new GeneralPipingInput())
{
- AssessmentLevel = (RoundedDouble)0.0
+ HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, string.Empty, 0.0, 0.0)
+ {
+ DesignWaterLevel = (RoundedDouble) 0.0
+ }
};
// Call
@@ -286,6 +290,7 @@
var heaveCalculator = testFactory.LastCreatedHeaveCalculator;
var upliftCalculator = testFactory.LastCreatedUpliftCalculator;
var sellmeijerCalculator = testFactory.LastCreatedSellmeijerCalculator;
+ var piezometricHeadAtExitCalculator = testFactory.LastCreatedPiezometricHeadAtExitCalculator;
Assert.AreEqual(PipingSemiProbabilisticDesignValueFactory.GetThicknessCoverageLayer(input).GetDesignValue(), heaveCalculator.DTotal,
GetAccuracy(input.ThicknessCoverageLayer.Mean));
@@ -294,15 +299,15 @@
Assert.AreEqual(input.CriticalHeaveGradient, heaveCalculator.Ich);
Assert.AreEqual(PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(input).GetDesignValue(), heaveCalculator.PhiPolder,
GetAccuracy(input.PhreaticLevelExit.Mean));
- Assert.AreEqual(input.PiezometricHeadExit, heaveCalculator.PhiExit);
+ Assert.AreEqual(piezometricHeadAtExitCalculator.PhiExit, heaveCalculator.PhiExit);
Assert.AreEqual(PipingSemiProbabilisticDesignValueFactory.GetDampingFactorExit(input).GetDesignValue(), heaveCalculator.RExit,
GetAccuracy(input.DampingFactorExit.Mean));
Assert.AreEqual(PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(input).GetDesignValue(), upliftCalculator.HExit,
GetAccuracy(input.PhreaticLevelExit.Mean));
Assert.AreEqual(input.AssessmentLevel.Value, upliftCalculator.HRiver);
Assert.AreEqual(input.UpliftModelFactor, upliftCalculator.ModelFactorUplift);
- Assert.AreEqual(input.PiezometricHeadExit, upliftCalculator.PhiExit);
+ Assert.AreEqual(piezometricHeadAtExitCalculator.PhiExit, upliftCalculator.PhiExit);
Assert.AreEqual(PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(input).GetDesignValue(), upliftCalculator.PhiPolder,
GetAccuracy(input.PhreaticLevelExit.Mean));
Assert.AreEqual(PipingSemiProbabilisticDesignValueFactory.GetDampingFactorExit(input).GetDesignValue(), upliftCalculator.RExit,
Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/Ringtoets.Piping.Service.Test.csproj
===================================================================
diff -u -ree73eb1956b80d67caa6047be8dc97c223851350 -r3c10891728420f1c0aa0071574bbfb149710c556
--- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/Ringtoets.Piping.Service.Test.csproj (.../Ringtoets.Piping.Service.Test.csproj) (revision ee73eb1956b80d67caa6047be8dc97c223851350)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/Ringtoets.Piping.Service.Test.csproj (.../Ringtoets.Piping.Service.Test.csproj) (revision 3c10891728420f1c0aa0071574bbfb149710c556)
@@ -80,6 +80,10 @@
Ringtoets.Common.Data
True
+
+ {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2}
+ Ringtoets.HydraRing.Data
+
{D64E4F0E-E341-496F-82B2-941AD202B4E3}
Ringtoets.Piping.Calculation